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?
LVL 16
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
I have not messed with Mono much as of yet, but the typical way of starting a process and waiting for it to finish in .NET would be:
Process p = new Process();
ProcessStartInfo info = new ProcessStartInfo("/bin/file_to_execute", "list of arguments");

p.StartInfo = info;

Open in new window

McExpAuthor Commented:
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.
käµfm³d 👽Commented:
Good luck.
McExpAuthor Commented:
I've reported the "Bug" let's see what happens!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.