Jump to content

high CPU usage of "sh" command


pappaq

Recommended Posts

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.

2093938309_2018-12-2513_37_06.png.da7e8aa81e697ccb9a0667e3608c015d.png

Link to comment

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

 

 

Link to comment
  • 2 years later...
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. :)

  • Like 2
  • Thanks 1
  • Upvote 1
Link to comment
  • 3 years later...
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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...