Monitoring any performance characteristics is a very important part of achieving the best results possible. There are many ways to investigate different parameters and settings, but combining several tools and commands can give you the best overall picture of performance. This post describes the following tools:
- The ps command
- The sar command
- The svmon command
- The topas monitoring tool
- The vmstat command
The ps (Process Status) command shows the current status of active processes. It is located /usr/bin, installed by default from the AIX base installation media, and is part of the bos.rte.commands fileset.
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.
For memory information, we use the command svmon. svmon shows the total usage of physical and paging memory. When you use the -G flag or give no flags with the svmon command, it will provide you with the global view. The global view shows system-wide memory utilization.
The topas command is a performance monitoring tool that is ideal for broad spectrum performance analysis. The topas command requires the perfagent.tools fileset to be installed on the system. The topas command resides in /usr/bin and is part of the bos.perf.tools fileset that is obtained from the AIX base installable media.
The vmstat command is useful for reporting statistics about virtual memory. The vmstat command is located in /usr/bin, is part of the bos.acct fileset and is installable from the AIX base installation media.
1. Command to display top ten processes and users:
# svmon -P -v -t 10 | more
2. Displaying top CPU_consuming processes:
# ps aux | head -1; ps aux | sort -rn +2
3. Displaying top memory-consuming processes:
# ps aux | head -1; ps aux | sort -rn +3 | head
4. Displaying process in order of priority:
# ps -eakl | sort -n +6 | head
5. Displaying the process in order of time:
# ps vx | head -1;ps vx | grep -v PID | sort -rn +3
6. Displaying the process in order of real memory use:
# ps vx | head -1; ps vx | grep -v PID | sort -rn +6
7. Displaying the process in order of I/O:
# ps vx | head -1; ps vx | grep -v PID | sort -rn +4