|
|
| Author |
Message |
jbritton
Joined: 24 Jun 2008 Posts: 4
|
Posted: Tue Jun 24, 2008 1:30 pm Post subject: Get Any Windows Performance Monitor Counter (Program) |
|
|
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.
| Description: |
|
 Download |
| Filename: |
GetPerfmon-bin-1.4.zip |
| Filesize: |
17.02 KB |
| Downloaded: |
183 Time(s) |
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 6876 Location: WA, USA
|
|
| Back to top |
|
 |
ejensen Cacti User
Joined: 12 Jul 2004 Posts: 55
|
Posted: Thu Jun 26, 2008 9:21 am Post subject: |
|
|
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
|
Posted: Thu Jun 26, 2008 9:35 am Post subject: |
|
|
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
|
Posted: Thu Jun 26, 2008 9:43 am Post subject: |
|
|
| 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: 34
|
Posted: Fri Jun 27, 2008 2:57 am Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
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
|
Posted: Fri Jun 27, 2008 10:31 am Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
| 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
|
Posted: Fri Jun 27, 2008 10:33 am Post subject: re: Feature Request |
|
|
| 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: 34
|
Posted: Fri Jun 27, 2008 1:22 pm Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
| 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
|
Posted: Fri Jun 27, 2008 3:53 pm Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
| 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.
| Description: |
|
 Download |
| Filename: |
GetPerfmon.zip |
| Filesize: |
17.35 KB |
| Downloaded: |
200 Time(s) |
|
|
| Back to top |
|
 |
Jesper
Joined: 11 Mar 2002 Posts: 34
|
Posted: Sat Jun 28, 2008 12:53 am Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
| 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
|
Posted: Wed Aug 20, 2008 2:23 pm Post subject: |
|
|
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 Guru User
Joined: 16 Oct 2006 Posts: 1007
|
Posted: Mon Sep 22, 2008 4:55 am Post subject: Re: Get Any Windows Performance Monitor Counter (Program) |
|
|
| 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 |
|
 |
|