The following comes right from the EEM configuration guide. Just a slight
modification on the show command
event manager applet snmpcpuge75
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 75
poll-interval 10
action 1.0 cli command "enable"
action 2.0 cli command "show process cpu | incl ^ [1-5]"
action 3.0 mail server "192.168.1.146" to "engineer_at_cisco.com" from
"devtest_at_cisco.com"
subject "B25 PBX Alert" body "$_cli_result"
the incl ^ [1-5] will make sure you only get the first 5 process listings.
For your memory question it would be very similar but you would have to look
up the SNMP OID For memory usage and the command would be as follows.
show process memory | incl ^ [0-2]
make sure you have the ^ (carat) and three spaces so you can capture the PID
of the first 5 processes.
Regards,
Tyson Scott - CCIE #13513 R&S, Security, and SP
Managing Partner / Sr. Instructor - IPexpert, Inc.
Mailto: tscott_at_ipexpert.com
-----Original Message-----
From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of
Tolulope Ogunsina
Sent: Monday, August 30, 2010 11:40 AM
To: olumayokun fowowe; Yemi Oshunkoya
Cc: ccielab_at_groupstudy.com
Subject: Re: OT: filtering Show Outputs
Try Tcl/EEM.
Best Regards, Tolulope Ogunsina, CCIE x2 (R&S|Sec)
-----Original Message-----
From: olumayokun fowowe <olumayokun_at_gmail.com>
Sender: nobody_at_groupstudy.com
Date: Mon, 30 Aug 2010 16:37:45
To: Yemi Oshunkoya<yzmar4real_at_hotmail.com>
Reply-To: olumayokun fowowe <olumayokun_at_gmail.com>
Cc: <ccielab_at_groupstudy.com>
Subject: Re: OT: filtering Show Outputs
Hello all,
Please let me make myself a bit clearer:
suppose i issue the command "show processes memory" and I want to filter the
output to show the first 5 lines of the output. How do I filter such.
Thanks,
On Mon, Aug 30, 2010 at 4:33 PM, Yemi Oshunkoya
<yzmar4real_at_hotmail.com>wrote:
> it generally depends on what you want to see.
>
> i usually "pipe" it
>
> show run | sec router
> show run | include ip route
>
> e.t.c
>
> HTH
>
> > Date: Mon, 30 Aug 2010 16:30:05 +0100
> > Subject: OT: filtering Show Outputs
> > From: olumayokun_at_gmail.com
> > To: ccielab_at_groupstudy.com
> >
> > Hello Guys,
> >
> > How can i filter my show commands to feature certain number of lines in
> > cisco devices.
> >
> > Thank you.
> >
> > --
> > Olumayokun Fowowe
> >
> >
> > Blogs and organic groups at http://www.ccie.net
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>
-- Olumayokun Fowowe Blogs and organic groups at http://www.ccie.netReceived on Mon Aug 30 2010 - 20:46:50 ART
This archive was generated by hypermail 2.2.0 : Wed Sep 01 2010 - 11:20:53 ART