How can I identify a program caught in an endless loop; where it runs, dies, then runs again? How can I kill it and prevent it from starting again - is reinstalling the package the only way?


I've just removed the sos package from a CentOS 6.7 machine in order to stop it running sosreport as root around once every minute, which was tying up major resources and slowing down the server. When I tried to kill the PID, it simply popped up again using a different one. It seemed to exit by itself, but would then run again almost immediately.

This indicates that the process is not a 'zombie' by the normal definition, as it both exits by itself then pops up again as a new process.

I checked crontab for an entry that runs it, and could not find one, and I am not sure how to check for this kind of problem. Eventually, reinstalling the package seemed to fix the issue in this case.

Bonus question

Is this behaviour indicative of a wider problem?

  • 1
    Can you determine the parent process ID of the program that keeps spawning? ps -o ppid=PID_OF_PROGRAM_THAT_SPAWNS That may help you figure out who keeps spawning the process.
    – airfishey
    May 4, 2016 at 16:53

1 Answer 1


Did you use yum to uninstall it?

I would check for any startup/upstart/init.d scripts that might be lingering around.

As a last resort, if there are no startup scripts, you can try moving it to the /tmp/ directory:

sudo mv `which sosreport` /tmp/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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