Wednesday, May 27, 2015

Linux/AIX Resource monitoring tools used during performance/load testing

 1. NMON  :-
   - we can use NMON in 2 ways 1. interactive 2. recording . Following is example of recording various parameters
     nmon  -ftm <nmon_stat> -s 300 -c 7200000
      - above command will start nmon for 7200000*300 times in nmon_start folder. It will create <timestamp>.nmon file to save the stats
 - to analyze results, we can use nmon_analyser_v42(provide .nmon file as input to MS excel sheet to generate various graphs)
 - Download analyser from below link.


  2. sar :-
    - sar collects the stats for CPU,memory,IO,Network related activity
- We can use ksar to generate graph from collected data.
   LC_ALL=C sar -A -f /var/log/sa/sa > /tmp/sar_report.txt

  3. vmstat :-
  procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
   r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
   0  0      0 16836884 202724 2405112    0    0     0     1    0    0  0  0 100  0  0
    r - no. of running processes
    b - no. of blocked processes,waiting for resource
    buff- buffer for I/O operation
    cache- cached by OS
    bi- blocks(1k) read from hard disk
    bo- blocks write into hard disk
    in - interrupts per sec
    cs - no. of context switched per second. - switching of CPU from one process to another

>> How to free memory in AIX
set as 
$vmo -o minperm%=1 -o maxperm%=1 -o strict_maxperm=1 -o minclient%=1 -o maxclient%=1
Restore origninal value:- 
$vmo -o minperm%=3 -o maxperm%=90 -o strict_maxperm=90 -o minclient%=67 -o maxclient%=90

  4. TOP

  5. PS
   - $ ps -eLF | grep java |wc -l :-  it will give total count of java processes(threads)

No comments:

Post a Comment