cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1122
Views
0
Helpful
1
Replies

Script not working for CPU utilization on a cisco 3845

PacketSpartan
Level 1
Level 1

Hi Guys, I am trying to run script on my 3845 to capture the stats when it spikes, I have set the levels quite low for testing purpose. However i am not seeing a file being generated in directory.I can see the HIGH CPU in the sys log but i am not seeing a file. 

Can someone check my script ? (I compiled this script from the cisco site which was for the 6500s)

event manager applet CPU_STATS
event snmp oid "1.3.6.1.4.1.9.9.109.1.1.1.1.3.1" get-type exact entry-op gt entry-val "10" exit-op lt exit-val "5" poll-interval 5
action 1.01 syslog msg "------HIGH CPU DETECTED----, CPU:$_snmp_oid_val%"
action 1.02 cli command "enable"
action 1.03 cli command "show clock | append disk0:cpu_stats"
action 1.04 cli command "show proc cpu sort | append disk0:cpu_stats"
action 1.05 cli command "Show proc cpu | exc 0.00% | append disk0:cpu_stats"
action 1.06 cli command "Show proc cpu history | append disk0:cpu_stats"
action 1.07 cli command "show logging | append disk0:cpu_stats "
action 1.08 cli command "show spanning-tree detail | in ieee|occurr|from|is exec | append disk0:cpu_stats"
action 1.09 cli command "debug netdr cap rx | append disk0:cpu_stats"
action 1.10 cli command "show netdr cap | append disk0:cpu_stats"
action 1.11 cli command "undebug all"

CCNA R&S
1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

If you see the syslog, then the problem is either that the disk0: file system doesn't support "append" (you can test his manually) or more likely you're using AAA command authorization, and you need to add:

event manager session cli username USER

Where USER is a username authorized to run all of the commands in question.

View solution in original post

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

If you see the syslog, then the problem is either that the disk0: file system doesn't support "append" (you can test his manually) or more likely you're using AAA command authorization, and you need to add:

event manager session cli username USER

Where USER is a username authorized to run all of the commands in question.

Review Cisco Networking for a $25 gift card