Ads by TechWords

See your link here
Receive the latest technology news and information.
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
Cloud Computing
View all newsletters




Privacy Policy
 

10 essential tasks to keep Leopard purring

October 14, 2008 12:00 PM ET

9. Allow Apple's maintenance scripts to run

Mac OS X includes a series of three maintenance scripts designed to run daily (every night at 3:15 a.m.), weekly (every Saturday at 4:30 a.m.) and monthly (the first of every month at 5:30 a.m.). These scripts perform common maintenance tasks for several of the Unix underpinnings of Mac OS X. While most users won't see any overt problems if these scripts aren't run regularly, they do perform some important functions, mostly related to conserving disk space.

The daily script backs up local directory service information -- in previous versions of Mac OS X, the daily script backed up the entire NetInfo database that contained user and computer-level account information, which has been replaced by a series of flat files in Leopard. It also creates reports on installed network interfaces and free disk space, and compresses the current system.log file (which stores entries for most Mac OS X actions) as an archive, and rotates the current archives.

In addition, the daily script clears the contents of the Unix /tmp directory (this also occurs when you restart a Mac), where many applications and installers store temporary files that do not need to be maintained. This combination of actions frees disk space, provides some backup of critical account data and prevents any problems that might be caused by applications accessing corrupted temporary files.

The weekly script updates the databases for the Unix locate and whatis commands -- used for finding files and for viewing short pieces of data about Unix commands, respectively -- resulting in improved Terminal performance. It also archives any secondary system logs (such as the log files created by the built-in Web server) in much the same way that the daily script archives and rotates the system.log file.

The monthly script runs a user time-accounting script, which compiles information about how much time each user of a Mac has been logged in, and rotates the installer log files.

While these scripts are mostly for housekeeping, they can have an impact on the overall performance of a Mac as well as the amount of free disk space. The rotating of log files can also make it easier to locate log entries if needed. Typically, however, most users won't notice major problems if the scripts don't run.

The default timing of these scripts was likely aimed at running them without any affecting performance. In earlier versions of Mac OS X, if the Mac was asleep or turned off during the scheduled runtimes, the scripts wouldn't run. In Leopard, however, the Mac should run the scripts on waking or starting up, so there is less need to run these scripts manually than there was a few years ago.

Still, if you notice disk space decline, performance problems or general flakiness, running the scripts manually or adjusting the time may be helpful. The scripts can be run manually using one of a number of Mac maintenance utilities including OnyX (free), Cocktail ($15, free trial), Macaroni ($10, free trial), or MainMenu (free) -- all of which also enable you to perform a number of other tasks described in this article.

Another related tip if you are short of disk space is to periodically delete some of the archived log files. Unless you have a need to maintain every tidbit of information about a computer's activity, you can probably delete months-old log files without any worries. Log files are useful for troubleshooting problems and can also be used to investigate activity that has occurred on a Mac. However, if you've never looked at a log file, aren't experiencing any problems, and the file is months old, chances are you aren't ever going to need to look at it. Given that some log files can get quite big, this can be one way to put your hard drive on a diet.

10. Restart periodically

One of the simplest ways to keep your Mac running well is to periodically restart it. Although there is no need to shut down Mac OS X on a nightly basis (many users report running Macs for months on end without restarting), restarting a Mac every couple weeks can be helpful both in a general sense and if you are experiencing any problems.

When a Mac boots, several different routines are called as part of the start-up sequence, including a basic file-system check (the Unix fsck tool) that verifies some of the directory structures on the hard drive and a clearing of any temporary files stored in the Unix /tmp directory. Rebooting also causes the Mac to run through its power on hardware tests and reinitialize its connection to any built-in hardware.

Ryan Faas is a frequent Computerworld contributor specializing in Mac and multiplatform network issues. Find more about him at RyanFaas.com.

Read more about operating systems in Computerworld's Operating Systems Knowledge Center.



Jump to comments

Mac OS X Leopard

Additional Resources

EFD vs. HDD - What You Need to Know
WHITE PAPER
Enterprise flash drives provide a new Tier 0 storage layer capable of delivering high I/O performance at a very low latency. Proper use of EFDs in an Oracle environment can deliver increased performance compared to fibre channel drives. Read the recommendations for identification of the best DB components for EFDs.
Gartner Research Report: Magic Quadrant for Application Delivery Controllers, 2009
WHITE PAPER
The market for products to improve the delivery of application software over networks remains dynamic and innovative. Vendors focused on solving enterprises' most-pressing application problems have become the top players.
Eight Criteria for Server Load Balancing
WHITE PAPER
Server load balancers are a simple yet highly effective means to scale an application environment while ensuring its availability. Today's solutions should also address application performance and security. Read about the top eight criteria you should consider when choosing a server load balancer and how Citrix NetScaler meets those requirements.

What People Are Saying

White Papers & Webcasts

High Performance for Integrating Massive Data Volumes
Processing very large data sets provides unique constraints, especially when time windows available for this processing are shrinking. This Technical White Paper presents...  

Gartner Podcast: Driving SharePoint Adoption in Lotus Notes Shops
Learn how can you drive mainstream user adoption of Microsoft SharePoint when your users are committed to using email.

IDC Webcast: Linux Adoption in a Global Recession
Access this webcast, compliments of Novell and HP, for a limited time only!

Whitepaper: Drive SharePoint Adoption in Lotus Notes Shops
Learn how you can drive your users to Microsoft SharePoint when they rely on IBM Lotus Notes.  


IT Jobs