Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get system information out of task manager

Status
Not open for further replies.

RoMa68

Technical User
Feb 7, 2006
27
DE
I want to get system information (even from remote computers) out of the task manager.

Things like
- cpu load
- used memory
- vm size

I need these information from other computers (servers) in my network-neighbourhood!

Thanks in advance
 
Search this forum for "Remote WMI"

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top