[c-nsp] EEM
Rodney Dunn
rodunn at cisco.com
Fri Aug 3 04:11:41 EDT 2007
There are a bunch of fancy ways to do this with EEM.
TCL and watching SNMP values...and probably even some
resource triggers I don't know how to use.
But a simple one would be to set a CPU threshold syslog
and trigger on that in an applet.
ie:
process cpu threshold type process rising 20 interval 5 falling 1 interval 5
event manager applet cpu
event syslog pattern "CPURISINGTHRESHOLD"
action 1 cli command "enable"
action 2 cli command "sh proc cpu sort | redirect unix:out.log"
and then from debug event manager all:
*Aug 3 08:09:37.327: %SYS-1-CPURISINGTHRESHOLD: Threshold: Process CPU Utilization(Total/Intr): 53%/0%, Top 3 processes(Pid/Util): 3/53%, 141/0%, 35/0%
*Aug 3 08:09:37.335: fh_fd_syslog_event_match: num_matches = 1
*Aug 3 08:09:37.335: fh_fd_data_syslog: num_matches = 1
*Aug 3 08:09:37.335: fh_send_server_sig_hndlr: received a pulse from Syslog Event Detector on node0/0 with fdid: 2
*Aug 3 08:09:37.335: fh_send_syslog_fd_msg: msg_type=62
*Aug 3 08:09:37.335: fh_send_syslog_fd_msg: sval=0
*Aug 3 08:09:37.335: fh_send_server_sig_hndlr: received FH_MSG_EVENT_PUBLISH
*Aug 3 08:09:37.335: fh_schedule_callback: fh_schedule_callback: cc=3DE1540 prev_epc=0; epc=2EBB768
*Aug 3 08:09:37.335: fh_schedule_callback: EEM callback policy cpu has been scheduled to run
*Aug 3 08:09:37.335: fh_io_msg: received FH_MSG_API_INIT; jobid=18, processid=90, client=8, job name=EEM Callback Thread
*Aug 3 08:09:37.335: fh_server: fh_io_msg: received msg FH_MSG_EVENT_REQINFO from client 8 pclient 1
*Aug 3 08:09:37.339: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : CTL : cli_open called.
*Aug 3 08:09:37.595: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : OUT :
*Aug 3 08:09:37.595: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : OUT : UUT>
*Aug 3 08:09:37.595: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : IN : UUT>enable
*Aug 3 08:09:38.695: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : OUT :
*Aug 3 08:09:38.695: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : OUT : UUT#
*Aug 3 08:09:38.695: %HA_EM-6-LOG: cpu : DEBUG(cli_lib) : : IN : UUT#sh proc cpu sort | redirect unix:out.log
Rodney
On Fri, Jul 13, 2007 at 12:30:57PM -0500, alaerte.vidali at nsn.com wrote:
> Trying to use EEM to capture "show process cpu" on the moment it reach
> 50%.
>
> Have you used it?
>
> Thanks.
> _______________________________________________
> cisco-nsp mailing list cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
More information about the cisco-nsp
mailing list