views:

328

answers:

1

Hi All, I need to get CPU utilization metrics of all the process.

Operating system = Windows Xp programming language = Java requirements = need to take samples every few seconds indefinitely, not just for one snapshot in time.

+1  A: 

WMI is the tool of choice for all Windows measurement stuff. I've written VB Script code that will periodically query the WMI interface to retrieve CPU information, disk information and all sorts of other things.

The Win32_Process class is the one you're looking for, and this page details how to do it in Java using a free tool called JACOB (Java COM Bridge).

paxdiablo