performancecounter对象和远程服务器 [英] performancecounter object and remote server

查看:72
本文介绍了performancecounter对象和远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用performancecounter对象来访问

远程计算机上的计数器?

我设法编写了从远程检索计数器类别的代码

机器,当我尝试另一台远程机器时,我得到了

" System.ComponentModel.Win32Exception"错误。错误消息是

未找到网络路径。

我已经检查了两者的运行服务(RPC,Remote registery .....) />
机器和它们完全相同。

我想知道是否有任何配置允许访问计数器

远程地说我错过了第二台机器。

风格如下:

我有一个工作组,不是域名,1台XP笔记本电脑(我有VS 2005),2
虚拟win2k3机器。当运行代码时,提到的错误发生在

以下行


Dim AllCountersCategories As PerformanceCounterCategory()=

PerformanceCounterCategory。 GetCategories(strServer名称)


关于网络连接,我可以在

windows explorer中映射到两台服务器的连接。我用来登录tomy XP机器的用户和密码也是两台机器上创建的



错误信息真的没有给出任何线索的原因我无法在第二台机器柜台上取回

,而它与其他

服务器的魅力相似。

提前感谢

解决方案

你好Salam,


根据你的描述,你正在使用。 NET性能计数器在远程机器上打开

计数器,但是,你得到以下错误,对吗?


>" System。 ComponentModel.Win32Exception"错误。错误消息是未找到网络路径。



基于我的研究,到目前为止远程性能计数器访问,博客条目后面的

提到了一些信息:


#如何在没有管理员权限的情况下阅读性能计数器[Ryan

Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx


另外,正如你提到的非域环境,我认为它也与问题有关。

。我已经在我的身边进行了测试,在一个领域

环境中,我可以正确运行您提供的代码(如果我尝试在本地帐户下运行
,则会发生这样的事件) ,两台机器上都有相同的用户名/密码。

您是否在一台帐户上运行了两台

机器上的用户名/密码,是否为管理员帐户?


此致,

Steven Cheng


Microsoft MSDN在线支持主管

让客户满意是我们的首要任务。我们欢迎您的意见和

有关我们如何改进我们为您提供的支持的建议。请

随时让我的经理知道您对服务水平的看法

提供。您可以直接向我的经理发送反馈:
ms****@microsoft.com


========================================== ========

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有赋予任何权利。


--------------------


>来自:=?Utf-8?B?U2FsYW1FbGlhcw ==?=< el ****** @ online.nospam>
主题:performancecounter对象和远程服务器
日期:2008年5月27日星期二01:24:00 -0700


>
有没有人使用performancecounter对象来在远程机器上访问计数器?
我设法编写代码从远程机器中检索计数器类别,当我尝试另一台远程机器时,我得到了System.ComponentModel.Win32Exception ;错误。错误消息是
未找到网络路径。
我已经检查了两台机器上的运行服务(RPC,Remote registery .....),它们正好是同样。
我想知道是否有任何配置允许访问



专柜


>远程地说我在第二台机器上丢失了。
情节如下:
我有一个工作组,不是域名,1台XP笔记本电脑(我有VS 2005),2
虚拟win2k3机器。运行代码时,提到的错误发生在





>以下行

Dim AllCountersCategories As PerformanceCounterCategory()=
PerformanceCounterCategory.GetCategories(strServe rName)

关于网络连接,我可以将连接映射到
windows explorer中的两个服务器。我用来记录tomy XP机器的用户和密码是





>机器。

错误信息真的没有给出任何线索,为什么我不能



检索


>第二台机器计数器,而它就像其他服务器的魅力一样。
提前感谢


谢谢史蒂文,我读了一些有趣信息的博客,但它不是b $ b不适用于我的背景。

是的,我正在通过一个帐户运行相同的用户名/密码3 mac

hines并且都在管理员组中声明。

所以,我认为我不应该需要应用博客中提到的说明


" Steven Cheng [MSFT]"写道:


您好Salam,


从您的描述中,您正在使用.NET性能计数器打开

计数器在远程机器上,但是,你得到以下错误,对吗?


" System.ComponentModel.Win32Exception"错误。错误消息是

未找到网络路径。



基于我的研究,到目前为止远程性能计数器访问,

后面的博客文章提到了一些信息:


#如何在没有管理员权限的情况下阅读性能计数器[Ryan

Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx


另外,正如你提到的非域环境,我认为它也与问题有关。

。我已经在我的身边进行了测试,在一个领域

环境中,我可以正确运行您提供的代码(如果我尝试在本地帐户下运行
,则会发生这样的事件) ,两台机器上都有相同的用户名/密码。

您是否在一台帐户上运行了两台

机器上的用户名/密码,是否为管理员帐户?


此致,

Steven Cheng


Microsoft MSDN在线支持主管


让客户满意是我们的首要任务。我们欢迎您的意见和

有关我们如何改进我们为您提供的支持的建议。请

随时让我的经理知道您对服务水平的看法

提供。您可以直接向我的经理发送反馈:
ms****@microsoft.com


========================================== ========

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有赋予任何权利。


--------------------


来自:=?Utf-8?B?U2FsYW1FbGlhcw ==?=< el ****** @ online.nospam>

主题:performancecounter对象和远程服务器

日期:2008年5月27日星期二01:24:00 -0700



有没人工作过用performancecounter对象访问

远程机器上的计数器?

我设法编写代码来检索远程的计数器类别

机器,当我尝试我得到的另一台远程机器

" System.ComponentModel.Win32Exception"错误。错误消息是

未找到网络路径。

我已经检查了两者的运行服务(RPC,Remote registery .....) />
机器和它们完全相同。

我想知道是否有任何配置允许访问



专柜


远程我在第二台机器上丢失了。

情节如下:

我有一个工作组,而不是一个域,一台XP笔记本电脑(我有VS 2005),2

虚拟win2k3机器。运行代码时,提到的错误发生在





以下行


Dim AllCountersCategories As PerformanceCounterCategory()=

PerformanceCounterCategory.GetCategories(strServer名称)


关于网络连接,我可以映射连接

windows explorer中的两台服务器。我用来记录tomy XP机器的用户和密码是





在两台机器上创建。


错误信息真的没有给出任何线索,为什么我不能



检索


第二台机器计数器,而它与其他

服务器的魅力相似。

提前感谢



要100%确定,尽管用户在管理员组中,我还是

在我遇到问题的机器上的PERF mon组中添加了用户,我

得到完全相同的错误


" Steven Cheng [ MSFT] QUOT;写道:


您好Salam,


从您的描述中,您正在使用.NET性能计数器打开

计数器在远程机器上,但是,你得到以下错误,对吗?


" System.ComponentModel.Win32Exception"错误。错误消息是

未找到网络路径。



基于我的研究,到目前为止远程性能计数器访问,

后面的博客文章提到了一些信息:


#如何在没有管理员权限的情况下阅读性能计数器[Ryan

Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx


另外,正如你提到的非域环境,我认为它也与问题有关。

。我已经在我的身边进行了测试,在一个领域

环境中,我可以正确运行您提供的代码(如果我尝试在本地帐户下运行
,则会发生这样的事件) ,两台机器上都有相同的用户名/密码。

您是否在一台帐户上运行了两台

机器上的用户名/密码,是否为管理员帐户?


此致,

Steven Cheng


Microsoft MSDN在线支持主管


让客户满意是我们的首要任务。我们欢迎您的意见和

有关我们如何改进我们为您提供的支持的建议。请

随时让我的经理知道您对服务水平的看法

提供。您可以直接向我的经理发送反馈:
ms****@microsoft.com


========================================== ========

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有赋予任何权利。


--------------------


来自:=?Utf-8?B?U2FsYW1FbGlhcw ==?=< el ****** @ online.nospam>

主题:performancecounter对象和远程服务器

日期:2008年5月27日星期二01:24:00 -0700



有没人工作过用performancecounter对象访问

远程机器上的计数器?

我设法编写代码来检索远程的计数器类别

机器,当我尝试我得到的另一台远程机器

" System.ComponentModel.Win32Exception"错误。错误消息是

未找到网络路径。

我已经检查了两者的运行服务(RPC,Remote registery .....) />
机器和它们完全相同。

我想知道是否有任何配置允许访问



专柜


远程我在第二台机器上丢失了。

情节如下:

我有一个工作组,而不是一个域,一台XP笔记本电脑(我有VS 2005),2

虚拟win2k3机器。运行代码时,提到的错误发生在





以下行


Dim AllCountersCategories As PerformanceCounterCategory()=

PerformanceCounterCategory.GetCategories(strServer名称)


关于网络连接,我可以映射连接

windows explorer中的两台服务器。我用来记录tomy XP机器的用户和密码是





在两台机器上创建。


错误信息真的没有给出任何线索,为什么我不能



检索


第二台机器计数器,而它与其他

服务器的魅力相似。

提前感谢



Has anybody worked with performancecounter object to access counters on
remote machine?
I managed to write code that retrieves counters categories froma remote
machine, when I try another remote machine I get
"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."
I have checked running services (RPC, Remote registery.....) on both
machines and they are exactly the same.
I am wondering if there is anything to configure to allow access to counters
remotly that I am missing on the 2nd machine.
The scenarion is as follows :
I have a workgroup,not a domain, 1 XP laptop (where I have VS 2005), 2
virtual win2k3 machines. when runing the code, the mentioned error happens at
the following line

Dim AllCountersCategories As PerformanceCounterCategory() =
PerformanceCounterCategory.GetCategories(strServer Name)

Regarding network connection, I can map a connection to both servers in
windows explorer. the user and password I use to log tomy XP machine are also
created on both machines.

The error message really doesn''t give any clue why I am not able to retrieve
the 2nd machines counters whereas it it works like a charm with the other
server.
Thanksd in advance

解决方案

Hi Salam,

From your description, you''re using the .NET performance counter to open
counters on remote machine, however, you got the following error, correct?

>"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."

based on my research, so far for remote performance counter accessing, the
following blog entry has mentioned some information:

#How to Read Performance Counters Without Administrator Privileges [Ryan
Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx

Also, as you mentioned the non-domain environment, I think it is also
related to the problem. I''ve performenced tests on my side, in a domain
environment, I can get the code you provided run correctly(event if I try
running under a local account, has same username/password on both machine).
Are you running through an account has same username/password on both
machine and is it an administrator account?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>From: =?Utf-8?B?U2FsYW1FbGlhcw==?= <el******@online.nospam>
Subject: performancecounter object and remote server
Date: Tue, 27 May 2008 01:24:00 -0700

>
Has anybody worked with performancecounter object to access counters on
remote machine?
I managed to write code that retrieves counters categories froma remote
machine, when I try another remote machine I get
"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."
I have checked running services (RPC, Remote registery.....) on both
machines and they are exactly the same.
I am wondering if there is anything to configure to allow access to

counters

>remotly that I am missing on the 2nd machine.
The scenarion is as follows :
I have a workgroup,not a domain, 1 XP laptop (where I have VS 2005), 2
virtual win2k3 machines. when runing the code, the mentioned error happens

at

>the following line

Dim AllCountersCategories As PerformanceCounterCategory() =
PerformanceCounterCategory.GetCategories(strServe rName)

Regarding network connection, I can map a connection to both servers in
windows explorer. the user and password I use to log tomy XP machine are

also

>created on both machines.

The error message really doesn''t give any clue why I am not able to

retrieve

>the 2nd machines counters whereas it it works like a charm with the other
server.
Thanksd in advance


Thanks Steven, I read the blog which has interesting information but it
doesn''t apply to my context.
Yes, I am running through an account has same username/password on 3 mac
hines and which are all declared in administrators group.
So, I think I should not need to apply instructions mentioned in the blog

"Steven Cheng [MSFT]" wrote:

Hi Salam,

From your description, you''re using the .NET performance counter to open
counters on remote machine, however, you got the following error, correct?

"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."


based on my research, so far for remote performance counter accessing, the
following blog entry has mentioned some information:

#How to Read Performance Counters Without Administrator Privileges [Ryan
Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx

Also, as you mentioned the non-domain environment, I think it is also
related to the problem. I''ve performenced tests on my side, in a domain
environment, I can get the code you provided run correctly(event if I try
running under a local account, has same username/password on both machine).
Are you running through an account has same username/password on both
machine and is it an administrator account?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?U2FsYW1FbGlhcw==?= <el******@online.nospam>
Subject: performancecounter object and remote server
Date: Tue, 27 May 2008 01:24:00 -0700


Has anybody worked with performancecounter object to access counters on
remote machine?
I managed to write code that retrieves counters categories froma remote
machine, when I try another remote machine I get
"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."
I have checked running services (RPC, Remote registery.....) on both
machines and they are exactly the same.
I am wondering if there is anything to configure to allow access to

counters

remotly that I am missing on the 2nd machine.
The scenarion is as follows :
I have a workgroup,not a domain, 1 XP laptop (where I have VS 2005), 2
virtual win2k3 machines. when runing the code, the mentioned error happens

at

the following line

Dim AllCountersCategories As PerformanceCounterCategory() =
PerformanceCounterCategory.GetCategories(strServer Name)

Regarding network connection, I can map a connection to both servers in
windows explorer. the user and password I use to log tomy XP machine are

also

created on both machines.

The error message really doesn''t give any clue why I am not able to

retrieve

the 2nd machines counters whereas it it works like a charm with the other
server.
Thanksd in advance



To be 100% sure, and in spite of the fact the the user is in admin group, I
added the user in the PERF mon group on the machine where I have problems, I
get exactly the same error

"Steven Cheng [MSFT]" wrote:

Hi Salam,

From your description, you''re using the .NET performance counter to open
counters on remote machine, however, you got the following error, correct?

"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."


based on my research, so far for remote performance counter accessing, the
following blog entry has mentioned some information:

#How to Read Performance Counters Without Administrator Privileges [Ryan
Byington]
http://blogs.msdn.com/bclteam/archiv...08/746900.aspx

Also, as you mentioned the non-domain environment, I think it is also
related to the problem. I''ve performenced tests on my side, in a domain
environment, I can get the code you provided run correctly(event if I try
running under a local account, has same username/password on both machine).
Are you running through an account has same username/password on both
machine and is it an administrator account?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?U2FsYW1FbGlhcw==?= <el******@online.nospam>
Subject: performancecounter object and remote server
Date: Tue, 27 May 2008 01:24:00 -0700


Has anybody worked with performancecounter object to access counters on
remote machine?
I managed to write code that retrieves counters categories froma remote
machine, when I try another remote machine I get
"System.ComponentModel.Win32Exception" error. Error message is
"The network path was not found."
I have checked running services (RPC, Remote registery.....) on both
machines and they are exactly the same.
I am wondering if there is anything to configure to allow access to

counters

remotly that I am missing on the 2nd machine.
The scenarion is as follows :
I have a workgroup,not a domain, 1 XP laptop (where I have VS 2005), 2
virtual win2k3 machines. when runing the code, the mentioned error happens

at

the following line

Dim AllCountersCategories As PerformanceCounterCategory() =
PerformanceCounterCategory.GetCategories(strServer Name)

Regarding network connection, I can map a connection to both servers in
windows explorer. the user and password I use to log tomy XP machine are

also

created on both machines.

The error message really doesn''t give any clue why I am not able to

retrieve

the 2nd machines counters whereas it it works like a charm with the other
server.
Thanksd in advance



这篇关于performancecounter对象和远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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