LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-09-2005, 11:07 AM   #1
icehenge
Member
 
Registered: Jan 2004
Location: Tennessee
Distribution: Slackware 8.1 (KDE 3.0.1)
Posts: 69

Rep: Reputation: 15
When was my last reboot


Well I was going for a record running for a personal reocrd on system uptime
then today the GUI locked up and then thereafter seemed the system stopped
responding all together...
I was had my system up at least 4 months. How do I find out the date the system
was last restarted so I can calculate just how long the system was on.
The system logs don't go back that far as they are rotating log files and are
overwritten every so often.

Any way to find this out?

Alex
 
Old 10-09-2005, 11:21 AM   #2
shadoxx428
Member
 
Registered: Jan 2005
Location: Los Angeles, CA
Distribution: Xubuntu
Posts: 41

Rep: Reputation: 16
Yeah, I'm pretty sure all you have to do is issue the command: uptime

Now I'm not sure if that is from the last reboot...I think it's the total time your computer has been on overall.
 
Old 10-09-2005, 11:22 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You could try the last command. But it depends on /var/log/wtmp, don't know if that one is rotated (already) by your box.

Hope this helps.
 
Old 10-09-2005, 11:26 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@shadoxx428:

uptime only gives information about your current uptime, there's no 'history':

$ uptime
18:23:48 up 221 days, 19:43, 8 users, load average: 0.20, 0.24, 0.36

man uptime for (few) details.

hope this helps.
 
Old 10-09-2005, 11:49 AM   #5
shadoxx428
Member
 
Registered: Jan 2005
Location: Los Angeles, CA
Distribution: Xubuntu
Posts: 41

Rep: Reputation: 16
Hah, didn't know that. Guess I should do `man` more often before I go giving advice. I just love that command because of the simplicity and functionality of it. On Windows I was always wondering how long my computer had been on. Thanx for your help.

And one solution I could suggest, it probably wouldn't be the most accurate. But if you can remember a file you saved around 4 months ago, like when you first turned your computer on for the marathon, maybe if you look at the date created it could give you some point of reference.

I'm aware that what I just suggested works for the wrong reasons, but at least it should work...at least in theory. ^_^

Last edited by shadoxx428; 10-09-2005 at 11:51 AM.
 
Old 10-09-2005, 04:24 PM   #6
icehenge
Member
 
Registered: Jan 2004
Location: Tennessee
Distribution: Slackware 8.1 (KDE 3.0.1)
Posts: 69

Original Poster
Rep: Reputation: 15
thanks for all the replys, looks like i'm not gonna be able to find out.
I roughly calculated 4 1/2 months, pretty good i figure.

take care all
alex
 
Old 10-09-2005, 08:00 PM   #7
TexasDevilDog
Member
 
Registered: Nov 2003
Posts: 54

Rep: Reputation: 15
Quote:
Originally posted by icehenge
thanks for all the replys, looks like i'm not gonna be able to find out.
I roughly calculated 4 1/2 months, pretty good i figure.

take care all
alex
You can look in here /var/logs/messages might take some time but it is in there.
 
Old 10-10-2005, 08:36 PM   #8
icehenge
Member
 
Registered: Jan 2004
Location: Tennessee
Distribution: Slackware 8.1 (KDE 3.0.1)
Posts: 69

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by TexasDevilDog
You can look in here /var/logs/messages might take some time but it is in there.
Yeah I already looked in there.
The rotating set of logs only got back to mid September....
/var/log/messages.1 (.2 .3 and .4)

Wish I knew how to extend the log rotation so it doesn't get overwritten
after a few months...
 
Old 10-10-2005, 09:42 PM   #9
TexasDevilDog
Member
 
Registered: Nov 2003
Posts: 54

Rep: Reputation: 15
man logrotate
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No keyboard/mouse after reboot. Requires second reboot to work. rottie Linux - Hardware 6 01-16-2006 05:04 AM
reboot when "reboot" command not responding? neocookie Linux - General 1 08-30-2005 04:59 AM
reboot bong.mau Linux - Hardware 10 04-22-2004 11:08 AM
Cant Reboot........ randon Linux - General 3 10-16-2003 03:05 AM
HELP in reboot kcwoo Linux - General 5 02-06-2002 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration