Perfmon 将不再运行
今天我破坏了 perfmon...:(
我可以启动应用程序,三个默认计数器(cpu、mem、磁盘)都在那里,但图形不会移动。
数据源设置为“当前活动”,“未按下“冻结显示”按钮。我只是重新启动,启动 perfmon,并且没有移动图形。
我尝试使用恢复计数器
C:\WINDOWS\system32>lodctr.exe /R
,但这没有帮助。
使用 Windows Server 2003 R2,32 位。 一位同事在类似的环境下也遇到了这个问题,但我们还无法确定原因。
(对于反对者:我知道这与编程没有直接关系,但是编写一个没有任何测量依据的性能应用程序有点困难(但这可能只是我)
为了让这更有趣:
以下代码也不检索值:
System.Diagnostics.PerformanceCounter ctr =
new System.Diagnostics.PerformanceCounter();
ctr.CategoryName = "Processor";
ctr.CounterName = "% Processor Time";
ctr.InstanceName = "_Total";
ctr.MachineName = ".";
float val = ctr.NextValue().ToString();
// val equals 0
请求的图像:
替代文本 http://www .brokenwire.net/bw/file_download/23/perfmon.PNG
(因此,图表不会填满屏幕,不会出现任何值)
Today I broke perfmon... :(
I can start the application, the three default counters (cpu, mem, disk) are there, but the graph won't move.
The Data Source is set to "Current Activity", the "Freeze Display" button is not pressed. I just rebooted, started perfmon, and no moving graph.
I tried restoring the counters using
C:\WINDOWS\system32>lodctr.exe /R
but that did not help.
Using Windows Server 2003 R2, 32bits.
A collegue also got this problem on a similar environment, but we couldn't pinpoint the reason yet.
(For the downvoter(s): I know it's not directly programming related, but writing an app for performance without any measurements to go by with is a bit hard (but that might just be me)
To make this more interesting:
The following code also does not retrieve values:
System.Diagnostics.PerformanceCounter ctr =
new System.Diagnostics.PerformanceCounter();
ctr.CategoryName = "Processor";
ctr.CounterName = "% Processor Time";
ctr.InstanceName = "_Total";
ctr.MachineName = ".";
float val = ctr.NextValue().ToString();
// val equals 0
The image as requested:
alt text http://www.brokenwire.net/bw/file_download/23/perfmon.PNG
(So, the graph does not fill the screen, no values appear)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
可能相关的 SO 问题 的可接受答案是调用:
<代码>lodctr.exe /s:PerfStringBackup.INI
上
,然后将文件复制到受影响的计算机,然后
在调用之前:
lodctr.exe /R:tPerfStringBackup.INI
The accepted answer to a possibly related SO question was to call:
lodctr.exe /s:PerfStringBackup.INI
on
then copy the file to the affected machine, then
before a call to:
lodctr.exe /R:tPerfStringBackup.INI
听起来你在这方面一直很努力。 您检查过 http://www.tomshardware.com/forum/117911-45-perfmon ? 然后您可以仔细检查您的注册表以确保其正确。 另外,如果您有 Windows CD,则可以复制 perfmon 文件的新副本。
It sounds like you have been working on this pretty hard. Have you checked http://www.tomshardware.com/forum/117911-45-perfmon? Then you can double check your registry to make sure it is correct. Also, if you have your windows cd, you can copy over a fresh copy of the perfmon files.
尝试以下 Microsoft 解决方案:
http://support.microsoft。 com/default.aspx?scid=kb;en-us;300956
它最后使用 C:\WINDOWS\system32>lodctr.exe /R 但您正在编辑注册表,它可能会起作用。
我希望它有帮助。
try the following microsoft solution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;300956
it uses C:\WINDOWS\system32>lodctr.exe /R at the end but you are editing the registry, it might do the trick.
I hope it helps.
您是否尝试过修复 Windows 安装? 使用 Windows 安装光盘?
Have you tried repairing your Windows Installation ? Using the Windows Installation Disc ?
右键单击图表。 您说数据源设置为当前活动。 那是在“源”选项卡上。 转到“常规”选项卡,一直到底部。 确保选中“自动采样间隔:”,并确保采样时间合理(默认为 1 - 1 秒)。 如果已经选中,请取消选中,然后再次选中。
Right-click the graph. You said Data Source is set to Current Activity. That is on the Source tab. Go to the General tab, down to the bottom. Make sure "Sample automatically every:" is checked, and make sure the sample time is reasonable (1 is the default -- 1 second). If it's already checked, uncheck and then check it again.