How to stop an errant shutdown

0

2

I have a system with many processes and one of them looks to be invoking shutdown or something similar causing the host to exit very quickly. There is no linux kernel crash so I'm going under the assumption that there is a process that has decided it has hit some critical condition and rather than do the right thing, is bringing the box down.

Stubbing out /sbin/shutdown and reboot was one way I thought to try and catch the process that is invoking this, but it's more devious than that it seems. Another idea I had was to put a check in /etc/rc.d/rc and ignore runlevel changes to 0 or 6. Still to try that one, but: any other better ideas in trying to find out which process is invoking the shutdown?

Neil McGill

Posted 2015-02-14T00:13:16.203

Reputation: 206

Is it really a process? Is there some shutdown notified in logs? Because this looks more like HW problem with motherboard or power source. Or maybe you have set reboot on panic. – None – 2015-02-14T00:57:32.100

It's on QEMU, and in this case QEMU not crashing thankfully. Thanks for the suggestion on logging. However as this is the 2nd time I've hit this I was looking for a more preventative way of catching this in the future as not all the processes in this system are well behaved enough to log anything. Sadly 8) – Neil McGill – 2015-02-14T01:39:38.490

No answers