total uptime between shutdowns

total uptime between shutdowns

Etzion Bar-Noy ezaton at tournament.org.il
Tue Feb 1 11:44:16 IST 2011


Your solution will work, of course, only on a tidy shutdown. For unplanned
shutdown (aka - power failure) it will not work.

Ez

On Tue, Feb 1, 2011 at 10:18 AM, Omer Zak <w1 at zak.co.il> wrote:

> On Tue, 2011-02-01 at 10:00 +0200, Tom Rosenfeld wrote:
> > Hi Guys,
> >
> > Is there a tool that will show me the total uptime (availability) of a
> > machine between reboots?
> > That is, if the machine was up for 24 hours and then shutdown for an
> > hour and then up for 23 hours I want an answer of 47.
> >
> > I need this for charge-back of departments using cloud computer which
> > they sometimes turn off.
>
> 1. Maybe the cloud computers' provider has the appropriate tool?
> In this case, if you don't find the tool yourself, you'll have to tell
> us which cloud provider are you working with.
>
> 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.
>
> --- Omer
>
>
> --
> MCSE - acronym for Minesweeper Consultant & Solitaire Expert. (Unknown)
> My own blog is at http://www.zak.co.il/tddpirate/
>
> My opinions, as expressed in this E-mail message, are mine alone.
> They do not represent the official policy of any organization with which
> I may be affiliated in any way.
> WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110201/2ec27bbc/attachment.html>


More information about the Linux-il mailing list