Linux – Lots of defunct sh zombie processes

linuxprocessUbuntu

I have a lot of defunct sh processes running. When I execute this command, to count them:

ps -ax | grep sh | wc -l

It says I’ve got 2655 at the moment. Do they use up any system resources? I have no idea where they’re coming from, this is the only data the ps command gives me:

32637 ?        Z      0:00 [sh] <defunct>

Does anyone know how to stop this from happening, and how to kill these processes?

Best Answer

lsof -p 32637

will give you more information on the process. Looking at the parent process that is causing this can help prevent it.

Related Question