Q. How do I monitor my IBM AIX UNIX system for CPU performance? What command I need to type in order determine CPU bottlenecks?
A. Like any other enterprise grade UNIX operating system, AIX comes with following tools / utilities to monitor CPU:
Task: vmstat command
Use vmstat command to reports AIX virtual memory statistics. It also displays statistics about kernel threads, virtual memory, disks, traps and CPU activity.
To display a summary of the statistics since boot, enter:
To display 10 summaries at 5-second intervals, enter:
mstat 5 10
Note: The first summary contains statistics for the time since boot.
To display a summary of the statistics since boot including statistics for logical disks scdisk13 and scdisk14, enter:
# vmstat scdisk13 scdisk14
Task: sar command to collects, reports, or saves system activity information
The sar command writes to standard output the contents of selected cumulative activity counters in the operating system. The accounting system, based on the values in the Number and Interval parameters, writes information the specified number of times spaced at the specified intervals in seconds.
To report system unit activity, enter:
To report current tty activity for each 2 seconds for the next 20 seconds, enter:
# sar -y -r 2 20
To watch system unit for 10 minutes and sort data, enter:
# sar -o temp 60 10
To report cpu activity for the first two processors, enter:
# sar -u -P 0,1
mpstat - Displays performance statistics
mpstat collects and displays performance statistics for all logical CPUs in the system. When the mpstat command is invoked, it displays two sections of statistics. The first section displays the system configuration, which is displayed when the command starts and whenever there is a change in the system configuration. The second section displays the utilization statistics, which will be displayed at user-specified intervals and at any time the values of these metrics are deltas from the previous interval.
- An excellent article - AIX CPU monitoring with lparstat, vmstat, sar, procmon, and nmon
- Read man pages of top, ps, mpstat, sar, vmstat for more information