McExp
asked on
Process.Start Get CPU Time
I'm using a C# .net program (using MONO on RHEL) to invoke the a external process, I'm looking to monitor the process by checking the CPUtime at a defined interval, if the CPU time has not increased I assume the process is dead, kill it off and move on to the next stage. However when I get the CPU time (after a Process.Refresh) it is always 0 are the CPU times not populated on mono or am I missing something?
ASKER
Please read my question again, I already have the code working to load the process and monitor the CPU time for the process, However whenever I call the code I get a return of 0 ms. Your example doesn't even propose a solution to do check of CPU time. Please only respond if you can actually help!
Looking at the mono source, Refresh doesn't look like it does anything for the TotalProcessorTime
The TotalProcessorTime method calls a Times method in an assembly specific for your operating system, I've not been able to track down the source for this yet and unfortunately have run out of time. If you've got no answer by tomorrow I'll try and track it down further. Sounds like you may need to raise this with the mono team though.
The TotalProcessorTime method calls a Times method in an assembly specific for your operating system, I've not been able to track down the source for this yet and unfortunately have run out of time. If you've got no answer by tomorrow I'll try and track it down further. Sounds like you may need to raise this with the mono team though.
Good luck.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window