WMI can be used on a remote computer, see Remote Administration with WMI (http://www.windowsitpro.com/Windows/Article/ArticleID/37596/37596.html)
You can also use .Net remoting, or write a B/S application.
In WinXP and higher, you can use the IWbemRefresher with the Win32_PerfFormattedData_PerfProc_Process class.
IN W2K and below, you can use a hand-crafted poller that keeps querying Win32_PerfRawData_PerfProc_Process, and you will have to add the "math logic" to your application.
'Get % Processor Time for a process
' after the script is started, launch Task Manager to see the result
' process name to monitor
sProcessName = "taskmgr"
'Connect to Local Machine
set wmi_service = _
GetObject("winmgmts:{impersonationlevel=impersonate}!\root\cimv2")
sObjectPath = "Win32_PerfRawData_PerfProc_Process.Name=" _
& chr(34) & sProcessName & chr(34)
wscript.echo "Monitoring " & sObjectPath
set perf_instance1 = wmi_service.get( sObjectPath )
N1 = perf_instance1.PercentProcessorTime
D1 = perf_instance1.TimeStamp_Sys100NS
do
'Sleep for one second = 1000 ms
wscript.sleep(1000)
set perf_instance2 = wmi_service.get( sObjectPath )
N2 = perf_instance2.PercentProcessorTime
D2 = perf_instance2.TimeStamp_Sys100NS
' CounterType - PERF_100NSEC_TIMER
' Formula = ((N2 - N1) / (D2 - D1)) x 100
if ( 0 = (D2-D1) ) then
wscript.echo "divide by zero"
else
PercentProcessorTime = ((N2 - N1) / (D2 - D1)) * 100
wscript.echo "% Processor Time = " , PercentProcessorTime
end if
N1 = N2
D1 = D2
'looping for 30 seconds
i = i + 1
loop until i = 30
WScript.Echo "Finished"