LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-21-2004, 11:53 AM   #1
utmpwtmp
LQ Newbie
 
Registered: Aug 2004
Distribution: Red Hat Linux 8
Posts: 3

Rep: Reputation: 0
Determining what time power was pulled on Red Hat 8 system


Basically what it says in the subject. I'm using a Red Hat 8 machine without any kind of power saving business enabled to intercept the power button; when I press the power button the machine turns off instantly. Since there's no chance for the system to record when the power was shut down, is there some way to infer it? The closest I've come has been using /usr/bin/last to figure out when I last pulled up an xterm, since I do this often when using the machine. However, inactivity would have the same effect as a switching off for the wtmp/utmp logs. Is there a better way?
 
Old 08-21-2004, 11:59 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I really wouldn't reccomend shutting your system down like that with your filesystems in rw mode.

Try shutting down with:
shutdown -h now
 
Old 08-21-2004, 12:09 PM   #3
utmpwtmp
LQ Newbie
 
Registered: Aug 2004
Distribution: Red Hat Linux 8
Posts: 3

Original Poster
Rep: Reputation: 0
Yeah, most of the time I use halt -p. It's just that there's the occasional instance where a program like firefox runs away and makes the machine unresponsive.
 
Old 08-21-2004, 12:13 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If that was happening I think I would try and find out why.

Another simple solution would be to write a log file every 5 minutes with a cron entry like:
*/5 * * * * date > /var/log/up.log

Then you can just take a look at the log to see when the system was up.
 
Old 08-21-2004, 06:49 PM   #5
utmpwtmp
LQ Newbie
 
Registered: Aug 2004
Distribution: Red Hat Linux 8
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the advice!
 
  


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
Red Hat por IBM Power PC workstation. mveiga Red Hat 2 10-31-2011 03:47 PM
Red Hat always hangs up after power failure ako Linux - Newbie 3 01-17-2004 08:50 PM
power management on red hat 7.3 garrrafa Linux - Newbie 0 03-31-2003 04:49 AM
Future Power and Red Hat 7.3 mikeshn Linux - Hardware 0 01-29-2003 01:38 PM
Future Power monitor with Red Hat 7.3 mikeshn Linux - General 0 01-28-2003 09:35 PM

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

All times are GMT -5. The time now is 03:24 AM.

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