trihub Sergeant
Joined: 04 Dec 2006
Posts: 180
|
Posted: Thu Aug 27, 2009 10:17 am Post subject: OS X Console Log Monitoring |
|
|
Article by Tony Lawrence
Source: http://aplawrence.com
I hadn't looked at my Mac log files for quite some time. That's probably not an unusual habit for most users - heck, I bet most Windows users NEVER look at log files. It is more unusual for me; Unixy people tend to look at logs more often and that habit should have come with me to OS X. But it hadn't.
When I finally did start Console and take a peek , I was annoyed to see hundreds of errors from Launchd trying to start daemons for programs that I had removed from my system. Aaargh - that was dumb. Anything that runs in background is most likely going to trigger by Launchd and just throwing the app in the trash is NOT going to remove the plist files that cause Launchd to try to run those daemons.
Don't forget to choose "All Messages" in Console. While you are in there, you can also look for old logs that are no longer in use because you have removed the application that generated them. You can right click to send those to Trash.
For example, I had once put Mozy on this machine. I had also tried Google Desktop. Later, I removed both of those by dragging them from Applications to the trash. Console repeatedly showed lines like this:
6/28/09 8:50:18 AM com.apple.launchd[1] (com.mozy.backup[23968])
posix_spawnp("/Applications/Mozy.app/Contents/Resources/MozyBackup",
...): No such file or directory
6/28/09 8:50:18 AM com.apple.launchd[1] (com.mozy.backup[23968])
Exited with exit code: 1
6/28/09 8:50:18 AM com.apple.launchd[1] (com.mozy.backup)
Throttling respawn: Will start in 10 seconds
6/28/09 8:23:38 AM com.apple.launchd[274] (com.google.Desktop.Agent[23184])
posix_spawn("/Library/Google/Google
Desktop/GoogleDesktopAgent.app/Contents/MacOS/GoogleDesktopAgent",
...): No such file or directory
6/28/09 8:23:38 AM com.apple.launchd[274] (com.google.Desktop.Agent[23184])
Exited with exit code: 1
6/28/09 8:23:38 AM com.apple.launchd[274] (com.google.Desktop.Agent)
Throttling respawn: Will start in 10 seconds
What a waste of CPU. Well, not a big waste - you wouldn't notice this slowing you down, but just the same it does waste resources and it does clutter your logs with unnecessary junk.
Some apps come with an uninstaller. You might find that in the package or .dmg you used to install the app originally, or it might even be buried down in the Application directory itself (right click and "Show Package Contents" to explore). Unfortunately, a lot of apps don't bother with this, so for those you have to hunt down the files and remove them manually.
I've seen web pages that tell you to use Launchtl to unload the plist. That's fine, but why would you want to leave the file? The application has been removed; why should you leave the Launchd plist hanging around? Get rid of it and you'll never see this again.
So where are these files? Things that run for users in /Library/LaunchAgents or your personal LaunchAgents directory. Something designed to run whether or not people are logged in will be in /Library/LaunchDaemons. It should NOT be in /System/Library (that's supposed to be for system stuff only).
A program generating log errors might also have started from /etc/rc.local, /etc/rc.common, /Library/StartupItems or /System/Library/StartupItems. However, today's apps will usually use Launchd.
So what's left in the logs now that these errors are gone and I have a chance to notice the less frequent enties? Mostly unimportant stuff - or stuff I can't find out much about. What's "ImageKit Error: freeUselessAdditionalCache"? That pops in every few minutes and I don't know why. I know that "Note: Frequent transitions for interface en0" comes up whenever the machine wakes from sleep. The logs tell me that VMware adjusts its network bridges at the same time, even it it isn't running.
I also see " mDNSResponder[18]: NOTE: Wide-Area Service Discovery disabled to avoid crashing defective DNS relay". That's Bonjour looking to send multicasts out on the WAN. That's not something my router is going to do (and I wouldn't want it to anyway), so there's really nothing "defective". Anything that says mDNSResponder is Bonjour, so I can also ignore "mDNSResponder[18]: Note: Frequent transitions for interface en0 (192.168.1.2); network traffic reduction measures in effect" messages.
I noticed " Xmarks for Safari[272]: sessionDriver willPullAndReturnError called appliedRemoteChangesCallback" - that's yet another program I do not use but had forgotten about. That was harder to remove. Uninstalling the Firefox extension is done through Firefox, of course, but theere is also an Xmarks process running that has to be killed before you can drag the application to the trash.
I also see messages from Jumpcut about "CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore". Jumpcut itself is at the most current version and works fine (I couldn't live without it), so I'll just have to ignore that.
So now I'm getting down to very minor stuff - initialization messages from starting programs and those few oddities that don't turn up in Google. I do see quite a few messages like this:
6/28/09 8:54:16 AM quicklookd[372] [QL ERROR] 'Creating
thumbnail' timed out for '<QLThumbnailRequest
/Users/apl/Downloads/L_200933126.pdf>'
6/28/09 8:54:26 AM com.apple.quicklook[378] xref table size
mismatch: calculated 1476; /Size = 1477.
I haven't been able to track down anything on those yet, but just about everything else left in Console logs is explainable or at least seems innocuous.
I |
|