[olug] Uptime to boot date

Jon H. Larsen relayer at omahadirect.net
Tue Oct 29 18:05:24 UTC 2002


Good idea.

That should be close enough.
2527 Jun 23  2001 dmesg

'ps auxw' lists init starting in 2001
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  1376   72 ?        S     2001   0:35 init [3]

Not much in /proc/1 that gives anything away.  Hmmm....


Thanks for all the suggestions.
Jon l.
On Tue, 29 Oct 2002, Dave Hull wrote:

> Date: Tue, 29 Oct 2002 11:42:25 -0600 (CST)
> From: Dave Hull <dphull at insipid.com>
> Reply-To: olug at olug.org
> To: olug at olug.org
> Subject: Re: [olug] Uptime to boot date
> 
> On Tue, 29 Oct 2002, Dave Hull wrote:
> 
> > Hm, not sure how to do that, but you could use this:
> > 
> > [~]$ last | grep -i boot
> 
> Come to think of it, this won't do you any good if you're logs are rotated out 
> before your server is rebooted. If you've got /var/log/dmesg, you could check 
> the date of that file to get a close approximation of the last boot time.
> 
> Good luck.
> 
> 

-- 
 [ Jon H. Larsen  - email: relayer at omahadirect dot net         ]
 [ ICQ#: 10412618 - http://www.animesunday.org/jonl               ]
 [ PGP Pubkey - http://www.animesunday.org/jonl/relayerpubkey.txt ]




More information about the OLUG mailing list