I’m not sure if someone could help me over here, for some reason I got a computer running OS X Snow Leopard, and somehow it has a process running called Asterisk, owned by the root. I’m not sure how it ended up installed in the computer, but I’d like to remove it because it’s taking almost 100% of the CPU and making the fans go wild.
I’ve read around and it seems that installing Asterisk on Mac is not even supported. I tried killing the process and it boots up again. I also found this website, but the link under removal doesn’t work:
If it is called Asterisk, rather than asterisk, you are in the wrong place.
Uninstall the package that installed it, or run “make uninstall”, if installed from source.
Alternaively use the standard method for removing a startup script for your OS. I don’t know if Mac uses the /etc/inetd method. This will stop it from starting.
The dirty way of removing it is to delete /usr/sbin/asterisk (directory may vary) and /usr/sbin/safe_asterisk.
Seriously consider that you may have been compromised as this is not a package I would expect to see present unless the owner deliberately installed it.
If your OS uses RPM, rpm -q -f /usr/sbin/asterisk (give or take a directory) will identify the package to remove. Other package managers will have similar features.
Note that safe_asterisk will not restart it if you kill it normally (kill -15 or kill with no signal number).
The process is asterisk. The owner of the computer doesn’t really have a clue of how it ended up installed (so using the package that installed it isn’t an option), maybe he installed something else that included asterisk.
I wouldn’t get into a habit of -including -r on rm commands, unless you are sure you want to remove a whole directory tree. Also don’t use kill -9 except as a last resort - this may be why it got restarted.
I started the computer in safe mode (only loads up basic things) wrote down the commands. After writing them in the Terminal, rebooted the computer, but the process asterisk is still there (taking almost 100% CPU).
How can it still be loading if I deleted both directories?
Really this is not an Asterisk problem but one about undestanding system startup/the packaging mechanisms on your system.
However, the instructions you were given do not delete directories. They delete the actual asterisk program and the script that automatically restarts it when it terminates abnormally. Without the first, asterisk cannot start and without the second there is no danger of anything consuming CPU trying to start an asterisk that isn’t there.
They will not stop a running copy, so, if going to single user didn’t, you will need to reboot, or to kill the process after you have removed the process executable. Linux (on which that OS is based) and Unix do not physically delete program files until the program stops running.
Also, the file names given are those that you will get if you build asterisk from the standard source code distribution without overriding any directories. I assume you checked that the rm commands actually worked without error?
To completely remove the package involves removing several directories, but without those two files it cannot start. The easiest way of removing completely, as I said in my first reply is to use the mechanism that was used to install it to remove it.
Yeah, both codes went thru and didn’t give any errors at all.
The mechanism that was used to install it isn’t an option because the person that owns the computer doesn’t even know how he ended up with the process. I’ll keep trying with the tips mentioned.
Asterisk is a large piece of fairly technical software (a software implemented telephone PABX). I find it difficult to believe that someone without technical know how would even want to install it!