[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cronjobs and top not getting along
On Mon, 9 Aug 1999 charles@lunarmedia.net wrote:
> Perhaps, for a non Perl, Python, or PHP knowing kinda guy such as myself,
> it may be easier to beat this batel through a different means. :)
>
> I know uptime will give me system load, but not in a % value.
> What is a significant load for a pentium based linux server?
>
> uptime | cut -d " " -f 15 > filename
You could do
uptime|cut -d' ' -f15|cut -c1,3,4
Assuming your load average never goes over 999% (which is entirely possible)
If you wanna really hack something horrible together, you could do something
more like
uptime|cut -d' ' -f15|wc --chars
then if it's 6, you only have 1 digit before the decimal point, so you cut
out 1,3,4, or if it's 7 you cut out chars 1,2,4,5.
Will that be ugly enough? :)
--Danny, who doesn't always write pretty code either
--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.