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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Reporting Disk Performance 409/usr/lib/sa/sa1 1 1/usr/lib/sa/sa2 -AThese are automatically run by the cron script located at /etc/cron.d/sysstat. However,if you just installed the sysstat package and don’t want to wait on the cron job to initializesar, run the commands as root.Because of the cron job, sar reports are generated every day at 23:53 and stored in thedirectory /var/log/sa/ using the filename convention sa, where is the twodigitrepresentation of the day’s date. For example, sar31 is used for December 31. Theyear is not used in the filename because only the last nine reports are kept. However, sarcan easily be used in a script to produce custom reports. A custom script can also bewritten to copy the reports to a different location or server before they are removed by sar.If the sar command is run on the command line, the output shows system informationin ten-minute intervals as shown in Listing 20.5.LISTING 20.5Example sar Output12:00:02 AM CPU %user %nice %system %iowait %steal %idle12:10:01 AM all 2.95 0.00 0.32 0.05 0.01 96.6912:20:01 AM all 2.78 0.00 0.29 0.05 0.01 96.8812:30:01 AM all 2.80 0.00 0.31 0.00 0.01 96.8912:40:01 AM all 2.98 0.00 0.32 0.48 0.01 96.2212:50:01 AM all 2.83 0.00 0.31 0.10 0.01 96.76To specify the time interval and number of iterations displayed:sar For example, sar 60 5 displays 5 iterations at 60 second intervals.To only take a snapshot for a specific processor, specify it with the -P argument.For example, sar -P 0 60 5 displays 5 iterations at 60 second intervals for the firstprocessor only. The processor numbering starts at 0.By default, sar shows CPU information. Refer to Table 20.2 for other common displayoptions.TABLE 20.2 Command-Line Options for sarCommand-Line OptionDescription-u Show CPU statistics (default)-b Show I/O and transfer rate statistics-r Show memory and swap space statistics-R Show memory statistics20

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

Saved successfully!

Ooh no, something went wrong!