Cisco cpus and memory pools -- update November 11, 2010

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

knobdy wrote:
ehall wrote:Do any of the working routers show a description other than "onboard CPU"?
No, all that work use that description - these two routers don't return anything...
I am surprised that none of your 7200s reports a processor type.

Issue the command "snmpwalk -v 1 -c 02r <routername> 1.3.6.1.4.1.9.9.109.1.1.1.1.2" to get a list of CPU types. If they all come back as zero then they really don't have a processor description.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

knobdy wrote:Why wouldn't changing the average to a "max" work?
I don't know but that's usually the case for me too. I think the graph "average" stores multiple samples in the database and switching between that and max requires multiple additional samples for things to get realigned. I don't know though.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

ehall wrote:Issue the command "snmpwalk -v 1 -c 02r <routername> 1.3.6.1.4.1.9.9.109.1.1.1.1.2" to get a list of CPU types. If they all come back as zero then they really don't have a processor description.
For the one that isn't working:
02n:/usr/share/cacti # snmpwalk -v 1 -c 02r 2r4 1.3.6.1.4.1.9.9.109.1.1.1.1.2
End of MIB

The one that IS working:
02n:/usr/share/cacti # snmpwalk -v 1 -c 02r 2r1 1.3.6.1.4.1.9.9.109.1.1.1.1.2
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.1 = INTEGER: 0
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.3 = INTEGER: 0
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

ehall wrote:I don't know but that's usually the case for me too. I think the graph "average" stores multiple samples in the database and switching between that and max requires multiple additional samples for things to get realigned. I don't know though.
Report as bug?!
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

knobdy wrote:For the one that isn't working:

02n:/usr/share/cacti # snmpwalk -v 1 -c 02r 2r4 1.3.6.1.4.1.9.9.109.1.1.1.1.2
End of MIB
That means the target device doesn't implement the MIB. Maybe it's got an ancient IOS? Are you sure it's a Cisco router? Does the native cacti Cisco CPU graph work (if so you'll probably need to use that one)?

The attached adds a little robustness in the face of such an event. Meaning that it errors out when no CPUs are found.
The one that IS working:
02n:/usr/share/cacti # snmpwalk -v 1 -c 02r 2r1 1.3.6.1.4.1.9.9.109.1.1.1.1.2
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.1 = INTEGER: 0
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.3 = INTEGER: 0
zero means generic CPU so "onboard CPU" (my terminology) is correct
Last edited by ehall on Wed Feb 01, 2006 4:39 pm, edited 1 time in total.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

ehall wrote:That means the target device doesn't implement the MIB. Maybe it's got an ancient IOS? Are you sure it's a Cisco router? Does the native cacti Cisco CPU graph work (if so you'll probably need to use that one)?
It's not ancient - not the most recent though. It is a Cisco (as taken from the device page in Cacti):
System: Cisco Internetwork Operating System Software IOS (tm) 7200 Software (C7200-JK8S-M), Version 12.2(15)T5

The native graphs work - but the CPU one...sucks, to say the least. And these are big, "important" routers! :roll:

The troubling thing is that it DOES find the CPU for this router when I go to create the graph - it just never gets data. The memory isn't detected, however, the query just shows it's beyond the MIB (which is what I thought I could expect from the CPU query).

Just verified it again, but this IOS and image are supposed to support this OID ciscoMgmt (1.3.6.1.4.1.9.9) !!!!

You are going to laugh you butt off, but I figured out the problem.... view groups. All good now. :oops:
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

If it's all working, post a screenie of one of the multi-cpu routers once you have some data built up
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Well, okay, I still don't have proc for those 7200s, but you'll like the following. - {UPDATE} They are working and collecting data now. For some reason I had to recreate everything one more time.

And I would STILL like to not stack them, just have the third line follow the max of either... :cry:

But I'm not gonna cry about it...
Attachments
multi-proc.JPG
multi-proc.JPG (83.76 KiB) Viewed 7527 times
memory.JPG
memory.JPG (105.89 KiB) Viewed 7527 times
Maestro_Ba
Posts: 36
Joined: Tue Jun 06, 2006 10:53 am

Post by Maestro_Ba »

These templates are excellent!

I was going to build these templates myself, using the same OIDs. You really saved me a lot of work!

Thanks.
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

Glad you like them.. post some graphs
ehall
Cacti User
Posts: 246
Joined: Fri Dec 09, 2005 3:42 pm

Post by ehall »

The posted update contains a fix that converts the SNMP timeout value from Cacti's millisecond format to PHP/Net-SNMP microsecond format. The lack of conversion in the earlier script would sometimes result in excessive retries or complete failure.
oldsk8trbabe
Posts: 14
Joined: Thu Aug 31, 2006 9:22 am

Updated cisco_cpu_usage.php for version 0.8.7

Post by oldsk8trbabe »

Does anyone have the update for this script so it will work with the new version of Cacti 0.8.7? Getting the following:

PHP Warning: Missing argument 9 for cacti_snmp_get(), called in /usr/local/src/cacti-0.8.7/scripts/cisco_cpu_usage.php on line 296 and defined in /usr/local/src/cacti-0.8.7/lib/snmp.php on line 39

Thanks
looc
Cacti User
Posts: 110
Joined: Mon Aug 13, 2007 3:40 am

Post by looc »

total have error :cry:
Attachments
1.JPG
1.JPG (82.01 KiB) Viewed 5820 times
Cacti Version - 0.8.7 & spine
Plugin Architecture - 1.3
Server Info - Windows 2003 EP
Web Server -IIS6.0
PHP - 5.2.3
MySQL - 4.1.10
RRDTool - 1.2.15
SNMP - 5.4.1
--------------------------
plugins:
reportit 0.5.1|monitor 0.8.1|thold 0.3.8
skinty
Posts: 41
Joined: Sat Aug 12, 2006 6:47 pm

In case anyone needs it

Post by skinty »

To the author. This collection is excellent and it actually graphs Mem pools and CPUs from Aironet devices as well. So, if anyone is having difficulties in 0.8.7+, I made the adjustments to the cisco_cpu_usage.php script. It's not much, but maybe it will help some.
Attachments
cisco_cpu_usage.zip
(2.35 KiB) Downloaded 353 times
_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

Post by _CL »

looc wrote:total have error :cry:
I have two Cacti installations on Ubuntu 7.10. With 0.8.6j, I don't see the Total error. With 0.8.7b, I do see it.

I couldn't figure out the cause of the problem with 0.8.7b, but I did notice that the erroneous Total was twice the Used value. On a hunch, I created a CDEF that added a and c (instead of a and b). Bingo. It worked. I have no idea, but it's good enough for me now.

I named my new CDEF function "Add A to C (Hack for Cisco Router Memory Usage in place of Add A to B)". The CDEF is simply cdef=a,c,+

On my 0.8.7b installation.....

RRDtool 1.2.19
MySQL 5.0.45
Apache 2.2.4
PHP 5.2.3
CL
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest