LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2011, 05:29 AM   #1
event2000
LQ Newbie
 
Registered: Sep 2006
Posts: 11

Rep: Reputation: 0
How to find out WHY my linux box has restarted


Hi,

i wanted to connect to my headless (no screen etc) linux box, but vncserver wasn't runnning. Going through the logs i found out the system started up new (dunno if reboot or something else) 2 days ago.

Now this already happened some time ago, but i didn't give it much of a thought.

But since it seems to happen more frequently I want to know whats causing this.

Its an debian squeeze box running xen4.0 with an windows vm. I also have a apc smartups1400 connected and i'm monitoring it with apcupsd.

Now apcupsd log is clean, and the xend.log just shows the start of the xen deamon on the time the system started up again.

How to find out if some program or whatever sended a reboot command?

Or if its some PC problem (i know xen has problems with some mainboard bios etc) and the pc sometimes just suddenly reboots, is there any way to see wether the system shutted down before the reboot or just suddenly started again?

Thanks in advance
 
Old 08-28-2011, 06:42 PM   #2
GNULinuxGuy
LQ Newbie
 
Registered: Jan 2011
Location: Southeastern US
Distribution: Arch, Debian, Linux Mint
Posts: 11

Rep: Reputation: 1
If there's nothing logged, then it's extremely unlikely it was told to reboot. Possibilities in order of likelihood:

1) Hardware problem causing spontaneous reboot.
2) Security issue; buggy root kit, or someone with physical access.
3) Genuine kernel/driver bug/regression (pretty unlikely since you say it's Debian, but stranger things have happened).

Assuming you have no real computer diagnostic equipment, I would start with booting a live CD/DVD/USB stick and do some load testing. See if you can't get it to spontaneously reboot in front of you. Assuming this system was stable at one point, and you haven't just done a kernel/driver update, etc, I would say the most likely culprit is the power supply or RAM. If you suspect the former, some places will test your power supply for free. If you suspect it's the RAM, you should be able to verify this by running memtest86+ for an extended period, and then use trial and error to identify which stick is acting up.

Good luck!
 
Old 08-29-2011, 12:44 PM   #3
event2000
LQ Newbie
 
Registered: Sep 2006
Posts: 11

Original Poster
Rep: Reputation: 0
If some system service, like apcupsd, did for some reason give the system a shutdown or reboot command, where would this be logged?
 
Old 08-30-2011, 01:57 AM   #4
GNULinuxGuy
LQ Newbie
 
Registered: Jan 2011
Location: Southeastern US
Distribution: Arch, Debian, Linux Mint
Posts: 11

Rep: Reputation: 1
The pseudo user reboot logs in each time the system is told to reboot. You will see a reboot line when you use the 'last' command (or simply type 'last reboot' to see only the reboots).
 
Old 08-30-2011, 02:13 AM   #5
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Quote:
Originally Posted by GNULinuxGuy View Post
If there's nothing logged, then it's extremely unlikely it was told to reboot. Possibilities in order of likelihood:

1) Hardware problem causing spontaneous reboot.

Assuming this system was stable at one point, and you haven't just done a kernel/driver update, etc, I would say the most likely culprit is the power supply or RAM. If you suspect the former, some places will test your power supply for free. If you suspect it's the RAM, you should be able to verify this by running memtest86+ for an extended period, and then use trial and error to identify which stick is acting up.
All valid, but I'd add 'overheating CPU'.
 
1 members found this post helpful.
Old 08-31-2011, 01:33 AM   #6
GNULinuxGuy
LQ Newbie
 
Registered: Jan 2011
Location: Southeastern US
Distribution: Arch, Debian, Linux Mint
Posts: 11

Rep: Reputation: 1
Quote:
Originally Posted by cascade9 View Post
All valid, but I'd add 'overheating CPU'.
Indeed this is a possibility I probably should have mentioned, however in most instances where the CPU is overheating, the BIOS should be shutting the computer off, not restarting it. It might be right on the edge, and/or the BIOS doesn't have the best defaults for making sure his specific CPU stays stable, but if this were the case, most likely he would notice the pattern of CPU load causing it to reboot.

It's always a good idea to use something to monitor your hardware sensors, especially when you're thinking about availability with things such as a UPS.
 
Old 08-31-2011, 07:51 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Can you use this http://linux.die.net/man/1/sensors (& ref to http://www.lm-sensors.nu/) ?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual box guest additions gone when host os is restarted / cold boot hottdogg Linux - Virtualization and Cloud 3 01-21-2010 10:01 PM
Find IP of a linux box an_sush Linux - Newbie 5 06-30-2009 11:23 PM
Any way to find out who has restarted a service or a machine ? exceed1 Linux - General 7 09-07-2008 01:05 PM
find linux box by name vs. IP zchoyt Linux - Networking 6 08-15-2005 10:24 PM
Box restarted Sn7 Linux - Software 5 07-06-2004 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:25 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