Installing and upgrading to HP Insight Software 6.3 on Windows Server 2008 R2 Failover Cluster with SQL Server 2008 for high availability

66
Appendix E: HPSIMDELAY.vbs file content
This appendix provides the contents of HPSIMDELAY.vbs script to be created under <HP SIM
Install Path>\lbin, if it does not exist already in this loca tion. Cut and paste the following lines
in the HPSIMDELAY.vbs-
---------Remove this line after copying-----
'Delay HPSIM services for cluster agent to come online
Dim WshShell, Start
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
Set WshShell = CreateObject("WScript.Shell")
Function Open( )
' ... Insert your Open code here.
End Function
Function Online( )
' ... Insert your Online code here.
' ... Online is executed once when the resource is placed online.
'Wait for 2 Minutes prior starting the SIM service
For Each objOS in colOperatingSystems
dtmBootup = objOS.LastBootUpTime
dtmLastBootupTime = WMIDateStringToDate(dtmBootup)
dtmSystemUptime = DateDiff("n",dtmLastBootUpTime, Now)
Next
If dtmSystemUptime <= 5 Then
Start = Timer
Do While Timer < Start + 120
Loop
End If
End Function
Function LooksAlive( )
' ... Insert your LooksAlive code here.
' ... LooksALive is executed at specified intervals.
End Function
Function IsAlive( )
' ... Insert your IsAlive code here.
' ... IsAlive is executed at specified intervals