Another uptime story
Andrew Gould
andrewlylegould at gmail.com
Wed May 27 14:02:15 UTC 2009
On Wed, May 27, 2009 at 8:45 AM, Chris Rees <utisoft at googlemail.com> wrote:
> 2009/5/27 Glen Barber <glen.j.barber at gmail.com>:
> > On Tue, May 26, 2009 at 11:23 PM, Polytropon <freebsd at edvax.de> wrote:
> >> Maybe there's a way of patching the uptime utility that it adds
> >> the previous uptime of the system (since last shutdown) to the
> >> actual uptime. I know this denies everything uptime stands for,
> >> let's call it accumulated uptime. :-)
> >>
> >
> > I like that idea, actually.. Not for faking cumulative uptime. It'd
> > be kinda nice knowing how long a particular machine has been 'alive'
> > without looking through service tag records.
> >
> > --
> > Glen Barber
>
> How about:
>
> [chris at amnesiac]~% ls -l /etc/ssh/ssh_host_key.pub
> -rw-r--r-- 1 root wheel 324 Apr 15 2008 /etc/ssh/ssh_host_key.pub
> [chris at amnesiac]~%
>
> I think I'd cry if I were to lose 553 days of uptime....
>
> Chris
>
You could write a script that sends uptime output and a start/stop flag to a
database when the system starts and stops. This wouldn't account for
improper shutdowns, although you could tell when a "stop" date/time was
missing.
If you also documented the installation date/time of various components,
you could also track their lives separately.
Andrew
More information about the freebsd-questions
mailing list