total uptime between shutdowns
Baruch Siach
baruch at tkos.co.il
Tue Feb 1 10:33:43 IST 2011
Hi Omer, Tom,
On Tue, Feb 01, 2011 at 10:18:41AM +0200, Omer Zak wrote:
> 2. The 'uptime' command gives the uptime since last reboot. You may
> want to add 'uptime >> /var/log/my_uptimes_log.txt' to the shutdown
> script, and rotate & process, using a custom Perl script,
> the /var/log/my_uptime_log.txt file each month to total the uptime in
> that month.
Another option: parse the output of last.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
More information about the Linux-il
mailing list