total uptime between shutdowns
Yedidyah Bar-David
linux-il at didi.bardavid.org
Tue Feb 1 10:17:23 IST 2011
On Tue, Feb 01, 2011 at 10:00:52AM +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 do not know about anything that does exactly this, but you might want
to look at 'ud - Uptime Daemon'. But...
>
> I need this for charge-back of departments using cloud computer which they
> sometimes turn off.
I wouldn't use something from inside the guest for this. How do they
turn it off? Using some interface you created for them? I'd stuff into
this interface the counting. You should also consider what happens when
they "hibernate" (e.g. Xen's 'xm save'/'xm restore'), in case you let
them do this. This does not cost you CPU time or RAM - except for the
memory image which takes space (and needs to be backed up) it's exactly
like shutting down. But the guest will not notice - you'll not see
inside it anything that says that it was shutdown and restarted.
--
Didi
More information about the Linux-il
mailing list