runaway proc events/0 && automatic reboot
Matthias Apitz
guru at unixarea.de
Fri Jan 9 16:06:31 CET 2009
El día Friday, January 09, 2009 a las 02:03:35PM +0000, Neil Jerram escribió:
> 2009/1/9 Matthias Apitz <guru at unixarea.de>:
> >
> > ... the CPU time is easy to read as:
> >
> > while true; do
> > ps --no-heading -C events/0 -o time | awk -F : '{print $1*3600+$2*60+$3}'
> > sleep 600
> > done
>
> Sorry, but I couldn't help feeling amused here by the fact that we
> have a different definition of "easy" from the rest of the world. :-)
>
> Best wishes,
> Neil
Neil,
Now (as I understand your reply) just one explanation: a lot of us are
Linux guys and ofc will understand the idea and the above code; those
who are not, can only just reboot with the power-button and must wait for
a real fix of the proc or the kernel;
the output of 'ps --no-heading -C events/0 -o time' is the actual
consumed CPU time of the proc events/0:
# ps --no-heading -C events/0 -o time
00:01:17
and the awk-scripts brings this value into seconds only form:
# ps --no-heading -C events/0 -o time | awk -F : '{print $1*3600+$2*60+$3}'
77
a while-loop does this calculation every 600 seconds...
one could add a threshold, let's say 777 secs, and when this is reached
the FR reboots (just in the middle of a phone call to your best love :-))
matthias
--
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
SPAMer of the year: Subject: Alle Software ist Deutsche Sprachen
>From: -40 % die Neujahrsaktion <GabrielleKelley at grungecafe.com>
More information about the community
mailing list