used memory and vmsize are working well using:
Set objSWbemServices1 = objSWbemLocator.ConnectServer(strServer1, "root\cimv2", strUser1, _
strPword1, "MS_409", "ntlmdomain:" + strDomain1)
Set colSwbemObjectSet1 = objSWbemServices1.ExecQuery("Select * From Win32_Process")
Set PerfProcess1 = objSWbemServices1.Get("Win32_PerfRawData_PerfProc_Process.Name='" & Process1 & "'")
Set objSWbemServices2 = objSWbemLocator.ConnectServer(strServer2, "root\cimv2", strUser2, _
strPword2, "MS_409", "ntlmdomain:" + strDomain2)
Set colSwbemObjectSet2 = objSWbemServices2.ExecQuery("Select * From Win32_Process")
Set PerfProcess2 = objSWbemServices2.Get("Win32_PerfRawData_PerfProc_Process.Name='" & Process1 & "'")
Do
For Each objProcess in colSwbemObjectSet1
If objProcess.Name = Process1 Then
MemUsage = FormatNumber((objProcess.WorkingSetSize / Faktor1) ,0 ,0 ,0 ,-1)
VMSize = FormatNumber((objProcess.PageFileUsage / Faktor1) ,0 ,0 ,0 ,-1)
VMSizeK = objProcess.PageFileUsage / Faktor1
PPT = PerfProcess1.PercentProcessorTime
If Debug = 1 Then WScript.Echo strServer1 & ":" & VbCrLf &_
"VMSizeK / MEMthresholdK: " & VMSizeK & "/" & MEMthresholdK & VbCrLf &_
"PPT / CPUthreshold " & PPT & "/" & CPUthreshold
If VMSizeK > MEMthresholdK Then
'If VMSizeK > MEMthresholdK or PPT > CPUthreshold Then
Alarm1 = 1
A1Mark = "*"
List = List & "==> " & strServer1 & " <==" & VbCrLf & "(" & objProcess.Name & "), MemUsage: " & _
MemUsage & " K, VM: " & VMSize & " K" & " " & PPT & " %" & VbCrLf
Else
A1Mark = " "
List = List & strServer1 & VbCrLf & "(" & objProcess.Name & "), MemUsage: " & _
MemUsage & " K, VM: " & VMSize & " K" & " " & PPT & " %" & VbCrLf
End If
If Debug = 1 Then WScript.Echo "S1: " & Timestamp & "/" & A1Mark & MemUsage & " K " & VMSize & " K " & PPT & " %"
End If
Next
Wscript.Sleep SleepTimeS 'just wait for a while
Loop
...but I can't get the "PercentProcessorTime" from the remote machine...
any idea?
thanks RoMa68