bzip2 randomly launches on OS X 10.6.8

0

Is there an application for OS X that will let me view what parent process is launching bzip2? It randomly opens up and eats a massive amount of CPU so it sorta lags the computer. I'm not sure what's causing it so in order to figure out, I wanted something like Process Explorer but for mac where I get a tree-type view of the running processes so I can determine what its parent process is.

UPDATE:

Okay I discovered that there is a All Process, Hierarchically sorting mode which does just that. It seems bzip2 is being launched by newsyslog. Any thoughts on this?

Propeller

Posted 2013-02-17T12:50:39.150

Reputation: 1 055

1newsyslog simply handles log rotation for all kinds of logs in /var/logs. See /etc/newsyslog.conf for its configuration, and check the open files and ports for more info about where it uses bzip2. – slhck – 2013-02-17T13:03:30.433

newsyslog uses bzip2 to compress old log files; normally, the logs are fairly small and this is a quick operation. Look in /var/log and see if one of the log files there is growing rapidly. – Gordon Davisson – 2013-02-17T15:58:08.117

Answers

0

Sorry I forgot to update here. As it turns out kdc.log, located inside /var/log/krb5kdc was chugging on huge amounts of size (it's increasing its size in MBs after a few seconds/minutes). What I did to stop this from happening was gain permission to access it first. This was the tricky part since its still being used by the system, I had to do some reboots to finally get it loose. I then deleted it and created a blank folder and named it kdc.log. I don't know where I learned this but it's somehow stock knowledge to me that if you replace a file with a same-name folder and try to overwrite it by attempting to write to a file, nothing happens so no log will be made.

I know this is unorthodox but it stopped what's causing the lag so yeah.

Propeller

Posted 2013-02-17T12:50:39.150

Reputation: 1 055

0

If you open Activity Monitor.app, you can select the process, and open the Get Info… window (or press ⌘I).

You can then check the Open Files and Ports for specific information about that process. This is likely to be the best source of info, since most processes will only show launchd as the parent process.

slhck

Posted 2013-02-17T12:50:39.150

Reputation: 182 472

Okay, bzip2 has finished its thing and closed for now. I'm waiting for it to happen again and will update here what I find out. It happens randomly throughout the day. – Propeller – 2013-02-17T13:04:47.483

Not entirely unexpected given it's a log process which does its work, but it really shouldn't slow your system down. Did you actually notice performance decreasing without looking at the Activity Monitor? Or did you just see it there? – slhck – 2013-02-17T13:06:20.357

Yes, the main reason why I decided to inspect was because performance would become poor for a few minutes then return to being normal after. When I opened Activity Monitor and sorted it by the CPU consumption, bzip2 was on the top. So I tried Get Info on bzip2, turns out, there was no Open Files and Ports tab, only Memory and Statistics are there. I can only see Open Files and Ports for process that I opened myself (e.g. Google Chrome). – Propeller – 2013-02-17T13:36:47.863

Interesting. You could also run a sudo lsof | grep bzip2, for example. – slhck – 2013-02-17T13:39:25.750

I ran it on Terminal but i didn't see anything that visibly changed? What was it supposed to do? – Propeller – 2013-02-17T14:04:31.597

Basically, list all open files from processes that contain the name bzip2. You can execute that while you see bzip2 running to see if there are any files in use. (You can also remove the | grep bzip2 to see all currently open files) – slhck – 2013-02-17T14:15:24.060

Wow, weird, after I ran it without bzip2 running, bzip2 never opened again. I'll keep this question open and see if bzip2 launches again tomorrow. But as of now, it doesn't seem to be running anymore. – Propeller – 2013-02-17T15:51:24.487