02-11-2010 05:54 AM - edited 02-21-2020 03:52 AM
I want to configure the ISR router to Send the top 10 CPU and Memory Utilization every two hours to my email addess, I went through too many documents and I found a lot of solutions which are confusing me some of them using cron job, some of them Using OID and others using TCL Scripts.
Please assist me in the easiest way.
Thanks
02-13-2010 09:22 PM
What version of IOS is running on this router?
02-14-2010 05:32 AM
version 12.4
02-14-2010 10:18 AM
I figured that, but EXACTLY what version of 12.4? Newer versions of 12.4T will mean a different EEM solution can be used.
02-14-2010 10:29 AM
Yes it is 2811 running
12.4T.
Thanks
02-14-2010 10:32 AM
EXACTLY what version? Please post the "show version" output from this router.
02-14-2010 10:45 AM
HI again Joe,
Here you are the output of show version:
Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(11)T2, RELEASE SOFTWARE (fc4)
Thanks!
02-14-2010 11:19 AM
This EEM Tcl policy should do what you want. Before installing it, you will need to set some environment variables, though:
# mem_cpu_time : Number of seconds between executions of this policy.
#
# mem_cpu_num_lines : Number of lines to include in the output.
#
# _email_server : SMTP server used to send email.
#
# _email_from : Email address from which email will be sent.
#
# _email_to : Email address(es) to which email will be sent.
#
# _email_cc : (optional) Email address(es) to which email will be
# carbon copied.
For example, in "config t" mode:
event manager environment mem_cpu_time 7200
event manager environment mem_cpu_num_lines 10
event manager environment _email_server 10.1.1.1
event manager environment _email_from router@company.com
event manager environment _email_to user@company.com
event manager environment _email_cc otheruser@company.com
That configuration will run the policy every two hours, and send the top 10 lines of "show proc mem sorted" and "show proc cpu sorted" via email to user@company.com and otheruser@company.com.
02-14-2010 11:32 AM
Thanks Joe for the script, I will try it and get back to you; However; is there any direct commands that we can made without installing the TCL scripting?
02-14-2010 11:37 AM
No, not with your version of code. You could do what you want without Tcl in 12.4(22)T or higher.
02-15-2010 03:08 AM
Thanks Alot Joe for the value info.
Can you tell me what is the compatible versions of 12.4 and what are the direct commands?
Thanks!
02-15-2010 03:37 PM
This policy will work on any device running 12.3(14)T or higher. You must first copy the policy to the device (e.g. to flash:/policies on your ISR router). Then, configure the router with the appropriate EEM user policy directory:
event manager directory user policy flash:/policies
Then, register the policy with the EEM server (again, from "config t" mode):
event manager policy tm_check_mem_cpu.tcl
Once those two commands are configured (and, of course, the policy has been copied to the device and you have set the environment variables I mentioned previously), the policy will be running,
02-14-2010 01:12 PM
Nice one Joe (+5)!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: