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.

408CHAPTER 20Monitoring System ResourcesTo create continuous reports, specify a time interval in seconds after the command. Forexample, to generate iostat reports every minute, use the command iostat 60. PressCtrl+C to stop the output. Alternatively, specify the number of intervals as well with theformat iostat such as iostat 60 5 to generate a report every60 seconds for 5 iterations. As mentioned previously, after the first report of averages,each report is the instantaneous change from the previous report.To include a line of values for the entire device along with the statistics for each partition,use the iostat -p command such as the following for /dev/sda:iostat -p /dev/sdaTo display the statistics for more than one device, replace with a space-separatedlist of device names.TABLE 20.1 Explanation of iostat Headersiostat Header Explanation%userPercentage of CPU usage at the user level%nicePercentage of CPU usage at the user level with nice priority%sysPercentage of CPU usage at the system level%iowaitPercentage of time the CPU(s) were idle while the system had anoutstanding I/O request%idlePercentage of time the CPU(s) were idle while the system did not havean outstanding I/O requesttpsTransfers per secondBlk read/s Amount of data read from the device in number of blocks per secondBlk wrtn/s Amount of data written to the device in number of blocks per secondBlk readNumber of blocks readBlk wrtnNumber of blocks writtenTIPIn addition, the command vmstat -d reports additional disk usage, and vmstat -p such as vmstat -p sda1 reports disk usage for a specific partition.Using sarAlso part of the sysstat commands, the sar utility produces system reports about theI/O, CPU, and memory. The data can be collected at specific intervals, thus making it easyto determine performance at specific load times. For example, if a system’s usage peaks ata specific time everyday, the sar output can be analyzed to determine if more resourcesare necessary to handle the highest load.Before using sar, it must be initialized with the following commands (replace lib withlib64 for 64-bit system):

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

Saved successfully!

Ooh no, something went wrong!