本文介绍了在(Windows)C中监视特定进程的CPU和内存消耗吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想监视Windows中给定进程的CPU和内存消耗(nt架构-xp,vista,win7),每隔几秒钟就制作一个图形我到处搜索,但仅找到非C解决方案(java,c#,c ++等)我知道有一个PerformanceCounter类,但显然在c中不可用.

谢谢

解决方案

Win32性能计数器:

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

但是,如果您只是想要一个工具来向您显示此信息,请获取Mark Russinovich的流程资源管理器.它可以显示每个进程的统计信息和图表.

i would like to monitor the cpu and memory consumption of a given process in windows (nt architecture - xp,vista,win7), every few seconds to make a graphi 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

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.

这篇关于在(Windows)C中监视特定进程的CPU和内存消耗吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 21:36