Mac OS X: Fix High CPU Usage by syslogd

24thMay. × ’08

Recently, I’ve been experiencing a high CPU usage by the process syslogd in Mac OS X 10.5.2 Leopard, coupled with strange Console.app behavior. If you’re experiencing this as well, give this a shot and see if it works (at your own risk.)

syslogd

FIrst, you should check if this is a problem on your system, which is usually caused by large asl.db files. Open Terminal.app (Applications/Utilities/Terminal.app) and enter the following:

du -hs /var/log/asl.db

and hit enter. If it shows that your asl.db file is pretty huge (mine was 80MB) you’ll want to run this fix. If it isn’t, a rampant syslogd is probably not due to the asl.db file, but instead some application doing a lot of logging. Open Console and look if there’s any applications that are logging a lot, like if you see “ — last message repeated 500 times —”, that’s probably what is causing syslogd to own a lot of CPU.

If asl.db is huge, do the following. You’ll first have to enable a root user to your system. Then, go to Terminal, and enter the following (enter one by one, and hit enter afterwards):

sudo launchctl stop com.apple.syslogd
sudo mv /var/log/asl.db /var/log/aslold.db
sudo touch /var/log/asl.db
sudo launchctl start com.apple.syslogd

You will be asked to enter the root password on the first command, while subsequent commands will automatically be authenticated as root.

Once you do this, the syslogd process should restart, but the CPU it uses should be next to nothing. Hope this helped.

This entry was posted in General and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

9 Comments

  1. Sean O'Brien
    Posted September 2, 2008 at 10:01 pm | Permalink

    THANK YOU!!!! I have been looking for a solution to the problem all night. Some didn’t work and others were way above my knowledge. My computer has been so slow and this totally took care of it. Honestly, THANK YOU SO MUCH!!!

  2. Jabba the Hut
    Posted September 3, 2008 at 5:21 pm | Permalink

    Thank you! That worked great!

  3. Samantha House
    Posted September 28, 2008 at 7:01 pm | Permalink

    This worked perfectly!

  4. Posted October 20, 2008 at 11:55 am | Permalink

    Thank you! Same problem like you and same solution applied. Now everything’s working well!

  5. Lynne
    Posted November 28, 2008 at 9:17 am | Permalink

    Yet another big thank you! Fan shut down seconds after moving the gigantic file.

  6. Posted December 20, 2008 at 9:04 pm | Permalink

    This just fixed my runaway syslogd process! I have been killing the process for months, trying seeing nothing in the logs. This seems to have fixed it, BTW, my asl.db was 373M.

    thanks for the tip.

  7. Will
    Posted December 23, 2008 at 10:57 am | Permalink

    The same works for many other haywire root software problems, as well as renegade 3rd party issues.

  8. Posted December 28, 2008 at 3:53 pm | Permalink

    Thanks, fix worked perfect.

    macbook:~ martin$ sudo file /var/log/asl.db
    /var/log/asl.db: data

    I’m guessing that means it’s either corrupt, or just shows that using massive binary blobs is a bad idea. I was using Instruments to debug some C code on 10.5.5, so I figure that might have pushed it.

  9. Posted August 6, 2009 at 2:15 am | Permalink

    I also suffer from horrible cpu spikes caused by timemachine .. oddly enough I dont even have the above mentioned file.

One Trackback

  1. [...] Follow this link: The Mark Bao Weblog. » Mac OS X: Fix High CPU Usage by syslogd [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>