Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I ssh into my server and do 'shutdown -r now', the shutdown hangs on the message 'Sending processes the KILL signal', and I have to walk into the lab and use the power button to force a shutdown.

When I do the same thing on a session with a locally attached keyboard/monitor, the shutdown works fine.

How do I at least confirm what process is hanging?

share|improve this question
    
Are you using the same user? Being logged in via ssh usually wouldn't affect that, I shut down machines remotely all the time. I still haven't figured out how to get them back UP from SSH, but that's different. –  Caleb May 10 '11 at 16:13
    
I'm logging in as root in both cases. –  twblamer May 10 '11 at 17:11
    
Strange. Does shutdown -h now do the same thing? –  Faheem Mitha May 10 '11 at 21:20
    
What OS (for Linux: distribution, release)? What init system (e.g. SysVinit, Upstart)? –  Gilles May 10 '11 at 22:31
    
Can you clarify a few more details, the solution isn't poping out here :) Besides the other questions asked in comments, what does the physical console read after you send a remote shutdown command? Does it go through the shutdown process and just fail to power off, or do the shutdown scripts never run? Can you still login at the console after failing to shut it down remotely? Is anything still showing there? –  Caleb May 11 '11 at 0:08
add comment

2 Answers

up vote 1 down vote accepted

If you enable "magic sysreq key" (may require a kernel rebuild), then you can press a key combination to see which processes are still running.

share|improve this answer
    
I'm going to set this one as accepted...I haven't had the issue lately but I think I know what the rogue program was. –  twblamer Jun 25 '11 at 22:38
add comment

I believe you are thinking about this the wrong way, a remote SSH shutdown will also kill your network connection, hence the reason why you see limited information on your terminal. Being physically at the server obviously would have you see the whole process because you are physically attached to the terminal.

I hope this makes some sense to you .

share|improve this answer
1  
If @twblamer has to walk into the lab and press the power button, that's probably not it. –  mattdm May 10 '11 at 16:27
    
That makes sense except for the fact that he says the machine isn't shut down when he walks up to it! In fact I'm guessing the message he says is on the console, not his terminal. I've seen it that end up that way before. –  Caleb May 10 '11 at 17:59
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.