Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monitoring CPU and disk utilization of a single program

How can I calculate CPU and disk utilization of another concurrent program? I.e. one program is running and other calculates the first's resource use.

I'm using C and C++ and running under Windows XP.

like image 312
sandeep manglani Avatar asked Nov 14 '22 11:11

sandeep manglani


1 Answers

It is possible, as Process Explorer can do it, but I think you will have to use some kind of undocumented Windows API. PSAPI comes somewhat close, but it gives you only the memory usage information, not CPU or disk utilization.

like image 91
Suma Avatar answered Nov 17 '22 07:11

Suma