12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Reporting Disk Performance 407TIPNarrow down the output even more using one of the command-line arguments listed inthe lsof man page.For example, if you need to unmount an NFS volume but receive an error message that itis already in use, use the following to determine which users are still accessing it (replace with the directory in which the NFS share is mounted):lsof | grep All processes using the NFS mounted directory are shown such as the following for a bashsession open by user tfox:bash 12165 tfox cwd DIR 0,18 10240 1856 /data/group1(fileserver.example.com:/vol1/data)Reporting Disk PerformanceDisk performance should be constantly monitored over time to determine disk orcontroller problems. For example, if the access time for a drive suddenly drops, an administratormust quickly start troubleshooting the problem to determine if it is a software orhardware issue or simply due to lack of free space on the disk.Using iostatPart of the sysstat RPM package, the iostat utility can be used to gather performancestatistics for devices or partitions. Use it in conjunction with netstat and vmstat tonarrow down the problem to a possible I/O, network, or memory error. Install the sysstatRPM package with RHN as described in Chapter 3, “Operating System Updates,” if it is notalready installed. For each invocation of the iostat command, the first report given isalways the average values from the system boot, while each additional report is the instantaneouschange from the previous report. If the command is given without any commandlineoptions, only the report of average values is displayed as shown in Listing 20.4.LISTING 20.4Example iostat Outputavg-cpu: %user %nice %sys %iowait %idle2.47 0.00 0.33 0.43 96.77Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtnsda 1.41 79.37 38.15 41006531 19710528sdc 0.07 16.96 0.00 8762116 020The first part of the report shows CPU usage. If the system has more than one processor,the performance percentages shown are averages from all the processors. The rest of thereport shows information about each device on the system. Table 20.1 explains its output.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!