跟踪每个进程的 CPU 和内存使用情况 [英] Tracking CPU and Memory usage per process

查看:45
本文介绍了跟踪每个进程的 CPU 和内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怀疑我的一个应用程序占用了比我想要的更多的 CPU 周期.问题是 - 它突然发生,仅查看任务管理器对我没有帮助,因为它仅显示即时使用情况.

有没有办法(在 Windows 上)跟踪 CPU & 的历史记录?某些进程的内存使用情况.例如.我将开始跟踪firefox",大约一个小时后会看到它的 CPU 和图形.那一小时的内存使用情况.

我正在寻找现成的工具或编程方式来实现这一目标.

解决方案

只需在 Start > 中输入 perfmon运行并按回车键.当 Performance 窗口打开时,单击 + 号将新计数器添加到图表中.计数器是 PC 工作方式的不同方面,并按相似性分组到称为性能对象"的组中.

对于您的问题,您可以选择进程"、内存"和处理器"性能对象.然后就可以实时看到这些计数器了

您还可以指定实用程序来保存性能数据以供以后检查.为此,请在左侧面板中选择性能日志和警报".(它就在 System Monitor 控制台下方,它为我们提供了上述计数器.如果没有,请单击文件">添加/删除管理单元",单击添加"并在列表中选择性能日志和警报"".) 从性能日志和警报"中,在计数器日志"下创建一个新的监控配置.然后您可以添加计数器、指定采样率、日志格式(二进制或纯文本)和日志位置.

I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage only.

Is there a way (on Windows) to track the history of CPU & Memory usage for some process. E.g. I will start tracking "firefox", and after an hour or so will see a graph of its CPU & memory usage during that hour.

I'm looking for either a ready-made tool or a programmatic way to achieve this.

解决方案

Just type perfmon into Start > Run and press enter. When the Performance window is open, click on the + sign to add new counters to the graph. The counters are different aspects of how your PC works and are grouped by similarity into groups called "Performance Object".

For your questions, you can choose the "Process", "Memory" and "Processor" performance objects. You then can see these counters in real time

You can also specify the utility to save the performance data for your inspection later. To do this, select "Performance Logs and Alerts" in the left-hand panel. (It's right under the System Monitor console which provides us with the above mentioned counters. If it is not there, click "File" > "Add/remove snap-in", click Add and select "Performance Logs and Alerts" in the list".) From the "Performance Logs and Alerts", create a new monitoring configuration under "Counter Logs". Then you can add the counters, specify the sampling rate, the log format (binary or plain text) and log location.

这篇关于跟踪每个进程的 CPU 和内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆