Get Any Windows Performance Monitor Counter (Program)
Moderators: Developers, Moderators
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.
I have created many scripts using this, I will post some templates later.
- Attachments
-
- GetPerfmon-bin-1.4.zip
- (17.02 KiB) Downloaded 653 times
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.
Always a good thing to have variety.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
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.
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.
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
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
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
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.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
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.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
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
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
Re: Get Any Windows Performance Monitor Counter (Program)
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.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
re: Feature Request
I will look into this, there should be a way to enumerate the counters (currently I don't)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
Re: Get Any Windows Performance Monitor Counter (Program)
Yes, I have commas in Instances. I'm not sure that pipe is a good choice at the command prompt, or?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.
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
Re: Get Any Windows Performance Monitor Counter (Program)
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.Jesper wrote:Yes, I have commas in Instances. I'm not sure that pipe is a good choice at the command prompt, or?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.
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
- Attachments
-
- GetPerfmon.zip
- Executable version 1.5
- (17.35 KiB) Downloaded 595 times
Re: Get Any Windows Performance Monitor Counter (Program)
JBritton,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.
Works perfect, thanks again!
/Jesper
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Re: Get Any Windows Performance Monitor Counter (Program)
Any chances of posting your templates ?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.
Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Who is online
Users browsing this forum: No registered users and 3 guests