Monitoring Commands
nmon
vmstat
iostat
sar
topas
nmon
svmon
filemon
rmss
nmon
More info bout nmon
http://www-128.ibm.com/developerworks/aix/library/au-analyze_aix/
vmstat
The vmstat command is useful for obtaining an overall picture of CPU, paging, and memory usage.
$ vmstat 5 2
System Configuration: lcpu=2 mem=8192MB
kthr memory page faults cpu
—– ———– ———————— ———— ———–
r b avm fre re pi po fr sr cy in sy cs us sy id wa
1 1 287340 317 0 0 0 124 261 0 265 261 122 2 0 97 0
0 0 287344 313 0 0 0 0 0 0 228 491 76 0 0 99 0
Remember that the first report from the vmstat command displays cumulative activity since the last system boot. The second report shows activity for the first 5-second interval.
iostat
The iostat command is the fastest way to get a first impression, whether or not the system has a disk I/O-bound performance problem. This tool also reports CPU statistics.
Flags -a Specifies adapter throughput report.
-d Specifies drive report only.
-m Specifies statistics for paths.
-t Specifies tty/cpu report only.
-z Resets the disk input/output statistics.$
iostat 2 2
System configuration: lcpu=2 disk=20tty: tin tout avg-cpu: % user % sys % idle % iowait
0.0 1.0 1.9 0.4 97.5 0.3Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk1 0.8 133.9 12.7 1221182814 13264883
hdisk0 1.1 148.9 6.5 913739775 459468711
hdisk8 0.0 0.0 0.0 0 0
svmon
The svmon command provides a more in-depth analysis of memory usage. It is more informative, but also more intrusive, than the vmstat and ps commands. The svmon command captures a snapshot of the current state of memory.
The memory consumption is reported using the inuse, free, pin, virtual and paging space counters.
- The inuse counter represents the number of used frames.
- The free counter represents the number of free frames from all memory pools.
- The pin counter represents the number of pinned frames, that is, frames that cannot be swapped.
- The virtual counter represents the number of pages allocated in the system virtual space.
- The paging space counter represents the number of pages reserved or used on paging spaces.
Flags
-G Global report
-U User report
-P Process report
-i To define intervel and number of intervels. eg. -i 1 5
A memory leak can be detected with the svmon command, by looking for processes whose working segment continually grows. A leak in a kernel segment can be caused by an mbuf leak or by a device driver, kernel extension, or even the kernel. To determine if a segment is growing, use the svmon command with the -i option to look at a process or a group of processes and see if any segment continues to grow.
#
svmon -P 13548 -i 1 2
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd LPage 13548 pacman 8535 2178 847 8533 N N NVsid Esid Type Description LPage Inuse Pin Pgsp Virtual0 0 work kernel seg - 4375 2176 847 437548412 2 work process private - 2357 2 0 23576c01b d work shared library text - 1790 0 0 17904c413 f work shared library data - 11 0 0 11
3040c 1 pers code,/dev/prodlv:4097 - 2 0 - -
ginger :svmon -P 13548 -i 1 3
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd LPage
13548 pacman 8589 2178 847 8587 N N N
Vsid Esid Type Description LPage Inuse Pin Pgsp Virtual
0 0 work kernel seg - 4375 2176 847 4375
48412 2 work process private - 2411 2 0 2411
6c01b d work shared library text - 1790 0 0 1790
4c413 f work shared library data - 11 0 0 11
3040c 1 pers code,/dev/prodlv:4097 - 2 0 - -
filemon
The filemon command monitor a trace for file system and IO system events and reports performance statistics for files, virtual memory segments, logical volumes and physical volumes. filemon is useful to those whose applications are believed to be disk-bound and want to know where and why.
filemon command shows the load on different disks, logical volumes and files in a great detail.
trcstop command is used to stop the filemon monitoring.
The syntax of filemon command is
filemon [-o output_file] [-O levels] [-u] [-v]
-O [lv | pv | vm | If | all ]
(If - Logical file level, vm - Virtual memory level, lv - lv level)
-u Reports on files that were opened prior to the start of the trace daemon
If the output file is not specified, the output is sent to standard output.
To start the filemon monitoring for 1 min.
#
filemon -uo filemon.out -O all ; sleep 60; trcstop
To find out the most active Logical Volumes
#
awk '/Most Active Logical Volumes/,/^$/' filemon.out
Most Active Logical Volumes————————————————-
util #rblk #wblk KB/s volume description
————————————————————————
0.04 4208 0 34.9 /dev/paging00 paging0.04 4000 0 33.2 /dev/hd6 paging
0.01 1680 11408 108.6 /dev/oralvr32 /oracle/R32
0.00 0 264 2.2 /dev/hd8 jfs2log
To find out most active Files
#
awk '/Most Active Files/,/^$/' filemon.out
To find out most active physical Volumes
#
awk '/Most Active Physical Volumes/,/^$/' filemon.out
rmss
The rmss command provides you with a means to simulate different sizes of real memory that are smaller than your actual machine, without having to extract and replace memory boards or reconfigure memory using logical partitions.
To change the memory size to 500 MB
#
rmss -c 500
Simulated memory size changed to 500 Mb.
To reset the memory size to the real memory size of the machine, enter:
#
rmss -r
Popularity: 11% [?]
You Should Also Check Out This Post:
- Troubleshooting for startup inconsistent DB
- Linux System information
- set hostname without reboot
- ssh[23593]: [ID 530472 user.error] Kerberos mechanism library initialization error:
- Tracking Down "Last Reboot" on windows


An ordinary people, participants, contributor who share their own experiences, their knowledge, their informations, task, a few tips and tricks, their problem with solving tools..
No User Responded In This Article
Leave Your Comment Below