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:
=> lparstat

=> vmstat

=> sar

=> procmon

=> nmon

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:
# vmstat
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:
# sar
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.
# mpstat

Further readings

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

2 comments… add one
  • Ganesh Jun 13, 2011 @ 7:25

    Plz, send the comment and discussion about the unix plateform.

    Ganesh a

  • Usman Jul 19, 2012 @ 20:03

    Thank you very supportive commands

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.