Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Get Any Windows Performance Monitor Counter (Program)

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
jbritton



Joined: 24 Jun 2008
Posts: 4

PostPosted: Tue Jun 24, 2008 1:30 pm    Post subject: Get Any Windows Performance Monitor Counter (Program) Reply with quote

I have created a .NET executable that allows you to get any perfmon statistic from the command line. There is a README.TXT included to explain how to use it. Also, the tool is an open source project on Sourceforge: http://sourceforge.net/projects/getperfmon

I have created many scripts using this, I will post some templates later.



GetPerfmon-bin-1.4.zip
 Description:

Download
 Filename:  GetPerfmon-bin-1.4.zip
 Filesize:  17.02 KB
 Downloaded:  163 Time(s)

Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6767
Location: WA, USA

PostPosted: Tue Jun 24, 2008 6:27 pm    Post subject: Reply with quote

You realize another user had already created something like this too: http://forums.cacti.net/viewtopic.php?t=25600

Always a good thing to have variety.
Back to top
ejensen
Cacti User


Joined: 12 Jul 2004
Posts: 55

PostPosted: Thu Jun 26, 2008 9:21 am    Post subject: Reply with quote

I looked into using both of these yesturday and so far I have to say I like this one better because of ease of use. This one allows you to specify perfmon counters by name and therefore you dont have to know the OIDs and index numbers for each server you want to monitor. Plus with this one you dont have to load any agents (dll's) on the servers, just run this utility and point it to a host along with the perfmon counter you want and it quickly returns the results.

I think anyone looking to impliment perfmon counters should really give this script a try.

Like you said BSOD Always good to have variety.

Keep up the good work jbritton and I look forward to you posting your scripts.
Back to top
ejensen
Cacti User


Joined: 12 Jul 2004
Posts: 55

PostPosted: Thu Jun 26, 2008 9:35 am    Post subject: Reply with quote

I do have a 'feature request' for this program that you wrote jbritton.

Would it be possible to enable wild cards in the "instancename" field?

Here is an example I am trying to get around:
I want to graph "Network Interface \ Output Queue Length" but the instance name is always the name of the NIC in the server, and can be different for each server. There is no _Total for this counter.

I imagine I could get Cacti to first index all the names of the NICs and then display them for me to choose which one to graph this counter, but I'm not that smart with Cacti yet... will look into that soon.

It would be nice to be able to use a wild card or index number or maybe aggregated total for all indexes.

so the command would look like this:
"GetPerfMon.exe host "Network Interface,Output Queue Length,@,Total"

Any thoughts on this?

thanks,
Eric
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Thu Jun 26, 2008 9:43 am    Post subject: Reply with quote

ejensen wrote:
I do have a 'feature request' for this program that you wrote jbritton.

Would it be possible to enable wild cards in the "instancename" field?

Here is an example I am trying to get around:
I want to graph "Network Interface \ Output Queue Length" but the instance name is always the name of the NIC in the server, and can be different for each server. There is no _Total for this counter.

I imagine I could get Cacti to first index all the names of the NICs and then display them for me to choose which one to graph this counter, but I'm not that smart with Cacti yet... will look into that soon.

It would be nice to be able to use a wild card or index number or maybe aggregated total for all indexes.

so the command would look like this:
"GetPerfMon.exe host "Network Interface,Output Queue Length,@,Total"

Any thoughts on this?

thanks,
Eric


I cannot be sure about this particular program, but in other cases where you're reading performance counters remotely, you cannot wildcard the counter you're trying to read. It must be called explicitly.

What you can do is build a script that takes the name of the interface on the command line and passes it in as a variable and then concatenated with the rest of the performance counter information.
Back to top
Jesper



Joined: 11 Mar 2002
Posts: 33

PostPosted: Fri Jun 27, 2008 2:57 am    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

Thank you Jbritton,

This is brilliant!!! One question though; what if there are commas in either Object, Counter or Instance? How to I specify the arguments in such a case?

--
Greetings
/Jesper
Back to top
jbritton



Joined: 24 Jun 2008
Posts: 4

PostPosted: Fri Jun 27, 2008 10:31 am    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

Jesper wrote:
Thank you Jbritton,

This is brilliant!!! One question though; what if there are commas in either Object, Counter or Instance? How to I specify the arguments in such a case?

--
Greetings
/Jesper


Do you have a counter that has a comma in it? I can change the seperator to something more unusual, like the pipe or something.
Back to top
jbritton



Joined: 24 Jun 2008
Posts: 4

PostPosted: Fri Jun 27, 2008 10:33 am    Post subject: re: Feature Request Reply with quote

ejensen wrote:
I do have a 'feature request' for this program that you wrote jbritton.

Would it be possible to enable wild cards in the "instancename" field?

Here is an example I am trying to get around:
I want to graph "Network Interface \ Output Queue Length" but the instance name is always the name of the NIC in the server, and can be different for each server. There is no _Total for this counter.

I imagine I could get Cacti to first index all the names of the NICs and then display them for me to choose which one to graph this counter, but I'm not that smart with Cacti yet... will look into that soon.

It would be nice to be able to use a wild card or index number or maybe aggregated total for all indexes.

so the command would look like this:
"GetPerfMon.exe host "Network Interface,Output Queue Length,@,Total"

Any thoughts on this?

thanks,
Eric


I will look into this, there should be a way to enumerate the counters (currently I don't)
Back to top
Jesper



Joined: 11 Mar 2002
Posts: 33

PostPosted: Fri Jun 27, 2008 1:22 pm    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

jbritton wrote:

Do you have a counter that has a comma in it? I can change the seperator to something more unusual, like the pipe or something.

Yes, I have commas in Instances. I'm not sure that pipe is a good choice at the command prompt, or?

How about letting us specify the separator? Or use backslash just as shown in PerfMon's graph properties on Data tab.

Thanks a lot!
/Jesper
Back to top
jbritton



Joined: 24 Jun 2008
Posts: 4

PostPosted: Fri Jun 27, 2008 3:53 pm    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

Jesper wrote:
jbritton wrote:

Do you have a counter that has a comma in it? I can change the seperator to something more unusual, like the pipe or something.

Yes, I have commas in Instances. I'm not sure that pipe is a good choice at the command prompt, or?

How about letting us specify the separator? Or use backslash just as shown in PerfMon's graph properties on Data tab.

Thanks a lot!
/Jesper


I like the idea of specifying it on the command line. I added -s[Separator] where the Separator is a character to use to separate the different parts of the Counter.



GetPerfmon.zip
 Description:
Executable version 1.5

Download
 Filename:  GetPerfmon.zip
 Filesize:  17.35 KB
 Downloaded:  175 Time(s)

Back to top
Jesper



Joined: 11 Mar 2002
Posts: 33

PostPosted: Sat Jun 28, 2008 12:53 am    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

jbritton wrote:
I like the idea of specifying it on the command line. I added -s[Separator] where the Separator is a character to use to separate the different parts of the Counter.

JBritton,
Works perfect, thanks again!
/Jesper
Back to top
otherguy



Joined: 28 Apr 2007
Posts: 5

PostPosted: Wed Aug 20, 2008 2:23 pm    Post subject: Reply with quote

Does anyone have any templates for this that they could upload? Or could someone explain how to set them up?

I want to be able to choose or specify the counter(s) when creating a new graph but I am not sure exactly how to set it up.
Back to top
mcutting
Cacti Pro User


Joined: 16 Oct 2006
Posts: 966

PostPosted: Mon Sep 22, 2008 4:55 am    Post subject: Re: Get Any Windows Performance Monitor Counter (Program) Reply with quote

jbritton wrote:
I have created a .NET executable that allows you to get any perfmon statistic from the command line. There is a README.TXT included to explain how to use it. Also, the tool is an open source project on Sourceforge: http://sourceforge.net/projects/getperfmon

I have created many scripts using this, I will post some templates later.


Any chances of posting your templates ?

Thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group