NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: uptime, where art thou ?

2008/4/22, Geert Hendrickx <>:
> On Tue, Apr 22, 2008 at 10:25:27AM +0200, Zafer Aydogan wrote:
>  > Thanks, but I meant, how can I find out the uptime, before the reboot has
>  > taken place. The one that got lost.
> You can only do that by regularly polling the uptime and logging it, either
>  via a local script, or remotely via SNMP and cricket for example.
>  After a reboot, the system itself has "forgotten" its previous uptime (how
>  should it store it eg. in case of a panic?).
>         Geert

I think it would be quite handy, if "last" would log the uptime,
before a reboot takes place.

I've seen this on Linux.

Quote from the man page:
"  The pseudo user reboot logs in each time the  system  is  rebooted.   Thus
       last reboot will show a log of all reboots since the log file
was created."

it looks like this:

reboot   system boot Fri Dec 22 16:44         (158+00:14)

Here you see the uptime was 158 days +

What do you think about it ?


Home | Main Index | Thread Index | Old Index