Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an off-site server, which I can get to physically if I drive to the office, but ash been having some stability issues lately.

So I dont have to wait until Monday to reboot the server, is there a way to have the server reboot automatically if it crashes?

Is this even a good idea?

share|improve this question
    
What type of crashes are we talking about? Kernel Panics? –  Nathaniel Bannister Mar 11 '11 at 0:04
add comment

2 Answers 2

The Xserve was the last mac hardware to ship with a controller chip to monitor the system with dedicated hardware.

Mac OS X Server has always had a watchdog like software process (first called watchdog - now launchd), so your best bet is to turn that on.enter image description here

If you find the built-in hang detection lacking, a good next step is to buy an internet controllable power outlet and simply set up whatever monitor/response time measure and trigger a reboot or an alert for a human to see if they can log in to address whatever issue has been raised.

share|improve this answer
add comment

Mac OS X and Mac hardware does not have any kind of watchdog capability to reboot after a crash. All Macs can be set to reboot after a power failure via the Energy Saver System Preferences panel, but not for crashes.

Intel-based Xserves support Lights Out Management (LOM) a.k.a. Intel's Intelligent Platform Management Interface (IMPI), which allows you to allocate separate IP addresses to the microcontrollers on the built-in Ethernet interfaces, and do things like remotely reboot (and shut down, and cold boot) the Xserve remotely.

It's a bit of a pain to set up because of two main gotchas:

  1. You have to use a separate IP address for the LOM feature. Don't make the mistake of trying to use your host Mac OS X's IP address because it'll conflict and the Ethernet interface will eat all the IP datagrams that were supposed to go to Mac OS X.

  2. For some inexplicable reason, the Ethernet microcontroller's LOM/IPMI feature can't use ARP to find the default gateway's MAC address, so you have to statically configure the interface to know the MAC address of its default gateway, and just hope that your default gateway router doesn't failover to a different MAC address or get replaced by a new box with a different MAC address when you weren't paying attention.

The Server Monitor app (/Applications/Server/Server Monitor.app) gives you a GUI to set some of this up, but configuring the static MAC address has to be done from the ipmitool(1).

...

Hmm, you might be able to use the pmset(1) command to schedule a periodic shutdown event followed by a poweron event, and then use a cron or launchd job to cancel it and reschedule it for sometime in the future if the machine hasn't crashed. I know the scheduled poweron events are handled by the System Management Controller, but I don't know how the shutdown events are handled. If they're somehow handled by the SMC as well, then I suppose there's a chance they'll work even on a crashed/frozen/hung/panicked/halted system. Never tried it myself. I only give it a 10% chance of working.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.