• On CBS MoneyWatch: 4 Things You SHOULDN'T Buy at Target
advertisement
July 2, 2008 8:30 AM PDT

"syslogd" process taking 100% CPU under Mac OS X 10.5.4

by CNET staff

Wednesday, July 2nd

After updating to Mac OS X 10.5.4, users have found that the process "syslogd" is swamping the CPU, causing the computer's fans to spin excessively and resulting in poor overall system performance.

As described by Apple Discussions poster benevision:

"After updating to 10.5.4 update everything is very s-l-o-w. With Activity Monitor running I can see the CPU is running at 100% just about all the time. The top process in the list is #13 "syslogd" (root). Close second is bzip2 (root)."

The "syslogd" process is a utility that the OS uses to turn over system log files by using the "bzip2" utility to compress them and creating new ones when the files get to a certain size. This helps conserve space and makes it easier to search log file contents.

While this problem has been reported by some as being associated with the Mac OS X 10.5.4 update, it is known to occur in all versions of Leopard and its exact cause is uncertain. Regardless, the problem appears to reside with syslogd's interactions with the Apple System Log facility database; removing that database appears to fix the problem. Additionally, users have found that removing and recreating the system.log file also may help the problem.

Fixes

Remove the Apple System Log database Open the Terminal (located in /Applications/Utilities and run the following set of commands:

  • sudo launchctl stop com.apple.syslogd
  • sudo rm /var/log/asl.db
  • sudo launchctl start com.apple.syslogd

These commands stop the syslogd process and then remove the database, then restart the process again. It is unadvisable to remove the database while the process is running. If the CPU still begins running at 100%, try applying the second fix.

Remove and recreate the system.log file

In the terminal run the following set of commands:

  • sudo launchctl stop com.apple.syslogd
  • sudo rm /var/log/system.log
  • sudo touch /var/log/system.log
  • sudo launchctl start com.apple.syslogd
Feedback? Late-breakers@macfixit.com.

Resources

  • benevision
  • Late-breakers@macfixit.com
  • More from Late-Breakers
  • Recent posts from MacFixIt
    iTunes 10 user interface sees some minor changes
    Apple seeds iOS 4.1 Gold Master to developers
    Possible fix for Harman Kardon iSub problems with PowerPC Macs
    Precautions to take before installing iTunes 10
    A reminder on how to reset your Mac's system password
    Mail messages appearing blank
    Adobe Lightroom update brings direct Facebook publishing; Camera Raw 6.2 released
    Weekly troubleshooting utilities update
    Add a Comment (Log in or register) (3 Comments)
    • prev
    • next
    by Macavenger July 2, 2008 9:33 AM PDT
    Just off the top of my head, one obvious cause for a problem like this is some process writing hundreds of messages to the system log every second or so, causing the syslogd to have to archive the log constantly. It would seem like probably the first thing you would want to do if you are seeing this is to simply look at the system log and see if this is the case, and if so fix the offending process. That's not to discount the solutions presented here, but if this is the case then the presented solutions probably won't help.
    Reply to this comment
    by BriEnigma July 2, 2008 10:09 AM PDT
    If syslogd on OS X is like syslogd on any other Unix system, your description is a little inaccurate. It is not responsible for rotating the logs after they reach a certain size or after a given amount of time has passed; it is responsible for collecting up log messages from other processes and writing them to a central set of log files.

    That being said, I did run into this exact problem a few dot-releases ago. It turned out to be a bug in Little Snitch trying to write several log messages per second. Disabling, then upgrading, Little Snitch solved the problem for me.

    As the previous commenter said, check your logs and see if a particular process is hammering them. It's more likely that another app is at fault. Disabling or removing syslogd is not recommended, as it prevents anything and everything on your system from logging.
    Reply to this comment
    by Mark Douma July 2, 2008 6:00 PM PDT
    As BriEnigma said, syslogd doesn't handle rotating the logs, it handles the entire system logging process itself. It is, as its name implies, the "system log daemon" (most of the *nix-related processes that launch earlier on during boot and end with a "d" in their name represent a daemon-type process).

    I've run into this type of syslogd-cpu hog behavior before as well. In my case, it was caused by a QuickTime plugin logging the same error message thousands of times a second. syslogd always stores the primary logging information in the asl.db database file, and then is responsible for also converting the information stored in the database and updating the system.log. Originally I tried to fix it by deleting just the system.log, which had little effect, as syslogd went right back to trying to convert all of the info in the huge asl.db back out to the system.log. I also had to delete the asl.db file as well, which I did in single user mode.

    It might be helpful to temporarily save the system.log instead of outright deleting it in that it could be helpful to determine what was causing all of the excessive error messages/logging in the first place.

    Hope this helps.......
    Reply to this comment
    (3 Comments)
    • prev
    • next
    advertisement

    About MacFixIt

    MacFixIt is CNET's troubleshooting resource for all things Mac. The information here helps you navigate the ins-and-outs of Mac ownership with how-tos, troubleshooting information, news, reviews, and more.

    Add this feed to your online news reader