Run Apple Hardware Test

Create a Backup System

No amount of maintenance can guarantee that your hard drive will never crash, that your Mac will never be stolen, or that lightning will never hit your house. Any number of catastrophes could potentially imperil your computerand its data. Of course, you can replace a computer, but what about your email, photographs, music collection, tax records, and all the other important information on your hard disk?
To keep your data safe, you need good backups. If you've never taken the time to set up a proper backup system, the time is now!
I wish I could tell you that backing up your computer is a simple matter of clicking a few buttons. But there's more to it than that: understanding the various types of backup, choosing backup hardware and software that has all the features you need, configuring your system, storing backup media safely, and many other details. The good news, though, is that once you've set up a backup system, it should run happily with little intervention for months or years.
Because so much can be said about backups, I've devoted several later articles to providing you with complete instructions. Feel free to work your way through the tasks in the rest of this article first. When you're ready to set up your backup system, where you'll begin to learn how to choose backup hardware and software, schedule daily archives and weekly duplicates, manage your media, and more. If you set everything up now, you'll breeze through those periodic tasks, almost without noticing them.

Run Apple Hardware Test

When you purchased your Macintosh, the box should have included a CD or DVD with an application called Apple Hardware Test. Depending on when you bought computer starts up," or words to that effect.) Find this disc now. (I'll wait while you root through your attic or basement to find it hidden in the bottom of a box somewhere.)
Back already? Super. You have in your hands a very special program. Apple Hardware Test can run only when you start up from the CD or DVD it came on; don't bother trying to copy it to your hard disk. This program performs a series of diagnostic tests on your Mac's hardware, including the AirPort card, logic board, hard drive, RAM, modem, and video RAM. It doesn't repair anything, and it doesn't look for problems such as directory errors that are the province of Disk Utility (described in the next section). But it can identify subtle hardware defects that could later lead to serious problems. Whether your Mac is fresh out of the box or years old, you owe it to yourself to make sure its major components are in good health, and this is the easiest (and cheapest) way to do so.

Note

Apple Hardware Test isn't the only tool that can check your RAM. Among the other utilities that can do this are TechTool Pro (www.micromat.com; $98) and Rember (www.kelleycomputing.net/rember/; free). I've personally had bad RAM that Apple Hardware Test could identify while these others could not, whereas other Take Control authors have had the opposite experience. Your mileage may vary!
To run Apple Hardware Test, follow these steps:

1.
Insert the disc with Apple Hardware Test on it into your Mac and restart, holding down the Option key until icons appear representing the available startup volumes.
2.
Click the Apple Hardware Test icon, and then click the right arrow.
3.
After the program loads, select a language and click the right arrow.
4.
On the Hardware Tests tab, click Extended Test.
5.
Take a nice hot bath or enjoy a stroll around your neighborhood. This test takes a while! The screen says, "Estimated time: 1015 minutes, or longer depending on the amount of memory installed." Take the "or longer" part seriously. On a fairly fast test machine with 2 GB of RAM, the test took almost an hour and 45 minutes.


6.
If all is well, the word "Passed" appears next to all the applicable tests in the Test Results area. If not, a failure message appears; if this happens, look in the About the Test and Results area for advice.
7.
Click Restart to restart your computer.
I recommend running the test again after installing RAM or any other new hardware inside your computer, or if you begin to have inexplicable problems that ordinary disk utilities do not solve.

Be Sure You Have Enough RAM

The most important thing you can do to speed up your Mac and reduce crashes is to be sure it contains enough RAM. Few new Macs ship with what I consider "enough." Even though Mac OS X and most applications can run in as little as 512 MB, in my experience performance degrades quickly with that amount of RAM when you have numerous applications and windows open at once.
How much RAM should you have? The answer depends on the type of Mac, the way you work, and your budget. On the one hand, I think everyone should have at least 1 GB (or the maximum their machine supports, if less). On the other hand, more isn't necessarily better. For example, only a few people running the most memory-intensive applications would benefit from putting the maximum of 16 GB in a Power Mac G5.
In general, if your Mac can hold 2 GB or less, I recommend maxing it out (budget permitting). Go above 2 GB if you spend all day working with heavy-duty photo, video, or audio applications, if you run high-end scientific software that performs complex mathematical operations, or if your computer functions as a server in a high-demand environment. Run Disk UtilityYou know the old saying: "If it ain't broke, don't fix it!" With computers, though, things can be broken without manifesting any obvious symptoms. You can nip many such problems in the bud with a simple procedure that looks for, and fixes, common disk errors that can crop up over time without your knowledge. I recommend doing this not only as an initial step, but also monthly.
To repair your disk, follow these steps:

1.
Start up your Mac from media other than your regular startup disk that also contains Disk Utility. This could be, for example:
  • A bootable duplicate of your startup disk stored on an external FireWire hard drive (or a USB 2.0 hard drive, if you have an Intel-based Mac), a second internal drive, or a second partition of your main disk
  • A Mac OS X installation DVD or CD
  • A TechTool Protégé device, to which you've copied Disk Utility (www.micromat.com)
"ch01note08">Note
You can't repair the disk from which Mac OS X is running (or the disk from which Disk Utility is running, if it's not the same one); that would be somewhat like trying to perform brain surgery on yourself. You can, however, verify the disk (by clicking Verify Disk in Step 4) to determine whether there are problems that Disk Utility could repair.
2.
Run Disk Utility. (If running from a cloned hard disk, you can find it in /Applications/Utilities. If running from a Mac OS X installation disc, click through the language selection screen and then choose Utilities > Disk Utility.)


3.
In the list on the left side of the window, select your main startup volume (the one you want to test), as in
4.
On the First Aid tab, click Repair Disk.
Disk Utility looks for common errors and repairs them if possible. Ordinarily, it displays a message saying that repairs were completed or that no repairs were necessary. In the (rare) event that Disk Utility encounters a serious problem it cannot solve, you may need to use a commercial repair tool such as DiskWarrior (www.alsoft.com; $80).

Make Sure Scheduled Maintenance Tasks Run

Mac OS X includes a tiny Unix utility called periodic whose purpose is to perform a variety of cleanup tasks, such as deleting old log files that would otherwise take up unnecessary space on your disk and updating the index that the Unix locate command uses to find files in the Terminal utility. The periodic utility can perform any of three sets of tasks. Once a day, periodic is supposed to run "daily" tasks; once a week, "weekly" tasks; and once a month, "monthly" tasks. (These names are more or less arbitrary; if, for example, you ran the monthly tasks every week, no harm would result.)
The periodic program doesn't launch itself, though; running it at the proper times is the job of another program, called launchd (under Tiger; in earlier versions of Mac OS X a utility called cron told periodic when to run). Apple set the launchers to run the periodic scripts in the middle of the night, so that they wouldn't slow down other things your Mac might be doing. The problem is that if your Mac happens to be off or asleep at the scheduled time (as it is for most of us), the scripts can't run. Tiger's launchd utility was supposed to be smart enough to notice that it had missed a scheduled task and run it the next time your Mac became active. Unfortunately, as of Mac OS X 10.4.4, launchd is flaky: sometimes the periodic scripts run (though possibly at completely unpredictable times) and sometimes they don't.
Tip
To learn more about launchd, which is quite useful despite its limitations, see an article I wrote for Macworld magazine: "Launch Your Mac" at www.macworld.com/2006/01/secrets/februarygeekfactor/.
In short, unless you leave your Macintosh on and awake all the time, the periodic command needs a bit of help to do its thing. The easiest solution is to download any of several programs that enable you to run the maintenance scripts manually at any time or, in some cases, to schedule them for times you know your Mac will be available. Try one of these:
  • Anacron: This free utility runs the maintenance scripts whenever they're overdue, with no user intervention required. You can find it at http://members.cox.net/18james/anacron-tiger.html.
  • Cocktail: Cocktail (www.maintain.se/cocktail/; $15), provides a single, simple interface for performing a wide range of maintenance tasks, including running the maintenance scripts, deleting cache files and old logs, adjusting hidden Finder, Dock, Safari, and Exposé settings, and more. Some tasks can run on a recurring schedule.
  • Mac HelpMate: This utility (www.macworkshops.com/machelpmate/; free, donations accepted) can run the maintenance scripts manually or on a schedule. It also deletes various caches, adjusts hidden Finder and Dock settings, displays your drives' S.M.A.R.T. status disk usage and system uptime, and performs numerous other maintenance tasks.
  • MacJanitor: If you want nothing more than a simple utility that lets you run the daily, weekly, and monthly maintenance scripts manually, the free MacJanitor (http://personalpages.tds.net/%7ebrian_hill/macjanitor.html) does that nicely.
  • MainMenu: Like most of the other utilities in this list, MainMenu (www.santasw.com; free, donations accepted) performs a wide variety of functions, including running the maintenance scripts, clearing caches, and deleting log files. Unlike the others, it puts all these commands into a single, always-accessible menu, so that you can run any of them with a single click.
  • OnyX: Another multipurpose utility, the free OnyX can run the maintenance scripts manually (but not on a schedule), delete various caches and log files, adjust hidden Finder, Dock, and Safari settings, display log files, run Unix commands, and display disk usage and system uptime, among other tasks (www.titanium.free.fr/pgs/english.html).
Warning! The utilities I list here are among dozens of tools that provide a pretty GUI wrapper to Unix commands. With all such programs, you should be careful not to click buttons blindly; because Unix commands can theoretically do just about anything, you could cause damage if you don't know what you're doing.

Install Antivirus Software

If this article were about PC maintenance, one of the first steps would have been to install antivirus software. For Windows users, malicious software (or malware) has become epidemic in recent years, leading to untold grief and loss of time, money, and data. Among the varieties of malware are viruses (and their close cousins worms and Trojan horses), spyware (programs that spy on your computer usage, collecting sensitive personal data), and pop-up ad programs. Luckily, very little malware runs on Mac OS X: as of the time I wrote this, I could count on one hand the programs of this sort that have been found "in the wild."
Even though Mac users have been fortunate so far, we would be wrong to assume our computers are immune to infection. Sooner or later, someone is bound to come up with malicious software that does serious damage to Macs, and when that happens, those with enough foresight to have installed antivirus software will be much more likely to continue merrily with their work while the rest of us struggle to restore our systems.

A Conversation about Periodic Maintenance Tasks

Should you worry about running the periodic maintenance tasks at all? The experts had this to say:
Kirk McElhearn: This is one of my bugbears. In very few cases are these routines essential and, with all due respect, I think it's excessive to suggest otherwise. Too many users think that these routines can solve problems; I've never seen a case where this is true. At bestunless you use the locate commandthey're placebos. They can clean out some log files, but again, only in some cases (if you run a server) does this make much of a difference.
Andy Affleck: I've found that the real advantage to running these tasks regularly is the log rotation. When I ran them manually I saw some space gains on my disk. It wasn't huge, but it was noticeable.
Dan Frakes: I agree with Andy: for most people it won't help much, but it will clean up log files. And if you use locateor the free GUI equivalent, Locator (www.sebastian-krauss.de/software/)it's useful to have the locate database updated regularly.
Chris Pepper: Right, and remember, the locate database is as relevant to SSH or a BBEdit shell worksheet as it is to Terminal.
Joe Kissell: I use locate all the time, so this is a big deal to me. For what it's worth, updating the locate database is one of the weekly script items. All three script types (daily, weekly, and monthly) rotate certain logs. The daily tasks also back up your NetInfo database and delete certain "scratch" files, such as temporary files used when you send faxes. The monthly tasks include generating reports of system usage for each user.

http://www.web-articles.info/e/a/title/Run-Apple-Hardware-Test/

No comments:

Post a Comment