Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Avoid syslogd CPU usage when using AppleScript System 10.5
Since the release of 10.5, I've seen that the execution of AppleScripts triggers heavy activity of syslogd, basically causing it to take over the CPU. I've found that by killing the syslogd process (which will automatically restart) and removing the asl.db file from the /var/log directory, I can at least temporarily solve the problem.

Here's a two-line AppleScript to do just that:
do shell script "sudo launchctl stop com.apple.syslogd" with administrator privileges
do shell script "sudo rm /var/log/asl.db" with administrator privileges
Run that, and CPU usage by syslogd should drop to normal levels again, at least for a while.

[robg adds: This older hint covers another issue with a runaway syslogd process, this one apparently caused by Time Machine.]
    •    
  • Currently 2.29 / 5
  You rated: 5 / 5 (7 votes cast)
 
[8,183 views]  

10.5: Avoid syslogd CPU usage when using AppleScript | 5 comments | Create New Account
Click here to return to the '10.5: Avoid syslogd CPU usage when using AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Avoid syslogd CPU usage when using AppleScript
Authored by: diamondsw on Jul 08, '08 08:05:16AM

Anyone else see the irony of using an Applescript to fix a problem caused by Applescript? Meanwhile, why on earth wrap two lines of bash shell code inside Applescript? It adds absolutely nothing to the script.



[ Reply to This | # ]
Because AppleScript users would want to???
Authored by: jecwobble on Jul 08, '08 09:26:50AM
I would imagine that wrapping command line scripts in AppleScript for a hint aimed at AppleScript users is reason enough. Beyond that, if you put these two lines at the beginning of your own AppleScript, it would take care of the syslogd issue before executing the rest of your AppleScript. Then there's no need to launch Terminal just to prepare to run an AppleScript.

[ Reply to This | # ]
10.5: Avoid syslogd CPU usage when using AppleScript
Authored by: S on Jul 08, '08 11:21:53AM

Any chance you could stop the excessive spacing on the first line?



[ Reply to This | # ]
10.5: Avoid syslogd CPU usage when using AppleScript
Authored by: Auricchio on Jul 08, '08 11:40:08AM
Beyond that, if you put these two lines at the beginning of your own AppleScript, it would take care of the syslogd issue before executing the rest of your AppleScript. Then there's no need to launch Terminal just to prepare to run an AppleScript.

I would not advise doing this. Having the script simply kill syslogd is a very bad idea, because future system updates could cause side-effects from doing something like that.

---
EMOJO: mojo no longer workin'

[ Reply to This | # ]

10.5: Avoid syslogd CPU usage when using AppleScript
Authored by: spockboy on Jul 08, '08 05:29:52PM

My blog post describes this issue in more detail, and shows how to gracefully prune the database using Apple's provided command-line utilities to prevent it from happening:

Taming Leopard's Syslogd (Feb 08)
http://www.spockboy.com/blog/archives/8

Cheers, Dan.



[ Reply to This | # ]