FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-13-2010, 10:35 PM
"John J. Foster"
 
Default Previous system uptime - not Gentoo specific

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.

Thanks,
festus

--
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
 
Old 05-13-2010, 11:18 PM
"John J. Foster"
 
Default Previous system uptime - not Gentoo specific

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
>
festus@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

festus@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
--
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
 
Old 05-13-2010, 11:47 PM
"John J. Foster"
 
Default Previous system uptime - not Gentoo specific

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
> >
> festus@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
>
> festus@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



--
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
 
Old 05-14-2010, 12:17 AM
Alex Schuster
 
Default Previous system uptime - not Gentoo specific

John J. Foster writes:

> > Hope you broke the record,
> > Wonko
>
> festus@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
>
> festus@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.

Strange. My wtmps are quite older:

wonko@zone ~ $ last -F |tail -n 3
reboot system boot 2.4.18-xfs Sat Jul 13 00:08:20 2002 - Sun Jul
14 02:53:25 2002 (1+02:45)

wtmp begins Sat Jul 13 00:08:20 2002

> Any other ideas,

You could wait with your next reboot until May next year. Then it would no
longer matter much as you broke the record anyway.

Wonko
 
Old 05-14-2010, 02:00 AM
Dale
 
Default Previous system uptime - not Gentoo specific

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



festus@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

festus@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:

root@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)
root@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

:-) :-)
 
Old 05-14-2010, 08:24 AM
Neil Bothwick
 
Default Previous system uptime - not Gentoo specific

On Fri, 14 May 2010 02:17:51 +0200, Alex Schuster wrote:

> > wtmp begins Sat May 1 08:23:36 2010
> >
> > which doesn't really help much.
>
> Strange. My wtmps are quite older:

The default logrotate.conf rotates wtmp monthly.


--
Neil Bothwick

Mouse: (n.) an input device used by management to force computer users to
keep at least a part of their desks clean.
 
Old 05-15-2010, 04:01 AM
Stroller
 
Default Previous system uptime - not Gentoo specific

On 13 May 2010, at 23:35, John J. Foster wrote:


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.


Too late now, but installing app-misc/uptimed will answer this
question in the future.


Mandatory willy-waggling:

$ uprecords
# Uptime |
System Boot up
----------------------------
+-------------------------------------------------
1 316 days, 09:28:33 | Linux 2.4.25 Mon Mar 12
22:11:01 2007
2 295 days, 18:59:25 | Linux 2.4.25 Sun Apr 6
09:26:35 2008
3 256 days, 22:14:22 | Linux 2.4.25 Mon Mar 12
21:57:23 2007
4 255 days, 21:54:14 | Linux 2.4.25 Mon Aug 15
20:05:36 2005
-> 5 203 days, 19:55:51 | Linux 2.4.25 Fri Oct 23
08:51:59 2009
6 161 days, 11:58:56 | Linux 2.4.25 Mon Oct 2
01:52:16 2006
7 155 days, 13:17:15 | Linux 2.4.25 Thu Mar 10
15:56:47 2005
8 152 days, 01:01:03 | Linux 2.4.25 Sun Apr 6
09:18:11 2008
9 123 days, 17:11:24 | Linux 2.4.25 Fri Apr 28
18:35:54 2006
10 123 days, 09:49:55 | Linux 2.4.25 Thu Feb 12
10:08:25 2009
----------------------------
+-------------------------------------------------
1up in 52 days, 01:58:24 | at Tue Jul 6
06:56:48 2010
no1 in 112 days, 13:32:43 | at Sat Sep 4
18:31:07 2010

$

Newer output showing downtime and % is nicer:

$ uprecords
# Uptime |
System Boot up
----------------------------
+---------------------------------------------------
-> 1 76 days, 00:09:02 | Linux 2.6.31-gentoo-r6 Sun Feb 28
03:49:26 2010
2 39 days, 22:26:38 | Linux 2.6.31-gentoo-r6 Tue Jan 19
05:21:23 2010
----------------------------
+---------------------------------------------------
NewRec 36 days, 01:42:23 | since Fri Apr 9
03:16:09 2010
up 115 days, 22:35:40 | since Tue Jan 19
05:21:23 2010
down 0 days, 00:01:25 | since Tue Jan 19
05:21:23 2010
%up 99.999 | since Tue Jan 19
05:21:23 2010

$

Stroller.
 
Old 05-15-2010, 04:01 AM
Stroller
 
Default Previous system uptime - not Gentoo specific

On 13 May 2010, at 23:35, John J. Foster wrote:


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.


Too late now, but installing app-misc/uptimed will answer this
question in the future.


Mandatory willy-waggling:

$ uprecords
# Uptime |
System Boot up
----------------------------
+-------------------------------------------------
1 316 days, 09:28:33 | Linux 2.4.25 Mon Mar 12
22:11:01 2007
2 295 days, 18:59:25 | Linux 2.4.25 Sun Apr 6
09:26:35 2008
3 256 days, 22:14:22 | Linux 2.4.25 Mon Mar 12
21:57:23 2007
4 255 days, 21:54:14 | Linux 2.4.25 Mon Aug 15
20:05:36 2005
-> 5 203 days, 19:55:51 | Linux 2.4.25 Fri Oct 23
08:51:59 2009
6 161 days, 11:58:56 | Linux 2.4.25 Mon Oct 2
01:52:16 2006
7 155 days, 13:17:15 | Linux 2.4.25 Thu Mar 10
15:56:47 2005
8 152 days, 01:01:03 | Linux 2.4.25 Sun Apr 6
09:18:11 2008
9 123 days, 17:11:24 | Linux 2.4.25 Fri Apr 28
18:35:54 2006
10 123 days, 09:49:55 | Linux 2.4.25 Thu Feb 12
10:08:25 2009
----------------------------
+-------------------------------------------------
1up in 52 days, 01:58:24 | at Tue Jul 6
06:56:48 2010
no1 in 112 days, 13:32:43 | at Sat Sep 4
18:31:07 2010

$

Newer output showing downtime and % is nicer:

$ uprecords
# Uptime |
System Boot up
----------------------------
+---------------------------------------------------
-> 1 76 days, 00:09:02 | Linux 2.6.31-gentoo-r6 Sun Feb 28
03:49:26 2010
2 39 days, 22:26:38 | Linux 2.6.31-gentoo-r6 Tue Jan 19
05:21:23 2010
----------------------------
+---------------------------------------------------
NewRec 36 days, 01:42:23 | since Fri Apr 9
03:16:09 2010
up 115 days, 22:35:40 | since Tue Jan 19
05:21:23 2010
down 0 days, 00:01:25 | since Tue Jan 19
05:21:23 2010
%up 99.999 | since Tue Jan 19
05:21:23 2010

$

Stroller.
 

Thread Tools




All times are GMT. The time now is 05:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org