Cisco cpus and memory pools -- update November 11, 2010
Moderators: Developers, Moderators
Looking good so far - will let you know about the graphs in five minutes:ehall wrote:Try this, same drill as last time, refresh data query and post output from verbose please
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 index'
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuIndex'
+ Found item [cpuIndex='1'] index: 1
+ Found item [cpuIndex='3'] index: 3
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuName'
+ Found item [cpuName='CPU1'] index: 1
+ Found item [cpuName='CPU3'] index: 3
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuDesc'
+ Found item [cpuDesc='onboard CPU'] index: 1
+ Found item [cpuDesc='onboard CPU'] index: 3
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
remember you may need to use the older OIDs with that router too. You can test this with the following:
Results like "1:nn" (where nn is the 1min cpu load) means it worked, while something other than nn means it didn't
I should probably put a test into the code for that actually
Code: Select all
/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query oneMin
/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query fiveMin
I should probably put a test into the code for that actually
That seemed to work - AFTER I changed the OIDs...not sure why I forgot that!ehall wrote:I should probably put a test into the code for that actually
Code: Select all
php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1.com, 02r, 1, , , 161, 500 query oneMin
1:6
3:1
well... can I change them back, to run this test from the CLI, without recreating all of my graphs and data sources (which are all now working for all devices)?ehall wrote:What is the result when the newer OIDs are used? (I need to know what the error looks like to trap it).
Also, I was going to ask if there's a way to configure the graph template to show 100% rather than just the max?
You can just copy the script to a temp name and run that copy and you won't have to worry about it.
You can change the graph to always show 100% by open the graph template and disabling the auto-scale option. Note that the upper limit on the graph is set to 200% since it stacks the 1min and 5min avgs, which could both hit 100% (stacked together that would total 200%).
You can change the graph to always show 100% by open the graph template and disabling the auto-scale option. Note that the upper limit on the graph is set to 200% since it stacks the 1min and 5min avgs, which could both hit 100% (stacked together that would total 200%).
Doh! That should have been obvious... but this newest script, even with the newer OIDs gives me a response - and it looks like the correct one. If that's the case, I'm really confused as to why the graphs weren't working before changing the OID. Perhaps I should change them back?ehall wrote:You can just copy the script to a temp name and run that copy and you won't have to worry about it.
Code: Select all
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 index
1
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuName
1:CPU1
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuIndex
1:1
well, that explains what I was just going to ask you about. Is there a different way to report it rather than stack them? As it is I have one CPU that appears to be running at 150%! Perhaps a block color for 1 minute and a line for 5?You can change the graph to always show 100% by open the graph template and disabling the auto-scale option. Note that the upper limit on the graph is set to 200% since it stacks the 1min and 5min avgs, which could both hit 100% (stacked together that would total 200%).
I do appreciate your working on this - anything more I can do to help, just let me know.
knobdy wrote:but this newest script, even with the newer OIDs gives me a response - and it looks like the correct one. If that's the case, I'm really confused as to why the graphs weren't working before changing the OID. Perhaps I should change them back?
Code: Select all
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 index
1
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuName
1:CPU1
You can make whatever changes to the graph template you likeIs there a different way to report it rather than stack them? As it is I have one CPU that appears to be running at 150%! Perhaps a block color for 1 minute and a line for 5?
Might as well try the latest on the two I still don't have working. They are (C7200-JK8S-M), Version 12.2(15)T5 - and while it does display the graph without error, running it the script returns nothing.
UPDATE: This script appears to work for the other routers - I didn't have to edit it manually, obviously. Still didn't work on the two 7200s though. The 7200s also give "No more variables left in this MIB View (It is past the end of the MIB tree)" back for the memory walks.
UPDATE: This script appears to work for the other routers - I didn't have to edit it manually, obviously. Still didn't work on the two 7200s though. The 7200s also give "No more variables left in this MIB View (It is past the end of the MIB tree)" back for the memory walks.
Why wouldn't changing the average to a "max" work? In other words it would simply draw a line along the max of either 1min or 5min - depending on which is higher:ehall wrote:You can make whatever changes to the graph template you like
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="argus_kc2r3 - CPU Usage - |query_cpuName| (|query_cpuDesc|)" \
--rigid \
--base=1000 \
--height=120 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Percent" \
--slope-mode \
DEF:a="/usr/share/cacti/rra/argus_kc2r3_fivemin_1568.rrd":oneMin:AVERAGE \
DEF:b="/usr/share/cacti/rra/argus_kc2r3_fivemin_1568.rrd":fiveMin:AVERAGE \
AREA:a#FFC73B:"1 Min Avg" \
GPRINTLAST:"Current\:%8.2lf" \
GPRINTAVERAGE:"Average\:%8.2lf" \
GPRINTMAX:"Maximum\:%8.2lf\n" \
LINE1:b#FF0000:"5 Min Avg" \
GPRINTLAST:"Current\:%8.2lf" \
GPRINTAVERAGE:"Average\:%8.2lf" \
GPRINTMAX:"Maximum\:%8.2lf\n" \
LINE2:#000000:""
RRDTool Says:
ERROR: Not a valid vname: #000000 in line LINE2:#000000:
Who is online
Users browsing this forum: No registered users and 1 guest