Hey Nick
Cool script ;-) Good work
~ Moazzam
On Wed, Aug 12, 2009 at 8:46 AM, Nick Matthews <matthn_at_gmail.com> wrote:
> If it's intermittent high CPU (it always is, isn't it?) this EEM
> script will write a file to your flash with helpful commands:
>
> Sample Event Manager Script to automatically collect info when the
> high CPU is observed:
>
> event manager applet capture_cpu_spike
> event snmp oid 1.3.6.1.4.1.9.2.1.56 get-type next entry-op ge
> entry-val 70 exit-time 10 poll-interval 1
> action 1.0 syslog msg "CPU Utilization is high"
> action 2.0 cli command "enable"
> action 3.0 cli command "show process cpu sort | append flash:cpu.log"
> action 4.0 cli command "show clock | append flash:cpu.log"
> !
> event manager session cli username <username>
>
>
> Just watch out for sending too much to your flash, as it can make the
> problem worse. Other standard EEM warnings apply. This particular
> script kicks off at 70%.
>
>
> -nick
>
> On Tue, Aug 11, 2009 at 10:22 PM, Steve Lyons<charter21p5_at_gmail.com>
> wrote:
> > To see the process that is taking high cpu in real time use show proc cpu
> |
> > e 0.00
> >
> > If you want to catch it after the fact show proc cpu history will only
> show
> > you usage not process so you will need to write a script and have the
> > trigger high cpu.
> >
> > Steve Lyons
> >
> > On Mon, Aug 10, 2009 at 1:12 AM, shiran guez <shiranp3_at_gmail.com> wrote:
> >
> >> you can either use that command if you want the proccess that taken the
> >> most
> >> cpu in the last 5sec
> >> sh processes cpu sorted 5sec
> >>
> >> or if you are sure that in the last 5sec some proccess taken 100% and
> you
> >> want to see only them you can use:
> >> sh processes cpu | include 100%
> >> 2009/8/9 Ryan West <rwest_at_zyedge.com>
> >>
> >> > This was an interesting topic so I did a little more research, I would
> >> > check out 'process cpu autoprofile hog' and then 'show process cpu
> >> > autoprofile hog'. I haven't had a chance to test with them, but I
> think
> >> it
> >> > might provide you what you're looking for.
> >> >
> >> > As for s cpu proc history, that's not going to show individual
> process,
> >> but
> >> > just overall CPU state over time. This information can also be
> extended
> >> > with the 'process cpu extended' command.
> >> >
> >> > -ryan
> >> >
> >> > -----Original Message-----
> >> > From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf
> Of
> >> > ??? ?????
> >> > Sent: Sunday, August 09, 2009 1:02 PM
> >> > To: Cisco certification
> >> > Subject: Fwd: CPU Process Question
> >> >
> >> > ---------- Forwarded message ----------
> >> > From: W W)W W W W W W <eshedalonie_at_gmail.com>
> >> > Date: Sun, Aug 9, 2009 at 8:00 PM
> >> > Subject: Re: CPU Process Question
> >> > To: Ryan West <rwest_at_zyedge.com>
> >> >
> >> >
> >> > Show Proc cpu is good only when you write it down at a current
> moment.
> >> > I Want to know not at a current moment but when it happens...
> >> >
> >> > 2009/8/9 Ryan West <rwest_at_zyedge.com>
> >> >
> >> > S proc cpu sort isnb t giving u what you want?
> >> > >
> >> > > -----Original Message-----
> >> > > From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On
> Behalf
> >> Of
> >> > > ??? ?????
> >> > > Sent: Sunday, August 09, 2009 10:09 AM
> >> > > To: Cisco certification
> >> > > Subject: CPU Process Question
> >> > >
> >> > > Is there a way to know what process generate 100% CPU ?
> >> > >
> >> > >
> >> > > 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
> >> >
> >> >
> >> > Blogs and organic groups at http://www.ccie.net
> >> >
> >> >
> _______________________________________________________________________
> >> > Subscription information may be found at:
> >> > http://www.groupstudy.com/list/CCIELab.html
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> --
> >> Shiran Guez
> >> MCSE CCNP NCE1 JNCIA-ER CCIE #20572
> >> http://cciep3.blogspot.com
> >> http://www.linkedin.com/in/cciep3
> >> http://twitter.com/cciep3
> >>
> >>
> >> 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
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>
-- Regards, Syed Moazzam Daimi CCIE # 22100 Blogs and organic groups at http://www.ccie.netReceived on Wed Aug 12 2009 - 18:21:31 ART
This archive was generated by hypermail 2.2.0 : Tue Sep 01 2009 - 05:43:56 ART