LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   My son is innocent! (http://www.linuxquestions.org/questions/slackware-14/my-son-is-innocent-382988/)

Seiken 11-14-2005 07:32 AM

My son is innocent!
 
I had been getting angry with my 2.5 year old son daily because I thought he was hitting the reset button on my slackbox. See, I work nights so his mother gets up with him in the morning... but when she gets up, she's been falling asleep on the couch! So he gets to run around and do whatever he wants until she or I get up.

The slackbox was being reset literally daily. Each day, I cringed at the possibility of corrupt files. Each day, though, everything was fine. The first time he did this (I watched him flick off the power bar,) I lost everything, which is why I've been frustrated with these daily occurances.

So I was up with him instead, and even before anyone could touch the box, I noticed it had been reset. It just sits there at a login prompt ready for use. It always has messages about a bad filesystem getting fixed up (if I do a regular "shutdown -r now", I don't get the bad filesystem messages, so I know it is being reset incorrectly somehow.)

How can I found out what is causing my system to reset every day like this (in the middle of the night, apparently, since it's fine before I go to bed.) Is there a process? Is there some key-combo other than CTRL+ALT+DEL that my cat might be stepping on. Even if there was, I leave the box completely logged out before I go to bed (I just leave it on so all my servers can run.) I know the cat can't push the reset button.

Any insight would be appreciated. Thanks.

meranto 11-14-2005 07:45 AM

Maybe you got hardware problems that cause a reboot?

cs-cam 11-14-2005 08:02 AM

Check the logs, see if it's happening at the same time every night and what is happening right before the reset.

Seiken 11-14-2005 08:27 AM

What logs do I check?

sweetnsourbkr 11-14-2005 09:59 AM

last

Seiken 11-14-2005 11:16 AM

if by "last" you mean /var/log/lastlog, that just contains a bunch of ^ and @ symbols. could you be more specific?

mdg 11-14-2005 12:03 PM

Check /var/log/dmesg and /var/log/messages. Also, do you have any cron jobs scheduled to run at night?

Seiken 11-14-2005 12:16 PM

I'm not really sure what to make of dmesg and messages in /var/log. There is a lot to go through in them, and I'm not advanced with linux yet. As far as cron goes, I think what you're looking for us /etc/cron.daily? If so, the only thing in that directory is a script called slocate which runs "/usr/bin/updatedb -c" and another script called logrotate which runs "/usr/sbin/logrotate /etc/logrotate.conf"

dracolich 11-14-2005 03:20 PM

I'm with meranto. Sounds like a possible hardware issue. It sounds like you keep it running all the time (or try to anyway). What's the ventilation like around the box and what measures do you take to reduce heat inside the box?

Alien Bob 11-14-2005 04:54 PM

My server started to do spontaneous reboots - every once in a while, and I did not take it too seriously... but then the period between two reboots became shorter... and shorter... now rebooting every day... and even faster... up to the dreaded situation where it would reboot again before the computer had a chance to reach the command prompt.
That was the moment I decided that the hardware was wasted and I swapped it for the spare server I had been building in anticipation of this.

So yeah... most probably you've got a hardware problem :-)

On the other hand, I once had a situation where a server would reboot exactly once a week, at the same time. Nothing wrong with the server hardware...
Turned out that the UPS it was connected to performed a "self-test" once a week, thereby cutting power to the attached computers for just a tiny fraction of a second. All computers but one managed to keep running!

Eric

Seiken 11-14-2005 09:48 PM

I suppose it's possible that there is a hardware problem... but rebooting in the same time-frame every day? I just got home from work, and the PC is fine. It's been on all day. It only happens overnight. Is there a way I can check what time it is rebooting?

I think I'll reboot it before I go to bed tonight. If it's been on all day without rebooting, it can sure withstand 8 hours overnight after a fresh reboot.

I'm confused by the comment about me trying to keep it running all day... isn't keeping it running all day a good thing? It runs servers... :\

zzak 11-14-2005 11:35 PM

You could try the following:
As root, at the command prompt, enter:
grep -e "Nov 14" /var/log/messages > /home/user/test

What this means is this:
You are looking for an expression "Nov 14" in the file "messages"
which is located in the /var/log/ directory.

The ">" means you are sending the result of your search to
the "test" file located in /home/user.

Next, you would need Midnight Commander to do the following:
Open mc (Midnight Commander), then navigate down /home/user until
you highlight the file "test".
Click F3 to view the file.
When viewing, click F7 to bring up the search tool.
Enter "restart" in the search field, and then choose OK
The word "restart" will be highlighted. This will tell you
the time that the computer was restarted on Nov. 14
Repeat F7 and the search will take you to the second instance
of your computer restarting.
Repeat until all restart times have been shown.

Instead of "test" you could name the file Nov14.
Do the same for Nov. 13 etc.

shilo 11-15-2005 12:41 AM

I would also gues hardware issue (not much help, huh? :) )

I also think the logs may be helpful. If you are having trouble knowing what to look for in the logs, they aren't doing much good. "mv" them to some other name before bed. Then, when you wake up and see that the server has rebooted, the logs have "mostly" useful info. Alternatively, you can "echo" in a distinctive mark (in combination with ">>") before you go to bed. The issue will clearly occur after the mark.

slackMeUp 11-15-2005 01:00 AM

Quote:

Originally posted by Seiken
if by "last" you mean /var/log/lastlog, that just contains a bunch of ^ and @ symbols. could you be more specific?
By 'last' he actually means...

Code:

#last
It's a command... it displays the last logins, and reboots...

dhave 11-15-2005 02:12 AM

Re: My son is innocent!
 
Quote:

Originally posted by Seiken
I had been getting angry with my 2.5 year old son daily because I thought he was hitting the reset button on my slackbox. See, I work nights so his mother gets up with him in the morning... but when she gets up, she's been falling asleep on the couch! So he gets to run around and do whatever he wants until she or I get up.

The slackbox was being reset literally daily. Each day, I cringed at the possibility of corrupt files. Each day, though, everything was fine. The first time he did this (I watched him flick off the power bar,) I lost everything, which is why I've been frustrated with these daily occurances.
[...]
Any insight would be appreciated. Thanks.

You could wait until an upgrade of the kid is available. I did this, and the current version of my son (he's at v. 17.4 now) is no longer goofing things up on my computer. In fact, he helps fix it. When my kid was at v. 2.x and even v. 3.x, however, I had a lot of problems of the type you describe.

I should warn you, though, that there are other bugs that have been introduced with the more recent versions. Still, I'm generally happy with this app.


All times are GMT -5. The time now is 09:37 PM.