SNMP-Informant-STD CPU Usage (Windows)
Moderators: Developers, Moderators
SNMP-Informant-STD CPU Usage (Windows)
This uses the SNMP-Informants Standard MIB Add-On to graph CPU stats on Windows.
You must have SNMP-Informant Standard MIB Add-On install on the Windows host you are polling in order for this to work. If you are not familiar with SNMP-Informant, it is a free download, and is extremely stable, since it does not add any services to the machine.
I have tested this on various machines from 1 CPU to 8, and they all seem very acurate.
Image to follow on the next post… the forums should let you attach more…
What it Graphs
--------------------
* Processor Time (Totally CPU Usage)
* User Time (User CPU Usage)
* Privileged Time (Operating System and all other Privileged CPU Usage)
XML Data Query File
----------------------------
<interface>
<name>Win32 - Informant - CPU Stats</name>
<description>Using SNMP-Informant Queries a host for a list of CPU(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<cpuinformInstance>
<name>CPU Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid>
</cpuinformInstance>
<cpuinformPercentProcessorTime>
<name>Processor Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.5.1</oid>
</cpuinformPercentProcessorTime>
<cpuinformPercentUserTime>
<name>User Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.6.1</oid>
</cpuinformPercentUserTime>
<cpuinformPercentPrivilegedTime>
<name>Privleged Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.4.1</oid>
</cpuinformPercentPrivilegedTime>
</fields>
</interface>
You must have SNMP-Informant Standard MIB Add-On install on the Windows host you are polling in order for this to work. If you are not familiar with SNMP-Informant, it is a free download, and is extremely stable, since it does not add any services to the machine.
I have tested this on various machines from 1 CPU to 8, and they all seem very acurate.
Image to follow on the next post… the forums should let you attach more…
What it Graphs
--------------------
* Processor Time (Totally CPU Usage)
* User Time (User CPU Usage)
* Privileged Time (Operating System and all other Privileged CPU Usage)
XML Data Query File
----------------------------
<interface>
<name>Win32 - Informant - CPU Stats</name>
<description>Using SNMP-Informant Queries a host for a list of CPU(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<cpuinformInstance>
<name>CPU Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid>
</cpuinformInstance>
<cpuinformPercentProcessorTime>
<name>Processor Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.5.1</oid>
</cpuinformPercentProcessorTime>
<cpuinformPercentUserTime>
<name>User Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.6.1</oid>
</cpuinformPercentUserTime>
<cpuinformPercentPrivilegedTime>
<name>Privleged Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.4.1</oid>
</cpuinformPercentPrivilegedTime>
</fields>
</interface>
- Attachments
-
- cacti_data_query_win32_snmp_informant_cpu.xml
- (19.74 KiB) Downloaded 3022 times
-
- cacti_data_template_win32_snmp_informant_cpu.xml
- (7.79 KiB) Downloaded 2704 times
-
- cacti_graph_template_win32_snmp_informant_cpu.xml
- (18.21 KiB) Downloaded 3912 times
Last edited by ajeskey on Sun Apr 10, 2005 2:39 pm, edited 1 time in total.
The image labeled "informantcpu.JPG" had to be zoomed in a bit since the CPU is usualy maxed out.
"informantcpu2.JPG" should be a little better at describing what you will normaly see, well unless you run crazy number crunching applicatins like I do.
"informantcpu2.JPG" should be a little better at describing what you will normaly see, well unless you run crazy number crunching applicatins like I do.
- Attachments
-
- informantcpu.JPG (36.45 KiB) Viewed 35527 times
-
- informantcpu2.JPG (49.32 KiB) Viewed 35529 times
There are many out there that will do what you are looking for. You should really search the forums.
If you are looking for somethat *I* have done, I posted a disk one too, that was all of 2 lines below this post. Or again it's something that would have been found by searching.
http://forums.cacti.net/viewtopic.php?t=7148
I am currently working on a Memory counter too, it will use SNMP-Informant as well.
If you are looking for somethat *I* have done, I posted a disk one too, that was all of 2 lines below this post. Or again it's something that would have been found by searching.
http://forums.cacti.net/viewtopic.php?t=7148
I am currently working on a Memory counter too, it will use SNMP-Informant as well.
Having a slight problem with applying your templates:
Running on Fedora Core 2,Caci 0.8.6.d,php 4.3.11,net-snmp 5.2.1-10
I get data for each CPU, (graphing dual Intels w/HT on)
but not on the CPU - |query_cpuinformInstance|.
when I do a Verbose Query test on Win32 - SNMP - Informant - CPU I get:
cpuinformPercentProcessorTime
cpuinformPercentUserTime
cpuinformPercentPrivilegedTime
I get 5 instances , each CPU + HT and a total, but for some reason it's not graphing the total.
hmm..while I was double checking this, I noticed that sometimes the host did NOT return any data on the _Total instance..
IThe hosts I want to grap is all running Windows 2000, Microsoft SNMP + Informer Standard.
Anyone able to help me ?
Running on Fedora Core 2,Caci 0.8.6.d,php 4.3.11,net-snmp 5.2.1-10
I get data for each CPU, (graphing dual Intels w/HT on)
but not on the CPU - |query_cpuinformInstance|.
when I do a Verbose Query test on Win32 - SNMP - Informant - CPU I get:
I then fire up GetIf and manually query the :+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Located input field 'cpuinformInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Found item [cpuinformInstance='0'] index: 48 [from value]
+ Found item [cpuinformInstance='1'] index: 49 [from value]
+ Found item [cpuinformInstance='2'] index: 50 [from value]
+ Found item [cpuinformInstance='3'] index: 51 [from value]
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/win32_cpu.xml'
cpuinformPercentProcessorTime
cpuinformPercentUserTime
cpuinformPercentPrivilegedTime
I get 5 instances , each CPU + HT and a total, but for some reason it's not graphing the total.
hmm..while I was double checking this, I noticed that sometimes the host did NOT return any data on the _Total instance..
IThe hosts I want to grap is all running Windows 2000, Microsoft SNMP + Informer Standard.
Anyone able to help me ?
Per Kristiansen
It could be that you are running in "d" I still haven't upgraded.
I never use the "total_" I realize that it could be handy, but the returned value seems to be unstable coming out of SNMP Informant. But I may be speaking out of school on that (it's just my experiance)
When I finaly get around to upgrading to "d" I'll check this out.
I never use the "total_" I realize that it could be handy, but the returned value seems to be unstable coming out of SNMP Informant. But I may be speaking out of school on that (it's just my experiance)
When I finaly get around to upgrading to "d" I'll check this out.
- Aaron Jeskey
i need to create an wn32_cpu.xml with
<interface>
<name>Win32 - Informant - CPU Stats</name>
<description>Using SNMP-Informant Queries a host for a list of CPU(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<cpuinformInstance>
<name>CPU Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid>
</cpuinformInstance>
<cpuinformPercentProcessorTime>
<name>Processor Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.5.1</oid>
</cpuinformPercentProcessorTime>
<cpuinformPercentUserTime>
<name>User Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.6.1</oid>
</cpuinformPercentUserTime>
<cpuinformPercentPrivilegedTime>
<name>Privleged Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.4.1</oid>
</cpuinformPercentPrivilegedTime>
</fields>
</interface>
?
<interface>
<name>Win32 - Informant - CPU Stats</name>
<description>Using SNMP-Informant Queries a host for a list of CPU(s) and their stats</description>
<oid_index>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid_index>
<index_order_type>numeric</index_order_type>
<fields>
<cpuinformInstance>
<name>CPU Instance</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.1.1</oid>
</cpuinformInstance>
<cpuinformPercentProcessorTime>
<name>Processor Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.5.1</oid>
</cpuinformPercentProcessorTime>
<cpuinformPercentUserTime>
<name>User Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.6.1</oid>
</cpuinformPercentUserTime>
<cpuinformPercentPrivilegedTime>
<name>Privleged Time</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9600.1.1.5.1.4.1</oid>
</cpuinformPercentPrivilegedTime>
</fields>
</interface>
?
Well thats a good start at least you have the XML file in place now.
The file is obviously missing, or not accesable with the user account that you are running the sevice as. Does the file exist on the filesystem?
I would delete all the cpu data sources then go and recreate the graphs.
The file is obviously missing, or not accesable with the user account that you are running the sevice as. Does the file exist on the filesystem?
I would delete all the cpu data sources then go and recreate the graphs.
- Aaron Jeskey
This script need to be update as well for 0.8.6h, because win32_cpu.xml query result parsed by new version have invalid value. see the compare results.
old version
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Located input field 'cpuinformInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Found item [cpuinformInstance='0'] index: 48 [from value]
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
new version :
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Located input field 'cpuinformInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Found item [cpuinformInstance='End of MIB'] index: End of MIB [from value]
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
the new version use "End of Mib" as instance name so cause poller.php pull the invalid data.
old version
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Located input field 'cpuinformInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Found item [cpuinformInstance='0'] index: 48 [from value]
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'D:/cacti/resource/snmp_queries/win32_cpu.xml'
new version :
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Located input field 'cpuinformInstance' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9600.1.1.5.1.1.1'
+ Found item [cpuinformInstance='End of MIB'] index: End of MIB [from value]
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
+ Found data query XML file at 'G:/root/web/home.ausmis.com/cacti/resource/snmp_queries/win32_cpu.xml'
the new version use "End of Mib" as instance name so cause poller.php pull the invalid data.
Who is online
Users browsing this forum: No registered users and 5 guests