|
| Re: Recent downtimes [message #12932 is a reply to message #12929 ] |
Tue, 08 July 2008 13:28   |
Kiai Messages: 58 Registered: April 2008 Location: exploring the penultimate... |
|
|
|
If sequencing is the problem, giving a machine which stays up the job of issuing the commands might be the solution. I use something like that to control the dialup modem here, by having a script issue this at the appointed time:
ssh dialup_gateway "killall -HUP wvdial"
Even a shell script can respond to the error codes reported back by ssh commands so it's not all open-loop.
Just a thought.
|
|
|
| Re: Recent downtimes [message #12947 is a reply to message #12929 ] |
Tue, 08 July 2008 21:11   |
storyreader2005 Messages: 88 Registered: July 2005 Location: Ohio |
|
|
|
| Warren wrote on Tue, 08 July 2008 12:20 | Bob had configured the server to automatically reboot around 1 am his time. Sadly it's not working quite the way it was expected to work so it has been disabled.
|
Well if Bob doesn't care about lost or unsaved data, I think that this is pretty much a universal Linux command to reboot:
So using the cron scheduling daemon to reboot every day @ 1:30AM the entry would be:
30 1 * * * /sbin/shutdown -r now
and if you don't want to get an e-mail about the reboot you can add this to the end of the line:
so to reboot the server @ 1:30AM every day and not get an e-mail:
30 1 * * * /sbin/shutdown -r now >/dev/null 2>&1
|
|
|
|
| Re: Recent downtimes [message #12958 is a reply to message #12948 ] |
Wed, 09 July 2008 12:34   |
Kiai Messages: 58 Registered: April 2008 Location: exploring the penultimate... |
|
|
|
| Warren wrote on Tue, 08 July 2008 21:39 | I talked to him about the problem. Since I'm not a server person. he tells me it's something between CentOS and the motherboard bios that is preventing it from doing a software restart successfully. It hard boots fine.
|
Okay, I get that. CentOS is Red Hat Enterprise Server relabeled. Now I'm sorry I haven't kept up with recent RedHat/Fedora releases.
Next crazy suggestion: X-10. Sending the affected server to runlevel 0 (halt), rather than 6 (reboot), makes the server put all its toys away and sit quietly waiting for lights-out. Then use X-10 to actually switch off the server's power for a minute or so. The BIOS then wakes up in a cold-boot restart.
I use an X-10 setup here to drive some lights and fans on a schedule. A 'firecracker' module plugs into a serial port to transmit wireless commands to a receiver unit which can also serve as an appliance-control module (meaning, 15-amp relay contacts rather than triacs are used to switch the power on and off, so controlling a server is no problem). 'bottlerocket' is the name of the program that wiggles the serial port's lines appropriately to do this. Googling "linux home automation" will yield more names.
I've run this on a Red Hat box successfully for nearly a decade. The only problem I've had is with wireless wall switches: recent HP computers spew out enough RF garbage to interfere with their signal from across the house. Across a server room should be no problem. The X-10 stuff is all reusable when the mobo with the pesky BIOS is reflashed, repurposed or persuaded to do its job.
Again, just a suggestion.
|
|
|
|
| Re: Recent downtimes [message #12977 is a reply to message #12970 ] |
Wed, 09 July 2008 21:16   |
 |
Sir Lee Messages: 3068 Registered: May 2005 Location: São Paulo, Brazil |
|
|
|
OK, what about this?
- Set up the BIOS of the server to auto-start at, say, 2:00 AM;
- cron a task to shutdown the server at, say, 1:55 AM.
If all goes well, the server will cold-boot a couple minutes after shutting down.
Of course, it all depends on it being possible to set up the BIOS to auto-start *every day*, as opposed to auto-starting *just once*.
Sir Lee
Don't call me Shirley. You will surely make me surly.
--
Sent from my Bugs Industries® bPhone™
|
|
|
|