The legal tricks-Learn Your Self

Latest gadgets,softwares,hardware,reviews,programming and campuses, game cheats ext......

Avoid syslogd CPU usage when using AppleScript

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: 

Quote:
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.

0 comments: