Another uptime story

Polytropon freebsd at edvax.de
Wed May 27 14:12:37 UTC 2009


On Wed, 27 May 2009 09:02:08 -0500, Andrew Gould <andrewlylegould at gmail.com> wrote:
> 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.

I've used a similar (but more easily designed) approach to
have a file /var/log/activity.log. This, of course, doesn't apply
for servers that run day by day, but for systems that are
powered off when not in use. Simple thing, just a formatted
date and uptime into a text file, run by rc.local and rc.shutdown.local.

My "best time" with FreeBSD 7 system:

	2008-12-14 00:27:42 - 2008-12-20 03:41:44 -  6 days,  3:14, 0 users

And FreeBSD 5:

	2007-02-23 04:54:07 - 2007-03-06 02:14:46 -  10 days, 21:21, 1 user

That's not the majority of entries, most of them are just a
few hours. Keep in mind that it is NOT a server - these lines
would look terrible if it would. :-)



> If you also  documented the installation date/time of various components,
> you could also track their lives separately.

At least their live IN USE. In many cases, it's no problem to use
a hard disk or a optical disc drive longer than the period it is
utilized in the server - it doesn't break when you switch to a
newer system. Erm sorry, I forgot the truth: It will of course
break before this point in time; in fact, it will break when you
need it most. :-)





-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list