How do I get CPU usage metrics in Windows Xp?

I need to get cpu usage metrics of the whole process.

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

+1


a source to share


2 answers


WMI is the tool of choice for all Windows measurement tools. I wrote VB Script code that will periodically query the WMI for CPU information, disk information and all other things.



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

+1


a source


with help typeperf

we can get process based metrics in windows

Syntax

:

typeperf "\Process(processname)\% Processor Time" "\Process(processname)\%ID Process"

      

example:

typeperf "\Process(svchost)\% Processor Time" "\Process(svchost)\%ID Process"

      



Note. The process will have multiple counters. therefore we can also mention these indicators.

use the perfmon tool on windows to get these counters.

use the perfmon command in run to use the perfmon tool.

Counters will depend on the type of metric such as processor, memory, process, etc.

0


a source







All Articles