3

I checked the Activity Monitor and noticed 2 processes called sh that were eating my CPU.

What apps are related to these processes and how can I stop them from eating all CPU?

  • Type ps -ef in terminal and see what parent process started the shell commands. – bmike Dec 17 '12 at 5:25
5

sh is a shell, a program that provides a command-line interface to your computer. It can be used either interactively, or as an interpreter for script files, such as the famous periodic maintenance scripts. Some such script is likely running in this case, and may be stuck for some reason.

You should be able to find out what script that is by using Inspect on the sh processes in Activity Monitor and looking at the Open Files and Ports tab. A file listed there with the .sh extension is a shell script. Its name will hopefully give you a clue as to its purpose; you can also open it as text and inspect it.

  • 2
    The shell script doesn't necessarily have a .sh extension. – nohillside Dec 17 '12 at 5:33
  • No, that's true. – Josh Caswell Dec 17 '12 at 5:59
-1

Know it is an old post, but in my case, when I saw high cpu usage of SH, that was a VIRUS!

I googled hours to find out this and delete.

Solution answered here: https://superuser.com/a/868147

  • 2
    It is better to link to the specific answer you mentioned. Use the "share" button below each answer to get the direct link. Although all answers there are related to cron and I think the solution to this question is not related to cron. – Hamid Rohani Feb 15 '17 at 11:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .