Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

EEM script on line vty

Hi,

I am using this script to check high cpu util on switch

event manager applet high_cpu

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 "65" 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 "term len 0"

action 1.04 cli command "debug platform packet all receive buffer"

action 1.05 cli command "show platform health | redirect slot0:high_cpu1"

action 1.06 cli command "show proc cpu sort | redirect slot0:high_cpu2"

action 1.07 cli command "show platform cpu packet statistics | redirect slot0:high_cpu3"

action 1.08 cli command "show platform cpu packet buffered | redirect slot0:high_cpu4"

action 1.09 cli command "show platform health | redirect slot0:high_cpu5"

action 1.10 cli command "show proc cpu sort | redirect slot0:high_cpu6"

action 1.11 cli command "show platform cpu packet statistics | redirect slot0:high_cpu7"

action 1.12 cli command "show platform cpu packet buffered | redirect slot0:high_cpu8"

action 1.13 cli command "show clock | redirect slot0:high_cpu9"

action 1.14 cli command "undebug all"

action 1.15 cli command "conf t"

action 1.16 cli command "no event

Switch version: cat4500e-entservicesk9-mz.122-50.SG3.bin

Model:  WS-C4900M 3 slot switch

Can you pls confirm whether each line will take separate vty to run each command or all the above command will run on single vty

Post running this script we are getting vty 11-15 are showing 0.0 & we are not able to kill/disconnect session

br/subhojit

  • EEM Scripting
4 REPLIES
Cisco Employee

EEM script on line vty

Each line will use the same VTY line.  That is, only one VTY is allocated per instance of the applet.  However, judging by the way you have written it, you could have up to four applets running at once, each taking up a VTY line.

New Member

EEM script on line vty

Hi Clarke,

Pls confirm eem script only take line vty 11-15 or any other free vty port starting from 0

Br/Subhojit

Cisco Employee

EEM script on line vty

EEM will try and allocate the first free line starting at 0.  At least two lines must be open for EEM to succeed to allocate one line.

Cisco Employee

EEM script on line vty

You can use "show tcp brief" to identify the tcp connections with a TCB value associated to each.

Try to clear the session using the command "clear tcp tcb " to clear the lines.

High CPU was due to Spanning-tree state changes/

Thanks & Regards,
Karthick Murugan
CCIE#39285

**DO NOT FORGET TO RATE ALL USEFUL POSTS**

Thanks & Regards, Karthick Murugan CCIE#39285
836
Views
0
Helpful
4
Replies
This widget could not be displayed.