开发者

Monitor CPU and memory consumption of a specific processes in (Windows) C?

开发者 https://www.devze.com 2023-03-19 11:16 出处:网络
i would like to 开发者_JAVA技巧monitor the cpu and memory consumption of a given process in windows (nt architecture - xp,vista,win7), every few seconds to make a graph

i would like to 开发者_JAVA技巧monitor the cpu and memory consumption of a given process in windows (nt architecture - xp,vista,win7), every few seconds to make a graph i have searched around but found only non C solutions only (java,c#,c++, etc) i know there is a PerformanceCounter class, but obviously it is not available in c.

thanks


Win32 Performance Counters:

http://msdn.microsoft.com/en-us/library/aa373083%28v=vs.85%29.aspx

Developer Audience:

Performance Counters is designed for use by C and C++ developers.

However, If you just want a tool to show you this information, get Mark Russinovich's Process Explorer. It can show per-process stats and graphs.

0

精彩评论

暂无评论...
验证码 换一张
取 消