Key to being able to troubleshoot and solve problems that you can't prevent is to be able to accurately and precisely assess how your Mac is performing and to know the specific configuration of your system. Mac OS X offers many more diagnostic tools than previous versions of the OS; however, several of these tools are quite complicated. Still, even if you might not be able to interpret all of their output, people who are trying to help might be able to, so even in this case it is useful for you to know how to use them. You should understand how to use these tools before you need them.
If you choose Apple menu, About This Mac, you will see a window displaying the version of Mac OS X you are running, the amount of RAM installed in your machine, and the specific processors that it contains. In previous versions of the Mac OS, you could also get information about the RAM allocations for the applications running on your machine, switch among applications, and so on. Because Mac OS X manages RAM for you, this information is no longer valid, so the About This Mac window no longer serves the purposes that it once did. However, for a quick insight into these major system parameters, it is a useful reference.
If you click the Mac OS X version number shown in the About This Mac window, you will see the specific build number of the version you are using. Click this information and you will see your Mac's serial number.
For quite some time, the Mac OS has included the Apple System Profiler application. This application enables you to get a detailed view into your system at a particular point in time.
To create a profile of your system, perform the following steps:
Launch the Apple System Profiler (Applications/Utilities directory). The Apple System Profiler provides a window with six tabs; each tab provides information about a specific aspect of your system (see Figure 28.1).
You can open the Apple System Profiler by clicking the More Info button that appears in the About This Mac widow.
Click the tab for the part of the system about which you want information. One of the more useful tabs is the Devices and Volumes tab, which provides you with information about the PCI, USB, FireWire, and storage devices that are part of your system (see Figure 28.2).
View the information you need; use the Expansion triangles to expand or collapse specific information.
The six tabs shown in the Apple System Profiler window provide the following information:
System Profile This tab contains information about the fundamental hardware and software in your system. You will see detailed information about the current system software you are using, your Mac's hardware configuration, the RAM installed, and information related to Ethernet and AirPort networks of which you are a part.
Devices and Volumes This tab provides information about the devices and volumes on the major external and internal buses in your system. For example, you can see how each hard disk is partitioned, get a listing of each device attached to the USB ports, and so on. Expand each device or volume to get more detailed information.
Frameworks This tab lists the Mac OS X frameworks installed on your startup volume. You see the name of the framework, its version, when it was last modified, its Info String (which can sometimes tell you more about the framework), and its location.
Extensions On this tab, you will see the Mac OS X extensions that are installed on your startup volume. The information available for each is similar to that available for frameworks.
Applications This tab locates and displays information about the applications installed on your startup volume. You see the application name, version number, modification date, Info String, and location.
Logs This tab provides access to various error and other logs created by the system and individual applications. Each log can be expanded to reveal its detail. For example, in Figure 28.3, you can see the detailed information about a Word crash that happened to me. The information in these logs is quite technical. However, if you need to ask for help, being able to access these logs can enable you to provide more specific information to the person trying to help you and might result in a problem being solved more quickly.
You can copy log information from the Apple System Profiler window and paste it into other applications. For example, if you are getting help, it might be helpful to copy the log information for the problem you are experiencing and e-mail it to the person who is helping you.
The Apple System Profiler Commands menu contains some additional commands that might be useful to you. For example, Window, Refresh causes Apple System Profiler to refresh all of its information.
To provide services, your Mac runs many processes. These processes fall into three categories. User processes are those that are related to your user account, such as running an application. Administrator (also called root) processes are those that are fundamental to the OS and are controlled by the OS, such as the Desktop database. NetBoot processes are those related to network services, such as Apple File Server.
The Process Viewer application enables you to get detailed information about any process that is running on your Mac at any point in time. This information can be useful when it comes time to troubleshoot your system.
For each process, you can see the user to which it is related, its status, the percentage of CPU activity that it is causing, and the percentage of memory it is using.
The following steps walk you through using the Process Viewer:
Open Process Viewer (Applications/Utilities directory). You will see a window providing a listing of all the active processes on the machine (see Figure 28.4).
Choose the category of process you want to view from the Show pop-up menu. For example, choose User Processes to see the processes that are related to your user account.
If it isn't already open, open the more info pane by clicking the Expansion triangle next to the text "More Info." This area contains two tabs. The Process ID tab provides identification for a selected process. The Statistics tab provides information about when the process was launched, the virtual memory size, and the physical RAM being allocated to the process.
Select a process in which you are interested. The Process ID and Statistics tabs at the bottom of the window will become active.
Click the Process ID tab to get identification information about the process, such as its process number, the parent process that spawned it, and so on.
Click the Statistics tab to see the process's total CPU time (which is somewhat misleading because what you see is actually the processes start time) along with information about the process's memory use.
The following list outlines some additional tasks you can perform in Process Viewer:
Select a running process and press Option++Q to bring up a dialog box that enables you to quit the process normally or to force it to quit. You can use this to stop a process that is hung.
Sort the processes shown in the window by clicking the column by which you want them sorted. The current sort criterion is shown by the highlighted column name. You can reverse the direction of the sort with the sort order button that is just above the scrollbar.
Sorting the window by the % Memory or % CPU columns is very useful because you can see which processes are consuming the most system memory. If a process is consuming a large amount of memory (such as 80%), that can indicate something is wrong with that application. Sorting by process status can also be a useful way to identify processes that are currently hung.
Find specific processes by typing in the Find box. The list will be reduced to only those processes that contain the text you type.
Change the rate at which processes are sampled using the Sample Every text box and arrows. Increasing the sample rate provides data closer to "real time."
The CPU Monitor application provides a graphical representation of the activity in the processors of your Mac (see Figure 28.5).
When you launch the application (Applications/Utilities directory), you can use the commands on the Processes menu to choose three different windows in which to see the processor monitoring information. The Standard window shows a wide bar graph for each processor. The Floating window provides a similar view, but without any elements of a typical window. The Expanded window provides you with a view of processor activity over time. In the Expanded window, the different colors of bars represent the different categories of process; for example, by default, user processes are shown in green and root processes are shown in red.
You can have all three windows open at the same time or any combination of them. The windows are floating so that they are always on top of the window stack.
Because all three windows float, you might wonder why one of them is called the Floating window. Although I don't know the answer, I think it is because the Floating window is designed to take up less room (for example, it has no borders or title bar) and so is the one you are most likely to leave open all the time. The other windows are larger and because they do "float," you aren't likely to want to use the screen real estate required to leave them open all the time.
Use the CPU Monitor's Preferences command to set various aspects of the window's behavior. One of the more useful preferences is the Application Icon Settings. You can choose to display the Standard or Expanded views as icons in the Dock. This keeps the window out of the way, while making it convenient to view CPU activity (see Figure 28.6) .
You can open the Process Viewer from within the CPU Monitor by choosing Processes, Open Process Viewer (+P). You can jump to Top (which you will learn about in the next section) by choosing Processes, Open Top (+T).
The Top window is a Terminal window that provides detailed information about the current operation of your Mac. To access it, open the CPU Monitor and choose Processes, Open Top.
You can also open the Top window by typing top in the Terminal window.
The Top window provides very detailed information about your system, although not in the most easily understood format (see Figure 28.7). At the top of the Top window, you see a summary of the activity on your machine; the lower part of the window lists all the running processes and detailed information about each.
In the summary area of the window, you can see how many processes are running versus the number sleeping, how many threads are running, the average loads, and the percentage of CPU usage of user processes versus system usage. The PhysMem information contains data about your RAM. For example, the amount shown as active is the RAM currently being used by running processes. The VM information provides data about the virtual memory being used.
In the lower part of the window, you see a table that provides data on each process that is similar to but more detailed than the information in the Process Viewer. For example, you see the PID, which is the same Process ID as is displayed for a process in the Process Viewer. You can also see the percentage of CPU use, the processor time, and other more technical information. Much of this information will probably not be useful to you unless you are quite technically oriented; however, it can be useful to others when you are trying to get help.
You can save the information seen in the Top window by selecting the information in the window and choosing Shell, Save Selected Text As. This text file can be useful to you or to provide to someone else when you are getting help with a problem.
The Console application provides a window to which Mac OS X writes system messages you can view. These messages are mostly error messages; some of these can be useful when you are troubleshooting problems (see Figure 28.8). The messages you see are quite technical; unless you are a programmer or are extremely technically knowledgeable, they probably won't mean much to you. However, Console messages can be helpful when you are communicating a problem to someone else.
The Console is cleared when you log out. When you log in again, it begins collecting system messages in a new log.