Hi guys, 
This is my frst post in this mail list, below I tried to get the first 10 lines 
of cli output with an eem applet. 

event manager applet sampleapplet
 event syslog occurs 1 pattern "DUAL-5-NBRCHANG*" period 1
 action 1 set a "0"  
 action 2 cli command "show proces cpu sorted 5min"
 action 3 foreach line "$_cli_result" "\n"
 action 4  if $a lt 10
 action 5   append result "$line\n"
 action 6   increment a
 action 7  end
 action 8 end
 action 9 puts "$result" 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jay Taylor
Sent: Thursday, March 17, 2011 10:36 PM
To: Hwa Ahn
Cc: [email protected]
Subject: Re: [OSL | CCIE_RS] EEM solution

I couldn't figure out the 'first 10 lines' part of this either but this DocCD 
gives you an example of all the rest:

http://grab.by/9xfd

http://www.cisco.com/en/US/customer/docs/ios/netmgmt/configuration/guide/nm_eem_policy_cli_ps6441_TSD_Products_Configuration_Guide_Chapter.html

I'd be very curious if we could get an official answer on the 'first 10 lines' 
part though... I know that has confused a lot of people.



On Thu, Mar 17, 2011 at 4:03 PM, Hwa Ahn <[email protected]> wrote:

> Hi. Experts.
>
> I really need your great advice regarding EEM issue below. It's too 
> difficult for me.
> How can I resolve this issue if pipe command and clie-pre-command 
> cannot be used?
>
> When 5min cpu value is about 50%, I need to get the frist 10 lines in 
> output of 'show processor cpu sorted 5min command'
> Then, I need to send the email from [email protected] to [email protected] by 
> using mail server 1.1.1.1. polling is every 30 second.
>
>
> Please, advise me how to solve this issue.
>
> Regards.
> Fred.
> _______________________________________________
> For more information regarding industry leading CCIE Lab training, please
> visit www.ipexpert.com
>
_______________________________________________
For more information regarding industry leading CCIE Lab training, please visit 
www.ipexpert.com


This message and attachments are confidential and intended solely for the 
individual(s) stated in this message. If you received this message although you 
are not the addressee, you are responsible to keep the message confidential. 
The sender has no responsibility for the accuracy or correctness of the 
information in the message and its attachments. Our company shall have no 
liability for any changes or late receiving, loss of integrity and 
confidentiality, viruses and any damages caused in anyway to your computer 
system.  

Bu mesaj ve ekleri, mesajda gonderildigi belirtilen kisi/kisilere ozeldir ve 
gizlidir. Bu mesajin muhatabi olmamaniza ragmen tarafiniza ulasmis olmasi 
halinde mesaj iceriginin gizliligi ve bu gizlilik yukumlulugune uyulmasi 
zorunlulugu tarafiniz icin de soz konusudur. Mesaj ve eklerinde yer alan 
bilgilerin dogrulugu ve guncelligi konusunda gonderenin ya da sirketimizin 
herhangi bir sorumlulugu bulunmamaktadir. Sirketimiz mesajin ve bilgilerinin 
size degisiklige ugrayarak veya gec ulasmasindan, butunlugunun ve gizliliginin 
korunamamasindan, virus icermesinden ve bilgisayar sisteminize verebilecegi 
herhangi bir zarardan sorumlu tutulamaz.
_______________________________________________
For more information regarding industry leading CCIE Lab training, please visit 
www.ipexpert.com

Reply via email to