5 Replies Latest reply: Jan 5, 2014 4:18 PM by LizBMac
kidquotes Level 1 Level 1 (0 points)

I went to the apple store today and they expressed concern about "Bash" in my Activity monitor taking up so much CPU (and causing my fan to run all the time).  They didn't know what it was.  Does anyone know what it is and how to get rid of it?

 

Thanks! Kate


Mac OS X (10.3)
  • rpqdcikp Level 1 Level 1 (125 points)

    I have heard of this happening to macs with any sort of Kindle software

     

    Primarily Send to Kindle

     

    It uses high volumes of CPU and is labled BASH under activity monitor

  • kidquotes Level 1 Level 1 (0 points)

    p.s. I should add this info to my question: the "inspect" tab in the activity monitor files show this:

     

    /

    /bin/bash

    /usr/lib/dyld

    /private/var/db/dyld/dyld_shared_cache_x86_64

    /dev/null

    ->0x0a168db4

    ->0x0a168db4

    /private/etc/security/audit_control

    ->0x0a1689cc

    /private/etc/security/audit_class

    /usr/bin/stkLaunchAgent.sh

  • rpqdcikp Level 1 Level 1 (125 points)

     

    bash is the standard shell under OS X – meaning it is the standard program to interface with the operating system’s Darwin underpinnings (technically, /bin/sh is the standard shell, but that has been a copy of /bin/bash since OS X 10.3). It is the process that is launched when you open a Terminal.app window – an interactive shell.

    bash can also be launched without a terminal window – a non-interactive shell –, for instance to execute shell scripts, often denoted by the file suffix .sh. That is the case here – bash is running the script /usr/bin/stkLaunchAgent.sh, and something in this script is keeping your system busy.

    Now, /usr/bin/stkLaunchAgent.sh is not part of an OS X install – it is some kind of third party addition and as such is not present on my system, meaning I can only guess, but I’d say:

    • from its name part “LaunchAgent” and the fact it starts with your system, that it is triggered by a LaunchAgent – a small definition file used by OS X’ launchd, the system mechanism for starting scripts and non-interactive programs on schedule, boot or other events. That part I‘d qualify as an educated guess.
    • from the fact your troubles began with the installation of your Vertex SSD, and the fact that the crucial difference between SSDs and HDs is the first do not take kindly to defragmentation and similar low-level interventions into their structure, that the script launched by the agent in question might be trying to do some operation on the drive the Vertex SSD does not accept – which keeps the script running and bash busy. Now, that part is only a wild, wild guess, but…
      How to find out what the script does: 

    Open a Terminal window and do open -e /usr/bin/stkLaunchAgent.sh to have a peek into the shell script (that command will open it in TextEdit – terminate it in Activity Monitor first) – that should give you the means to see what exactly is running.

    How to get rid of it:

    You’ll have to get rid of the LaunchAgent, if it is indeed one. launchd LaunchAgent files are in plist format and found in

    • ~/Library/LaunchAgents – for the current user account only
    • /Library/LaunchAgents – for all user accounts
    • /System/Library/LaunchAgents – system level agents (should not by rights be found here!)

    They are usually named in reverse domain notation (tld.domain.process.plist). Depending if the user account of your runaway bash is yours or not, you should look in one of the first two locations above for a likely plist (if you have Xcode installed, you can QuickLook them easily). The correct procedure to stop it is to remove it from launchd’s process list through

    launchctl unload tld.domain.process 

    which will unload and stop the process (note you omit the plist suffix).

    There is also a GUI for handling launchd files, Peter Borg’s Lingon (make sure to get “Lingon”, not “Lingon 3”, which is a dumbed down version safe for vanilla use), which might be more convenient than manually rooting through the file locations.

  • kidquotes Level 1 Level 1 (0 points)

    This is excellent advice and help. 

     

    I found out the possible culprit was indeed "sendtokindle" software that I got free from Amazon.  Even though the software did not appear to be active on my computer,  the terminal window showed that it indeed was running.

     

    I did what you said and so far it seems to have resolved it.  I can't tell you how much I appreciate you help.  My fan has been running high for months and I always had to put my computer to sleep to cool it down. 

     

    Thank you for taking the time to send this!  I can't imagine the average person ever being able to explain this or even know where to begin on resolving it.  You must be a unix programmer or something.

     

    Kate

  • LizBMac Level 1 Level 1 (0 points)

    I have been having the same problems, and also found that it was "send to kindle"...Thanks for that advice!

    Liz