Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

high CPU usage of "sh" command

Featured Replies

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

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 by BRiT

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

 

 

  • Author

Thank you for your answer but the CPU usage went away by itself. If this behaviour reappeares I will use your commands to investigate.

  • 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. :)

  • 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

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.