sulfurious Posted September 12, 2008 Share Posted September 12, 2008 I am messing with ProcessGetStats, and am confused as to either what it is really returning or where my error is. I read in the docs that the parameter can be the name or PID. I was trying using name. [Optional] The name or PID of the process to get infos from. Default (-1) is the current process. But it seems to return not what I expect. So what is it returning? The complete memory usage of all tasks? Why do the returned arrays contain the exact same data? expandcollapse popup$process1 = 'crss' $process2 = 'lsass' $process3 = 'winlogon' $end = 1 $tyme = 0 $count = 1 While $end = 1 Sleep(500) $tyme = $tyme + 1 $count = $count + 1 If $tyme >= 10 Then $str='' If $process1 <> '' Then $res1 = ProcessGetStats($process1,0) If IsArray($res1) Then $str = $str & 'Process: ' & $process1 & @CRLF $str = $str & 'Mem: ' & $res1[0] & ' MaxMem: ' & $res1[1] & @CRLF EndIf EndIf ;~ Sleep(1000) If $process2 <> '' Then $res2 = ProcessGetStats($process2,0) If IsArray($res2) Then $str = $str & 'Process: ' & $process2 & @CRLF $str = $str & 'Mem: ' & $res2[0] & ' MaxMem: ' & $res2[1] & @CRLF EndIf EndIf ;~ Sleep(1000) If $process3 <> '' Then $res3 = ProcessGetStats($process3,0) If IsArray($res3) Then $str = $str & 'Process: ' & $process3 & @CRLF $str = $str & 'Mem: ' & $res3[0] & ' MaxMem: ' & $res3[1] & @CRLF EndIf EndIf $tyme = 0 ConsoleWrite($str & @CRLF) EndIf If $count = 50 Then Exit WEnd Sul. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now