OS X Script to Flush lookupd Cache
The lookupd process is a component of Mac OS X which allows programs
running on the system to request information about other users and
computers on the network. This process uses an in-memory cache to
store information about recent activity. This cache can become
outdated, inaccurate, or incomplete as a result of changes on the
network, or through bugs in lookupd. To correct some kinds of
network problems, it is helpful for troubleshooting purposes to clear
out or “flush” the lookupd cache.
The script below
attempts to flush the lookupd cache, then kill the relevant
processes. Those processes will be automatically restarted by OS X
after they’re killed.
As with all my scripts, while I’ve tested
this on a number of Mac OS X 10.3.x systems and it appears to work as
designed, I provide it “as is” without warranty or
support. If you choose to use it, you assume all responsibility
and liability for whatever happens (good or bad).
This script can
be run from the command line or a cron task.