pappaq Posted December 25, 2018 Share Posted December 25, 2018 Hi there, I searched the forums for my problem already but I couldn't find something related. I've got a command running, that eats up my CPU but I can't figure out where it comes from. The command is called "sh" and it should be related to any docker because it stays after stopping all dockers and before starting any docker after rebooting. Here is a screenshot of htop. The command fluctuates between 0 and nearly 100% CPU usage... Does anyone know if this is an plugin or something? Thanks in advance. Quote Link to comment
BRiT Posted December 25, 2018 Share Posted December 25, 2018 (edited) ps -auxf or the following if the above expands too wide to be seen on your terminal screen, and try to find the 'sh' process by process id and see what process tree it belongs to. ps -axf Edited December 25, 2018 by BRiT Quote Link to comment
BRiT Posted December 25, 2018 Share Posted December 25, 2018 If you track it up to some command "docker-containerd-shim" you can determine which exact docker container it is by matching container id prefixes. Notice how "9e837294036f" matches between the output of Docker Process and the overall Process output: ps -axf 13248 ? Sl 0:00 \_ docker-containerd-shim 9e837294036f29839277d497a83be3e1996df00ba63af497daacbb78229062f2 /var/run/docker/libcontainerd/9e837294036f29839277d497a83be3e1996df00ba63af497daacbb78229062f2 docker-runc docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9e837294036f emby/embyserver:latest "/init" 7 weeks ago Up 31 hours EmbyServer Quote Link to comment
pappaq Posted December 28, 2018 Author Share Posted December 28, 2018 Thank you for your answer but the CPU usage went away by itself. If this behaviour reappeares I will use your commands to investigate. Quote Link to comment
Olle Posted May 17, 2021 Share Posted May 17, 2021 On 12/28/2018 at 11:45 AM, pappaq said: Thank you for your answer but the CPU usage went away by itself. If this behaviour reappeares I will use your commands to investigate. Just an perhaps unrelated followup, but this is the first Google-hit if you google "unraid sh high CPU". I did what @BRiT said and it look like sh were triggered by atd (scheduled job). It also had inotifywait (looks for updated files) in the same process tree. This lead me to the conclusion that the plugin "Dynamix Cache Dirs" may be involved somehow. I deactivated that plugin (since my problems with spinning up disks were solved) and the high CPU stopped. This was just a reminder for me to deactivate plugins I don't currently use.. This may help someone else coming to this seemingly dead thread. :) 2 1 1 Quote Link to comment
fructus Posted September 4 Share Posted September 4 Quote This lead me to the conclusion that the plugin "Dynamix Cache Dirs" may be involved somehow. I deactivated that plugin (since my problems with spinning up disks were solved) and the high CPU stopped. Came here from google, because of random CPU jumps to 100% from SH. Can confirm completely stopped after turning off folder caching from Dynamix Cache Dirs Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.