Use nmon in Aix for monitoring and analysis
Download nmon from here:
Http://www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser
1. Preparation
:
1) log on to the system as the root user.
2) create a directory: # mkdir/nmon/script
3) determine the version: # oslevel to determine which script to use. I use 530
# Oslevel-S
530
0-09-01-0847
4) Upload nmon12e_aix530 over FTP to/nmon/script
5) execute the authorization command: # chmod + x nmon12e_aix530
2. Use
:
1) Direct use:
./Nmon/nmon12e_aix536-F-n-M/nmon/log-S 30-C 2880
Indicates:
-F output file in standard format:
-N include NFS sections
-M: switch to the path to save the log file.
-S: sample every n seconds. The value is 30.
-C: the number of samples taken out. The value here is 2880, that is, monitoring = 2880 * (30/60/60) = 24 hours.
The formula for calculating this number by hour is: c = H * 3600/s. For example, if you want to monitor for 10 hours and sample every 30 seconds, c = 10*3600/30 = 1200
2) regular use with crontab:
A. Execute the command: # crontab-e
B. Add the following command in the last line:
0 8 ** 1, 2, 4, 5/nmon/script/nmon12e_aix530-F-n-M/nmon/log-S 30-C 1200
Indicates:
From Monday to Friday, from AM, monitoring for 10 hours (until), output to/nmon/log
3. Analysis
1) The *. nmon file will be generated in/tmp/nmon and downloaded to your computer.
2) Open nmon analyser v339.xls, set the macro security to the minimum, and open the downloaded *. nmon file.
And saved as a file. The view mode is generated, which is very intuitive!
Refer:
Appendix 1: crontab parameters:
Reference: http://tech.ddvip.com/2008-11/122629526990895.html
F1 F2 F3 F4 F5 Program
Minute Hour day_of_month month weekday command these fields receive the following values:
Minute 0 to 59
Hour 0 to 23
Day_of_month 1 to 31
Month 1 to 12
Weekday 0 to 6 (Sunday to Saturday)
F1 indicates the minute, F2 indicates the hour, F3 indicates the day of the month, F4 indicates the month, and F5 indicates the day of the week. Program indicates the program to be executed.
When F1 is *, the program is executed every minute. When F2 is *, the program is executed every hour, and so on.
When F1 is a-B, it indicates that execution is performed from the minute a to the minute B. When F2 is a-B, it indicates that execution is performed from the hour a to the hour B, and so on
When F1 is */N, it indicates execution is performed every n minutes. If F2 is */N, it indicates execution is performed every n hours, and so on.
When F1 is a, B, c ,... a, B, C ,... execute in minutes. F2 is a, B, c ,... a, B, c... execution in hours, and so on
Appendix 2: nmon parameters:
Reference http://www.ibm.com/developerworks/wikis/display/Wikiptype/nmonanalyser
Nmon:
-F spreadsheet output format [Note: default-s300-c288]
Output file is
-F <FILENAME> same as-F but user supplied filename
-C <number> Number of snapshots
-D requests Disk Service and wait times (diskserv and diskwait)
-I <percent> ignore processes using less than this amount of CPU
When generating top section-useful for indexing data volumes
-G <FILENAME> file containing disk group definitions
-L <DPL> Number of hdisks per sheet-defaults to 150, maximum 250. See Notes
-M <dir> nmon changes to this directory before saving the file
-R <runname> goes into spreadsheet file [Default hostname]
-S <seconds> interval between snap shots
-X Capacity Planning (15 mins for 1 day =-FDT-s900-c96)
-T include top processes in the output
-T as-T plus saves command line arguments in UARG Section
-A include data for async I/O (procaio) Sections
-D prevents disk sections being produced (useful when disk groups are being used because there are too hdisks to process)
-E stops ESS sections being produced (necessary when disk
Groups are being used because there are too tables vpaths to process)
-J prevents JFS sections being produced (prevents Excel errors when you have more than 255 filesystems)
-L primary des largepage Section
-N include NFS sections
-S include WLM sections with subclasses
-W include WLM sections without subclasses
-Y include summary section (very efficient alternative to-T if PID level data is not required)
Example: nmon_aix51-F Asterix. nmon-r test1-S6-C12
Note: Reference: http://www.blogjava.net/itstarting/archive/2009/02/19/255638.html