I have a problem.
event manager applet HELL
 event none
 action 000 cli command "ena"
 action 005 cli command "sh proc cpu"
 action 010 set lines "0"
 action 020 foreach _it "$_cli_result" "\n"
 action 022  if $lines gt 6
 action 023   break
 action 024  end
 action 031  increment lines
 action 032  append output "$_it"
 action 040 end
 action 050 puts "HELLO = $output"
!
Router#event manager run HELL
Router#
There's No output.! When i had the action xxx puts "$_it" ... output was
fine.! Now i am trying to append all the lines to $output and then puts
"$output".
Whts the error here.!?
On Sun, Jan 17, 2010 at 1:38 AM, Divin Mathew John <divinjohn_at_gmail.com>wrote:
> event manager applet HELL
>  event none
>  action 000 cli command "ena"
>  action 005 cli command "sh proc cpu"
>  action 010 set lines "0"
>  action 020 foreach _it "$_cli_result" "\n"
>  action 022  if $lines gt 6
>  action 023   break
>  action 024  end
>  action 030  puts "$_it"
>  action 031  increment lines
>  action 040 end
>
>  Its working now.! I rewrote the whole thingy.
> Router#event manager run HELL
>
> CPU utilization for five seconds: 5%/0%; one minute: 3%; five minutes: 4%
>  PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process
>    1          12          66        181  0.00%  0.00%  0.00%   0 Chunk
> Manager
>    2         572        1499        381  0.07%  0.02%  0.00%   0 Load Meter
>    3           0           1          0  0.00%  0.00%  0.00%   0 chkpt
> message ha
>    4           0           1          0  0.00%  0.00%  0.00%   Router#event
> manager run HELL
>
>
>
> Some one tell me how do i get the value of five minutes: 4%.  The value 4
> into a variable?
>
>
>
> On Sun, Jan 17, 2010 at 1:35 AM, Ryan West <rwest_at_zyedge.com> wrote:
>
>> Divin,
>>
>> Which part doesn't work?  If you're trying to send an email, have you set
>> an SMTP server?
>>
>> -ryan
>>
>> > -----Original Message-----
>> > From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of
>> > Divin Mathew John
>> > Sent: Saturday, January 16, 2010 2:17 PM
>> > To: Cisco certification
>> > Subject: EEM
>> >
>> > event manager applet dump-procs
>> >  event syslog pattern "CPURISINGTHRESHOLD"
>> >  action 001 cli command "enable"
>> >  action 002 cli command "show proc cpu sorted 5min"
>> >  action 003 set lines 0
>> >  action 004 foreach line "$_cli_result" "\n"
>> >  action 005   if $lines gt 6
>> >  action 006     break
>> >  action 007   end
>> >  action 008   append output $line
>> >  action 009   increment lines
>> >  action 010 end
>> >  action 011 mail to user_at_company.com from user_at_company.com server
>> > 10.1.1.1 subject "Top five processes" body "$output"
>> >  action 012 syslog msg "Top five processes: $output"
>> >
>> >
>> > I got this code from
>> > https://supportforums.cisco.com/message/2011660;jsessionid=22D30B42529F
>> > 604C48ADCBA3928C2882.node0
>> > .
>> > It doesnt seem to work? any ideas?
>> > --
>> >
>> > Sent from Bangalore, KA, India
>> >
>> >
>> > Blogs and organic groups at http://www.ccie.net
>> >
>> > _______________________________________________________________________
>> > Subscription information may be found at:
>> > http://www.groupstudy.com/list/CCIELab.html
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>
>
> --
>
> Sent from Bangalore, KA, India
>
-- Sent from Bangalore, KA, India Blogs and organic groups at http://www.ccie.netReceived on Sun Jan 17 2010 - 01:44:50 ART
This archive was generated by hypermail 2.2.0 : Thu Feb 04 2010 - 20:28:41 ART