Cypress Systems, Inc. logo

Do I Need to Run Mac OS X Maintenance Scripts Occasionally?

ScriptsAs a consultants we are sometimes asked what maintenance should be done on a MAC. The response is surprisingly little. OS X has a number of things baked into the operating system that keep your MAC running (for the most part) at optimum efficiency. OS X has maintenance scripts that run periodically. The scripts perform various functions. The main three scripts are daily, weekly and monthly.

The Techbeast has a nice breakdown of what they do:

Each maintenance script — daily, weekly, and monthly — has a specific function. Their functions have varied over different versions of Mac OS X.

  • The daily script removes old log files, “scratch” and “junk” files, backs-up the NetInfo database (Mac OS X 10.4 Tiger® and earlier), reports a variety of system and network statistics, and rotates the system.log file. Under Tiger, the daily script also cleans up scratch fax files and prunes asl.log, the log file for the then-new Apple System Logging facility. Under Mac OS X 10.5 Leopard®, the daily script also prunes the asl.db file that replaced the asl.log file for Apple System Logging. The output from the daily script is written to the /var/log/daily.out file, which can be viewed in Console. By default, the daily script is scheduled to run daily at 03:15 hours local time.
  • The weekly script rebuilds the locate and whatis databases. Depending on the version of Mac OS X, it also rotates the following log files: ftp.log, lookupd.log, lpr.log,mail.log, netinfo.log, ipfw.log, ppp.log, and secure.log
    The output from the weekly script is written to the /var/log/weekly.out file, which can be viewed in Console. By default, the weekly script is scheduled to run every Saturday at a specific time. Under Tiger and later, it runs at 03:15 hours local time. Under Mac OS X 10.3 Panther® and Mac OS X 10.2 Jaguar it runs at 04:30 hours local time.
  • The monthly script reports per-user usage accounting and rotates — depending on the version of Mac OS X — the wtmp, install.log, and cu.modem.log files.
    The output from the monthly script is written to the /var/log/monthly.out file, which can be viewed in Console. By default, the monthly script is scheduled to run on the first of the month at 05:30 hours local time.”

You can see when the last time the scripts ran by opening the terminal command and run the following commands:

ls -al /var/log/*.out

The results should look something like this:

Log Output



Note the time of the last run of each script (10:43 on). These scripts are typically enough to keep your Mac running in its optimal state. While you can run these scripts manually there really is no reason to as the operating system itself does a fairly good job at doing it for you.

All things considered, there are other areas that should receive more attention than trying to run these scripts manually such as updating the operating system and making sure other software is up to date via the Mac App Store. It is very common for us to work with clients and find numerous updates that have never been installed. This is one quick and easy operation that a client can perform to insure the continuing smooth operation of their respective Mac.

This entry was posted in Apple, MAC, Services, Technology and tagged , , . Bookmark the permalink.

Comments are closed.