+++ Arun K. Khan [2006-03-28 12:54:56]:
> On Mon, 2006-03-27 at 23:22 -0600, K. Shantanu wrote:
> > * Thaths <[EMAIL PROTECTED]> [060327 23:20]:
> > > On 3/27/06, K. Shantanu <[EMAIL PROTECTED]> wrote:
> > > > Is there any application which will allow me to execute any script (or
> > > > program) once the
> > > > load average goes over say 10.0 and again run it say once it drops back
> > > > to say 5.0?
> > >
> > > Nagios: http://www.nagios.org/ ?
> >
> > I think it will be an overkill for the same.
> > I am looking for something simpler.
>
> You may have to roll your own script using top, grep, sed etc. and
> invoking it thru cron. If you know PERL, you could write a daemon that
> polls the load average at regular intervals.
or something like this in bash
while sleep 60 ; do LOAD=`cat /proc/loadavg |cut -f1 -d.`; if [ "$LOAD" -gt
"10" ] ; then /path/to/script.sh; fi; done
Kingsly
--
---------------------------------------------------------------------------
Kingsly At Users Dot SourceForge Dot Net -- http://kingsly.org/
---------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-india-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-india-help