Thursday, August 11, 2011

Memory Monitoring - AIX sar command

The sar command is very useful in determining real time statistics about your system. It writes to standard output the contests of selected cumulative activity counters in the operating system. It is located in /usr/sbin, is installable from the AIX base installation media, and is part of the bos.rte.commands fileset.

Syntax

sar { -A | [-a][-b][-c][-d][-k][-m][-q][-r][-u][-v][-w][-y] } [-s hh[:mm[:ss]]]
[-e hh[:mm[:ss]]] [-P processor_id[,...] | ALL] [-f file] [-i seconds] [-o
file] [interval [number]][-X file] [-i seconds] [-o file] [interval [number]]

Useful combinations of the sar command

sar -r

[p630n04][/]> sar -r 10 5


AIX p630n04 3 5 000685CF4C00 10/13/04

System configuration: lcpu=4 mem=8192MB

14:29:15   slots cycle/s fault/s odio/s
14:29:25 2096685 0.00     1.75     0.00
14:29:35 2096685 0.00   112.00     0.00
14:29:45 2096685 0.00     0.00     0.90
14:29:55 2096685 0.00     0.00     0.00
14:30:05 2096685 0.00   170.00     0.00

Average  2096685    0       56        0


Using the sar command

The sar command with the -r flag will display paging statistics.
The output of Example 5-4 shows that there was approximately 8190 MB of free space on the paging spaces in the system (2096685 * 4096 / 1024 / 1024 = 458) during our measurement interval. The sar -r report has the following format:
  • cycle/s Reports the number of page replacement cycles per second (equivalent to the cy column reported by vmstat).
  • fault/s Reports the number of page faults per second. This is not a count of page faults that generate I/O because some page faults can be resolved without I/O.
  • slots Reports the number of free 4096-byte pages on the paging spaces.
  • odio/s Reports the number of non-paging disk I/Os per second.


No comments:

Post a Comment