(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



OS X Console Log Monitoring

2009/06/29



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.


;


Click here to add your comments





Mon Jun 29 21:55:22 2009: Subject:   CorkyAgain

gravatar
Then there's the annoying console log entry you get if you're still using cron:

"Could not setup Mach task special port 9: (os/kern) no access"

You get one of these every time your crontab entry runs. Argh!

There are still things that cron can do that launchd can't. For example, with cron you can have a task run on weekdays only. Launchd can't do it, as far as I can tell.

Your post reminded me of this, so I went looking to see if anyone's figured out how to stop the log entries. The most common suggestion is to redirect all output from your crontab entry to /dev/null. I tried that just now, but the log entries are still coming in. I've noticed, however, that launchd doesn't seem to pick up any changes until the next time I login. So I'm logging out now...



Mon Jun 29 21:59:14 2009: Subject:   TonyLawrence

gravatar
One way to do that is to wrap your command in a script that just exits if the day is not what you want. Have launchd call that instead.



Mon Jun 29 22:08:23 2009: Subject:   CorkyAgain

gravatar
FWIW, logging out and logging back in made no difference. I think I'm going to implement a wrapper as you suggested, if only to stop flooding my console log with nuisance messages.

The script will still run on the weekends, but at least it will be quiet about it!

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar

cartoon
Looking for Mac OS X Help?
OS X PDF e-books
Inexpensive, instant download



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server




pavatar.jpg
More:
       - MacOSX


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress