具有区域设置独立ID的get-counter [英] get-counter with locale independent IDs

查看:82
本文介绍了具有区域设置独立ID的get-counter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过cmdlet get-counter以与语言环境无关的方式访问以下计数器路径:

I am trying to access the following counter-path via the cmdlet get-counter in a locale-independent way:

\Memory\Pool Nonpaged Bytes

我遵循了此线程中的说明存档.因此,我在注册表中查找了反向路径的两个ID,并得到了\4\58
但是不幸的是,这条路是行不通的.我总是收到错误消息

I followed the instructions in this thread to archive this. And so I looked up the two IDs for the counter-path in the registry and got \4\58
But unfortunately this path won't work. I always get the error-message

The specified performance-indicator could not be found

来自另一个线程\238(_Total)\6的路径非常正常!但是对于我的路径,我只能获取\4\*来列出集合中的所有计数器.

The path from the other thread \238(_Total)\6 works perfectly fine! But for my path I can only get \4\* to list all counters in the set.

我在做什么错了?

推荐答案

@Chris,

PowerShell杂志不久前发表了一篇文章.

PowerShell Magazine carried an article on this a while ago.

http://www.powershellmagazine.com /2013/07/19/querying-performance-counters-from-powershell/

Tobias显示了一种将计数器名称转换为ID号的方法.

Tobias showed a way to translate counter names to ID numbers.

这篇关于具有区域设置独立ID的get-counter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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