CPU Usage for Solaris
Moderators: Developers, Moderators
CPU Usage for Solaris
The Default ucd/net - CPU Usage graph and data template extension for Solaris enviroment
- Attachments
-
- cacti_graph_template_cpu_usage_by_balint_2.xml
- (28.16 KiB) Downloaded 6221 times
-
- screenshot
- cpu_usage.png (9.45 KiB) Viewed 76425 times
I get this error when trying to run that:
Notice: Undefined index: oid_index in /home/cacti/html/cacti/lib/data_query.php on line 129
Notice: Undefined index: oid_index in /home/cacti/html/cacti/lib/data_query.php on line 131
Warning: Variable passed to each() is not an array or object in /home/cacti/html/cacti/lib/data_query.php on line 141
Warning: Cannot modify header information - headers already sent by (output started at /home/cacti/html/cacti/lib/data_query.php:129) in /home/cacti/html/cacti/host.php on line 92
anyone have an idea? I am using 0.8.5 and tryed this on solaris and redhat
Notice: Undefined index: oid_index in /home/cacti/html/cacti/lib/data_query.php on line 129
Notice: Undefined index: oid_index in /home/cacti/html/cacti/lib/data_query.php on line 131
Warning: Variable passed to each() is not an array or object in /home/cacti/html/cacti/lib/data_query.php on line 141
Warning: Cannot modify header information - headers already sent by (output started at /home/cacti/html/cacti/lib/data_query.php:129) in /home/cacti/html/cacti/host.php on line 92
anyone have an idea? I am using 0.8.5 and tryed this on solaris and redhat
-
- Posts: 8
- Joined: Thu Jan 27, 2005 2:12 pm
Hi!
Was looking to implement this on my SUN server as a client to get these monitoring in my linux monitor box. I'm doing snmpwalk like this over the SUN server from my linux monitoring box:
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.53.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawIdle.0
[root@mload root]# snmpget -v1-c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.55.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawKernel.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.52.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawSystem.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.50.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawUser.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.54.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawWait.0
Tried to do snmpwalk from my SUN server directly, and no luck at all. Do I need to do something special on my SUN server SNMP configuration to view that MIB?
Thanks for the help!
Was looking to implement this on my SUN server as a client to get these monitoring in my linux monitor box. I'm doing snmpwalk like this over the SUN server from my linux monitoring box:
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.53.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawIdle.0
[root@mload root]# snmpget -v1-c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.55.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawKernel.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.52.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawSystem.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.50.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawUser.0
[root@mload root]# snmpget -v1 -c user1 xxx.xxx.xxx.xxx .1.3.6.1.4.1.2021.11.54.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawWait.0
Tried to do snmpwalk from my SUN server directly, and no luck at all. Do I need to do something special on my SUN server SNMP configuration to view that MIB?
Thanks for the help!
Hi hbokh!
I'm working with the same netsnmp version (5.1.1), with openssl 0.9.7d, and libgcc 3.4.1. No luck at all in Solaris 8 and Solaris 9. Same problem in two servers ... returning as follows:
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawIdle.0
Am I missing anything else?¿ SNMP special configuration needed?¿ Any MIB I don't have in my servers?¿
TIA.
I'm working with the same netsnmp version (5.1.1), with openssl 0.9.7d, and libgcc 3.4.1. No luck at all in Solaris 8 and Solaris 9. Same problem in two servers ... returning as follows:
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ssCpuRawIdle.0
Am I missing anything else?¿ SNMP special configuration needed?¿ Any MIB I don't have in my servers?¿
TIA.
Working Solaris config
Hey all, this is my first post on the forum. Sorry if this is mentioned anywhere else.
I've set up Cacti on both Solaris and Linux with a 2.6 kernel.
The included CPU usage graphs don't break down CPU properly for either, although mostly because the wrong items are tallied up. It would work fine on a Linux 2.4 kernel.
I made copies of the included graph template, added the new data sources, and then changed one template to run with Linux 2.6, and the other for Solaris (and added a new host template). I also added Idle time to the graph, which is mostly useful for seeing when here are problems collecting the CPU data, and/or to see if your values are wrong. Yes, you'll need net-snmp. On Solaris, you can either replace the existing Solaris agent, or just run one on a different port.
For Linux 2.6, you will need to graph:
Idle CPU Data Source (if you want it)
Nice CPU Data Source
System CPU Data Source
User CPU Data Source
Wait CPU Data Source
For Solaris, you will need to graph:
Idle CPU Data Source (if you want it)
Kernel CPU Data Source
User CPU Data Source
Wait CPU Data Source
DON'T graph both kernel and system CPU. On Solaris, "system" CPU is just "kernel" and "wait" added together. On Linux 2.6, "kernel" is ... "system" and "idle", I think? So, including both will cause your non-idle time to be inaccurate.
ALSO, note that the figures are NOT percentages, as the graph suggests. They are ticks per second, as reported by the kernel. This is most noticable with a multi-CPU Linux 2.6 kernel machine, where your total ticks will be 100xProcessors. If you have a single processor Linux machine, or a Solaris machine, then they will just appear to be percentages as the kernel will tally ticks at 100 per second.
Hope this helps!
I've set up Cacti on both Solaris and Linux with a 2.6 kernel.
The included CPU usage graphs don't break down CPU properly for either, although mostly because the wrong items are tallied up. It would work fine on a Linux 2.4 kernel.
I made copies of the included graph template, added the new data sources, and then changed one template to run with Linux 2.6, and the other for Solaris (and added a new host template). I also added Idle time to the graph, which is mostly useful for seeing when here are problems collecting the CPU data, and/or to see if your values are wrong. Yes, you'll need net-snmp. On Solaris, you can either replace the existing Solaris agent, or just run one on a different port.
For Linux 2.6, you will need to graph:
Idle CPU Data Source (if you want it)
Nice CPU Data Source
System CPU Data Source
User CPU Data Source
Wait CPU Data Source
For Solaris, you will need to graph:
Idle CPU Data Source (if you want it)
Kernel CPU Data Source
User CPU Data Source
Wait CPU Data Source
DON'T graph both kernel and system CPU. On Solaris, "system" CPU is just "kernel" and "wait" added together. On Linux 2.6, "kernel" is ... "system" and "idle", I think? So, including both will cause your non-idle time to be inaccurate.
ALSO, note that the figures are NOT percentages, as the graph suggests. They are ticks per second, as reported by the kernel. This is most noticable with a multi-CPU Linux 2.6 kernel machine, where your total ticks will be 100xProcessors. If you have a single processor Linux machine, or a Solaris machine, then they will just appear to be percentages as the kernel will tally ticks at 100 per second.
Hope this helps!
Hi cih,
When you run this command
is there anything like this?
If not, is there a file called /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
on your system (readable, etc.)?
Notice the -v 2c !! I also run SNMP v2 in Cacti.
Cheers, Henk
When you run this command
Code: Select all
snmpwalk -v 2c -c public -m ALL localhost .1.3 > SNMP.txt
Code: Select all
# grep Cpu SNMP.txt
UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 8
UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 7
UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 86
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 1453570
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 10130334
UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 448662615
UCD-SNMP-MIB::ssCpuRawWait.0 = Counter32: 2696585
UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 7433749
on your system (readable, etc.)?
Notice the -v 2c !! I also run SNMP v2 in Cacti.
Cheers, Henk
This is my sick nature...
CPU stats - templates
Just a note to everyone doing this- not all of these CPU values are present on a given architecture. For example, Linux 2.6 will have "nice" CPU, but Solaris does not. And, not all versions of net-snmp have support for them.hbokh wrote:Hi cih,
When you run this commandis there anything like this?Code: Select all
snmpwalk -v 2c -c public -m ALL localhost .1.3 > SNMP.txt
If not, is there a file called /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txtCode: Select all
# grep Cpu SNMP.txt UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 8 UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 7 UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 86 UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 1453570 UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 10130334 UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 448662615 UCD-SNMP-MIB::ssCpuRawWait.0 = Counter32: 2696585 UCD-SNMP-MIB::ssCpuRawKernel.0 = Counter32: 7433749
on your system (readable, etc.)?
Notice the -v 2c !! I also run SNMP v2 in Cacti.
Cheers, Henk
I've attached both of my graph templates, so people can try them out.
One note for these graphs is that they shows CPU in ticks, not percentages. I prefer it this way because timing of when each data source is collected (for a machine which usage fluctuates) can cause the sum of the data to be higher or lower than 100 t/s (or more, for some multi-CPU systems), and making the data into a percentage could make the values incorrect. If you do want percentages, you can just make a CDEF.
- Attachments
-
- cacti_graph_template_ucdnet_cpu_usage_linux_2_6.xml
- ucd/net - CPU Usage - Linux 2.6
- (28.08 KiB) Downloaded 2604 times
-
- cacti_graph_template_ucdnet_cpu_usage_solaris.xml
- ucd/net - CPU Usage - Solaris
- (23.41 KiB) Downloaded 4297 times
Hi hbokh!
When I run snmpwalk -v 2c -c public -m ALL localhost .1.3 > SNMP.txt in my Solaris 8 or Solaris 9 boxes, result is:
Timeout: No Response from localhost.
File /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt exists and is readable for all.
Is posible version 2c is not running?¿ I can`t get anything from version 2c ... Am I missing something in my snmp config?
When I run snmpwalk -v 2c -c public -m ALL localhost .1.3 > SNMP.txt in my Solaris 8 or Solaris 9 boxes, result is:
Timeout: No Response from localhost.
File /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt exists and is readable for all.
Is posible version 2c is not running?¿ I can`t get anything from version 2c ... Am I missing something in my snmp config?
I believe that net-snmp returns that object only as of version 5.2, which is probably the issue.stigmata wrote:Hi dgamble,
thx for your great CPU-Script. I use the one for the 2.6 linux kernel. It works great but one thing, I get a "nan" at the "Wait" value (but this is very importend for me ).
What can I do?
Regards,
Oliver
Who is online
Users browsing this forum: No registered users and 5 guests