John J. Foster wrote:
On Thu, May 13, 2010 at 05:18:08PM -0600, John J. Foster wrote:
On Fri, May 14, 2010 at 01:02:01AM +0200, Alex Schuster wrote:
John J. Foster writes:
I lost utility power for 2 hours today while at work (on my home
machine). UPS probably help for 20 minutes, or so. Just out of
curiousity, is there a way to determine previous system uptime. I know
I was getting close to 11 months, which would be a record for me.
The system logs boot and login dates in /var/log/wtmp, the last command
shows the content of this binary file.
last | grep "system boot" | head
Hope you broke the record,
Wonko
fes...@localhost ~ $ last | grep "system boot"
reboot system boot 2.6.28-gentoo-r5 Thu May 13 16:39 - 17:30 (00:51)
OK, so after looking at "man last", I tried
fes...@localhost ~ $ last reboot
reboot system boot 2.6.28-gentoo-r5 Thu May 13 16:39 - 17:30 (00:51)
wtmp begins Sat May 1 08:23:36 2010
which doesn't really help much.
Any other ideas,
festus
Damn - log-rotate cleans wtmp monthly
--
It is not unusual for those at the wrong end of the club to have a
clearer picture of reality than those who wield it.
Noam Chomsky
This is mine:
r...@smoker ~ # last | grep boot
reboot system boot 2.6.30-gentoo-r8 Sun May 9 20:51 - 20:56 (4+00:05)
reboot system boot 2.6.30-gentoo-r8 Sun May 9 03:49 - 19:21 (15:31)
reboot system boot 2.6.30-gentoo-r8 Mon May 3 17:29 - 14:48 (4+21:18)
r...@smoker ~ #
Isn't the last part of the line the uptime? I haven't done the math to
say that it is, just curious. Also, I have logrotate set to rotate
mine. I delete them after a while or when I need disk space. They do
consume space after a while.
Dale
:-) :-)