Any one help me to all the top 10 process of cisco routers or switches while triggering the HIGH CPU alert.
The quickest way would be to configure an NCM alert action that drops a 'sh proc cpu sort' and redirects it to a tftp server. I would also configure an email alert so I knew when to go and check the text file.
Additionally, you could do this within Cisco IOS itself using Event Manager Applets. I have not tested this at all, it is pulled straight from a presentation I attended at Cisco Live. I would recommend testing it thoroughly before deploying.
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 "70” exit-op lt exit-val "50" 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”
This may be achievable if you had NCM. Do you have NCM?
If you don't have NCM, you could set an alert action to execute a Powershell script that uses a module like PoshSSH.
Yes i have NCM , NPM ,NTA ,UDT, VNQM & IPAM. Tell me how can i achieve this request ??
I havent test the above mention EEM but i have tested are implemented the EEM script for monitoring the active Nat session using the below mention EEM scripts it working fine.
1. Create expression owner
snmp mib expression owner nat name 1 description Total active translations value type integer32
2. EEM applet
event manager applet Solarwindsevent timer watchdog time 600 maxrun 60 action 010 cli command "enable"action 030 cli command "configure terminal"action 040 cli command "do-exec show ip nat translations stat | i active"action 090 regexp "^.+\s([0-9]+)" "$_cli_result" match total_translationsaction 100 cli command "snmp mib expression owner nat name 1"action 110 if $_regexp_result eq "1"action 120 cli command "expression $total_translations"action 130 elseaction 140 cli command "expression 0"action 150 cli command "exit"action 160 end