cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1993
Views
0
Helpful
2
Replies

CPU High Utilization

yualme
Level 1
Level 1

Hi Team,

My goal is to achive that if the CPU utilization is greater than the 50% run the "undubug all" command

To avoid the high tilization due to debug (I know that the access - list should be used for the same , but i want to achive this)

Below is my script

event manager applet highcpu

  event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.3.1 get-type exact entry-op ge entry-val 50 poll-interval 0.5

  action 1.0 cli command "enable"

  action 2.0 cli command "undug all"

But it doen't working on high cpu utilization , Please find the below output for the same

It was skipped the first time & working on the second time

*Mar  1 00:34:13.987: fh_server: fh_io_msg: received msg FH_MSG_EVENT_REQINFO from client 184 pclient 1

*Mar  1 00:34:13.991: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : CTL : cli_open called.

*Mar  1 00:34:13.991: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  :

*Mar  1 00:34:14.019: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT :

*Mar  1 00:34:14.023: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:14.023: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  : >enable

*Mar  1 00:34:14.051: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT :

*Mar  1 00:34:14.051: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:14.051: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  : >undebug all

*Mar  1 00:34:14.063: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT :

*Mar  1 00:34:14.063: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:14.063: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  : >exit

*Mar  1 00:34:14.067: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : CTL : cli_close called.

*Mar  1 00:34:14.071: fh_server: fh_io_msg: received msg FH_MSG_CALLBACK_DONE from client 184 pclient 1

*Mar  1 00:34:14.071: fh_io_msg: EEM callback policy EEM Policy Director has ended with normal exit status of 0x0

*Mar  1 00:34:14.071: fh_schedule_callback: fh_schedule_callback: cc=65DAA5BC prev_epc=6572D7A4; epc=0

*Mar  1 00:34:14.075: fh_server: fh_io_msg: received msg FH_MSG_API_CLOSE from client 184 pclient 1

*Mar  1 00:34:14.075: fh_io_msg: received FH_MSG_API_CLOSE client=184

*Mar  1 00:34:14.975: fh_process_async: re=657324B4, timer_type=POLL

*Mar  1 00:34:14.975: snmp_exit_comb_check:Returning TRUE

*Mar  1 00:34:14.975: snmp_value_uint_compare:op1=95 op2=5 ret=TRUE

*Mar  1 00:34:14.975: snmp_entry_value_check:Returning TRUE

*Mar  1 00:34:14.979: fh_fd_snmp_event_match: re = 657324B4, num_matches = 1

*Mar  1 00:34:14.979: fh_process_async: update_t=2054976

*Mar  1 00:34:14.979: fd_pulse_hndlr: received a pulse from /dev/fm/fd_snmp

*Mar  1 00:34:14.983: fh_fd_snmp_info_publish: pe = 64BF94F4

*Mar  1 00:34:14.983: fh_msg_send_to_fd: receive a reply msg, minor: 5

*Mar  1 00:34:14.983: fd_pulse_hndlr: received FH_MSG_EVENT_PUBLISH

*Mar  1 00:34:14.983: fh_schedule_callback: fh_schedule_callback: cc=65DAA5BC prev_epc=0; epc=644AABDC

*Mar  1 00:34:14.991: fh_schedule_callback: EEM callback policy EEM Policy Director has been scheduled to run

*Mar  1 00:34:14.991: fh_io_msg: received FH_MSG_API_INIT; jobid=195, processid=209, client=185, job name=EEM Callback Thread

*Mar  1 00:34:14.991: fh_server: fh_io_msg: received msg FH_MSG_EVENT_REQINFO from client 185 pclient 1

*Mar  1 00:34:14.995: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : CTL : cli_open called.

*Mar  1 00:34:14.995: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  :

*Mar  1 00:34:15.007: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT :

*Mar  1 00:34:15.007: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:15.011: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:15.011: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1>

*Mar  1 00:34:15.011: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  : >enable

*Mar  1 00:34:15.019: cli_history_entry_add: free_hist_list size=0, hist_list size=7

*Mar  1 00:34:15.019: eem_no_scan flag set, skipping scan of command_string=check_eem_cli_policy_handler

*Mar  1 00:34:15.023: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT :

*Mar  1 00:34:15.023: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : OUT : R1#

*Mar  1 00:34:15.027: %HA_EM-6-LOG: highcpu : DEBUG(cli_lib) : : IN  : #undebug all

*Mar  1 00:34:15.031: cli_history_entry_add: free_hist_list size=0, hist_list size=7

*Mar  1 00:34:15.031: eem_no_scan flag set, skipping scan of command_string=check_eem_cli_policy_handler

there is no place like 127.0.0.1
2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

So you're saying that it does work as you expect, except it doesn't work the first time it's invoked?  what version of IOS is this?

Hi ,

IOS Version 12.4(25b)

What i'm saying is that if you look at the

1) @ "Mar  1 00:34:14.023" time's log you will see that after enable command it don't go in to the "privilege mode" and be in the user mode so the command @ "Mar  1 00:34:14.051" - undebug all is not working.

2)Same thing is happening @ Mar  1 00:34:15.011 and router goes in to the privilege mode and undebug all command is working at that time.

There were many much fail offferd router did before Mar  1 00:34:14.023 which is not included in log.

Or is there any other way to achive this , like if CPU ulilization os more than 50% run the "undebug all" command

Or ican give priority to the EEM commands to overcome the debug

there is no place like 127.0.0.1

Review Cisco Networking for a $25 gift card