Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get % of CPU usage by process?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00798285
Message ID:
00798715
Views:
37
You can use WMI to do this. It's very easy to get a process list along with it's current snapshot CPU utilization. Check Win32_Process in the MSDN documentation.


>Here was my problem.

>
>The customer called me and said my VFP application was running slowly. Come to find out their was a virus that norton's did not catch and it was chewing up 100% of the processor. Of course I could not login to the customer to see the problem because it was not responding to PCAnywhere. I had the customer reboot the computer and that did not help because the virus loaded into memory at bootup. What I would like to do is have the customer snap-shot his system processes and CPU usage and email it to me. Come to find out I spend a lot of tech time when the problem was not even mine and I was looking for a logging method say 5-10 seconds to see what was in memory and what CPU usage was being used. I know how to get the processes and threads and even how to kill them, but I don't know how to get the CPU usage. Any ideas? Has anyone tried this?
>
>Thanks,
>Dale
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform