-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mads,
If you have python 2.1, look at uptime.py at
. http://ronandheather.dhs.org/html/python.html
When run in daemon mode, every 10 seconds, it updates a data
file, and in client mode, it dumps the data file in one of 2
readable modes (depending on parameter).
On Tuesday 31 July 2001 14:07, Mads Rasmussen wrote:
> I would like to log the uptime of our systems, just I cannot see into
> the future to expect when a system crashes so an aproach that logs,
> like 1 time per hour should do it.
>
> I guess you could run a crontab script that just cat's the uptime
> output into /var/log/uptime
>
> This however will be overwritten when the system comes back up, so I
> thought it would be better to log in two files a live one and a
> backup one.
>
> Like
>
> uptime > uptime.running
> uptime > uptime
>
> This just make it worse, what if the system breaks down twice? Then
> the first logged uptime will vanish.
>
> What I guess I am looking for is when the uptime gets activated, if I
> could just before uptime gets called for the first time, do a
> logrotate, then I would be safe.
>
> It wouldn't be enough to insert a logrotating script in rc.local
> would it?
>
> Any other approaches?
>
> Regards,
>
> Mads
- --
+------------------------------------------------------------+
| Ron Johnson, Jr. Home: [EMAIL PROTECTED] |
| Jefferson, LA USA http://ronandheather.dhs.org |
| |
| "Our computers and their computers are the same color. The |
| conversion should be no problem!" |
| Unknown |
+------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7ZygDjTz5dS9Us5wRAp5bAJ4hldly6Tm+9S3zKjyLyZeKp+Zs0wCeImR5
cBFMdSptA+42w9/HVCyhaIY=
=TeXs
-----END PGP SIGNATURE-----