Remote force restart
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
How can I remote force restart a Mac Mini Intel ?
I have tried with sudo shutdown -r now, but that was not able to do the job. According to the top command, 7 processes where stuck.
The Mac was reacting to terminal commands, but the screen was light blue, with the spinning wheel. I needed to force restart manually
How can I find out, what processes are stuck?
7 replies
Sign in or join Beachball Help to reply.
- 0
Tim Haigh ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
sudo reboot
works for me most of the time to restart a server remotely.
Also if you saw stuck processes in top. take a note of their PID numbers and then you can kill those processes.
sudo kill PIDnumber
- 0
Kappy ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
From a Terminal session:
ps -Aj
Under the STAT column (status) look for "E" which means the process is trying to exit.
- 0
Kappy ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
From a Terminal session:
ps -Aj
Under the STAT column (status) look for "E" which means the process is trying to exit.
- 0
Urs Gruetzner ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for this hint.
Is there a Unix command to simulate the manual force quit?
As I understand the "Shutdown" command is a regular shutdown process and cannot deal with stucked processes.
I have tried to make a remote restart of the server without success and was forced to go into the office in the middle of the night...
Or would it have helped (shutdown will work), if I would have been able to identify and kill the stucked processes?
- 0
Tim Haigh ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
sudo reboot
works for me most of the time to restart a server remotely.
Also if you saw stuck processes in top. take a note of their PID numbers and then you can kill those processes.
sudo kill PIDnumber
- 0
Urs Gruetzner ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
reboot seems to be somewhat more straightforward as shutdown is " to nicely notify users when the system is shutting down" as the man page says.
However I am surprised, that the shutdown command was not able to shut down the system, because (according to the man page): "Upon shutdown, all running processes are sent a SIGTERM followed by a SIGKILL."
According this I would expect that also stucked process would be killed, but which was not the case.
May be a manual kill of stucked processes and then reboot will do the job.
It would avoid hopefully a midnight ride next time...
Urs
PS: I am not used having stucked processes with OSX. I am using Synchronize Pro to do a weekly backup, but this app hangs after may be one or two weeks (its waiting eternally for a Apple Event and I need to fully reboot the system to get rid of the next hang of Synchronize.)
- 0
DoctorBMac ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I've had the same problem and had my server get stuck halfway through a shutdown when I was 100 miles away! I've also had firewalls, DSL modems, T1 routers, etc get stuck too.
My solution was to use home automation controllers (I use Insteon, but x10 will too). This way, I can remotely power cycle the recalcitrant mac (or firewall, or DSL modem, etc).
Simply set up indigo (www.perceptiveautomation.com) on your mac, and you can control everything from an iphone with the indigo app. YOu can get the modules from machomestore (www.machomestore.com) or smarthome (www.smarthome.com)
I have a cable modem, DSL modem with static IP, sonicwall firewall (which automatically load balances between the cable and DSL, and allows continuous service should one fail) and my macs. I also have a smartlink controller connected straight to the DSL modem ahead of the firewall. That way, if the firewall or mac crashes, I can cycle it through the DSL from my iphone. Everything else can be managed using indigo. I programmed both the smartlink and the mac to send periodic "ON" commands to everything in case I accidently send an "off" command, rather than running the "cycle" program.
X10 also makes a phone based controller that you can dial into and control X10 appliance modules. I chose insteon because it is more reliable and less prone to noise.
I'm currently working on writing applescript programs to proactively monitor everything and automatically cycle any stuck device.
Note that if you use a UPS, you'll have to put the appliancelinc module between the UPS and the mac. You'll also need a pair of insteon access points, one plugged into the UPS and one straight into the wall, to couple the insteon PLC command to the module. (I don't use use a UPS, since my utility is MUCH more reliable. I have had one power outage in 12 years, not even a flicker otherwise. I had several UPS failures in the 4 years that I used them)