Sponsored Content
Operating Systems AIX Problem with nmon, actual CPU usage per process Post 302779281 by zaxxon on Tuesday 12th of March 2013 12:31:40 PM
Old 03-12-2013
Sure, there you go (nmon comes these days as part of AIX - same as topaz or replaced it):

Code:
notroot@somehost:/home/notroot# nmon -v
nmon version TOPAS-NMON build AIX
notroot@somehost:/home/notroot# oslevel -s
6100-06-05-1115
notroot@somehost:/home/notroot# which nmon
/usr/bin/nmon
notroot@somehost:/home/notroot# lslpp -w /usr/bin/nmon
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/bin/nmon                               bos.perf.tools        File
notroot@somehost:/home/notroot# nmon -h

Hint: topas_nmon [-h] [-s <seconds>] [-c <count>] [-f -d -t -r <name>] [-x]
 Command: TOPAS_NMON
        -h            FULL help information - much more than here
        Interactive-Mode:
        read startup banner and type: "h" once it is running
        For Data-Collect-Mode (-f)
        -f            spreadsheet output format [note: default -s300 -c288]
        optional
        -s <seconds>  between refreshing the screen [default 2]
        -c <number>   of refreshes [default millions]
        -t            spreadsheet includes top processes
        -x            capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

For Interactive-Mode
        -s <seconds>  between refreshing the screen [default 2]
        -c <number>   of refreshes [default millions]
        -g <filename> User decided Disk Groups
                      - file = on each line: group_name <hdisk_list> space separated
                      - like: rootvg hdisk0 hdisk1 hdisk2
                      - upto 32 groups hdisks can appear more than once
        -b            black and white [default is colour]
        -B            no boxes [default is show boxes]
        example: topas_nmon -s 1 -c 100

For Data-Collect-Mode = spreadsheet format (comma separated values)
        Note: use only one of f,F,z,x or X and make it the first argument
        -f            spreadsheet output format [note: default -s300 -c288]
                         output file is <hostname>_YYYYMMDD_HHMM.nmon
        -F <filename> same as -f but user supplied filename
        -r <runname>  goes into spreadsheet file [default hostname]
        -t            include top processes in the output
        -T            as -t plus saves command line arguments in UARG section
        -Y            like -t but all commands with the same name are added up and reported
                      Note: you can have only one of -t, -T or -Y (last on the cmd line wins)
        -s <seconds>  between snap shots
        -c <number>   of refreshes
        -w <number>   Timestamp size (Tnnnn), values4 to 16, for analyser use 4 or 8
        -l <dpl>      disks/line default 150 to avoid spreadsheet issues. For EMC use 64
        -g <filename> User decided Disk Groups (see above -g)
        -d            Include Disk Service time sections
        -k <disklist> Only report these disks also works online  (Example -k hdisk3,hdisk23,hdisk44)
        -G            Use UTC/GMT standard time (not local time)
        -K            Include RAW Kernel & LPAR sections (RAWLPAR & RAWCPUTOTAL)
        -D            Skip disk configuration sections
        -E            Skip ESS  configuration sections
        -J            Skip JFS sections
        -V            Include disk Volume Group section
        -P            Include Paging Space section
        -M            Include MEMPAGES section = detailed memory stats per page size
        -N            Include NFS section, use -NN for NFSv4 stats.
        -W            Include WLM sections
        -S            Include WLM sections with SubClasses
        -^            Include Fibre Channel (FC) sections
        -O            Include Shared Ethernet Adpater (SEA) VIOS only sections
        -L            Include LARGE page section
        -I <percent>  Ignore process percent threshold (default 0.1)
                      don't save TOP stats if proc using less CPU than this %
        -A            Include Async I/O Section
        -m <dir>      nmon changes to this directory before saving data to a file
        -Z <priority> set nice priority -20=important to 20=unimportant (negative only for root user)
        example: collect for 1 hour at 30 second intervals with top procs
                 topas_nmon -f -t -r Test1 -s30 -c120

        To load into a spreadsheet like Lotus 1-2-3:
        sort -A *nmon >stats.csv
        transfer the stats.csv file to your PC
        Start 1-2-3 and then Open <char-separated-value ASCII file>

Capacity planning mode - use cron to run each day
        -x            sensible spreadsheet output for CP =  one day
                      every 15 mins for 1 day ( i.e. -ft -s 900 -c 96)
        -X            sensible spreadsheet output for CP = busy hour
                      every 30 secs for 1 hour ( i.e. -ft -s 30 -c 120)

Set-up and installation
        To enable disk stats as root: chdev -l sys0 -a iostat=true
        - this adds the disk % busy numbers (otherwise they are zero)
        If you have hundreds of disk this can take 1% to 2% CPU

Interactive Mode Commands
        key --- Toggles to control what is displayed ---
        h   = Online help information
        r   = Resources pSeries type, machine name, cache details and AIX version + LPAR
        p   = Partitions stats
        c   = CPU by processor stats with bar graphs
                 #=toggle PURR based stats (POWER5/6 shared CPUs only)
        C   = CPU by processor stats for high numbers of CPU
        l   = long term CPU (over 75 snapshots) with bar graphs
        m   = Memory and Paging stats
        M   = Multiple Page Size stats in pages - 2nd time in MB's
        k   = Kernel Internal stats
        n   = Network stats
        =   = For Network & Disk Toggle KB/s to MB/s
        O   = Shared Ethernet Adapter VIOS only
        N   = NFS Network File System stats (2nd N gets you NFSv4)
        d   = Disk I/O Graphs (see -k to limit to specific disks)
        D   = Disk I/O Stats - multiple times gets you more stats
        o   = Disk I/O Map (one character per disk showing how busy it is)
        g   = Disk Group I/O Stats (have to use -g commandline option)
        a   = Adapter I/O Stats
        ^   = Fibre Channel Adapter via fcstat command
        [   = Start an On demand nmon recording
        ]   = Stop an On demand nmon recording
        e   = ESS vpath Logical Disk I/O Stats
        V   = Disk Volume Group stats
        P   = Paging Space stats
        j   = JFS Stats
        t   = Top Process Stats  1=Basic-Details 2=Accumulated-CPU
               Performance sorted by 3=CPU 4=Size 5=I/O
        u   = Top but with command arguments shown (used with 3,4 & 5)
               to refresh arguments (for new processes) hit u twice
        U   =  as u plus Workload Classes/WPAR
        W   =  Workload Management (WLM) Stats
        S  =  WLM with SubClasses
        w   = use with top to show AIX wait processes (good for SMP)
        A   = Summarise Async I/O (aioserver) processes
        v   = Verbose this highlights problems on the machine and
              categorises them as either danger, warnings or OK
        b   = black and white mode (or use -b option)
        .   = minimum mode i.e. only busy disks and processes
        ~   = switch to topas screen

        key --- Other Controls ---
        +   = double the screen refresh time
        -   = halves the screen refresh time
        q   = quit (also x)
        0   = reset peak counts to zero (peak = ">")
        space = refresh screen now

Startup Control
        If you find you always type the same toggles every time you start
        then place them in the NMON shell variable. For example:
         export NMON=cmdrvtan

Others:
        a)   Do you want to stop nmon - kill -USR2 <nmon-pid>
        b) Use -p and nmon outputs the background process pid
        c) To limit the processes nmon lists (online and to a file)
           Either set NMONCMD0 to NMONCMD63 to the program names
           or use -C cmd:cmd:cmd etc. example: -C ksh:vi:syncd
        d) To limit the disks nmon lists up to 64 (online only)
           Use -k diskname,diskname,diskname (Example -k hdisk2,hdisk0,hdisk3)

As said, even in other combinations of switches etc., like without -C etc. there was not the output I expected.

Last edited by zaxxon; 03-12-2013 at 01:40 PM.. Reason: added info
 

10 More Discussions You Might Find Interesting

1. Solaris

Process CPU usage in Solaris 10

Hi All, Please let me know the command (expect top) to view the cpu usage of every process in Solaris 10. Thanks in Advance, Arun (1 Reply)
Discussion started by: arun.viswanath
1 Replies

2. AIX

CPU usage of a process

I'm trying to monitor the CPU usage of a process and output that value to a file or variable. I know topas or nmon can tell me this in interactive mode but what I need is topas-looking output that allows me to write to a file after a discrete interval. Unlike nmon data collection to a file on top... (5 Replies)
Discussion started by: robot23
5 Replies

3. UNIX for Advanced & Expert Users

Finding CPU usage by a Unix Process

Hi, I am designing a load balancer for an application. I am trying to find out the CPU usage by a specifc Unix process (PID is known). I guess I can use ps command to find that. can somebody help me in finding what exact command I should use to find? It is on AIX 5.3. Regards Asutosh (2 Replies)
Discussion started by: asutoshch
2 Replies

4. UNIX for Dummies Questions & Answers

process cpu usage

Trying to come up with a command that will show all processes sorted from highest cpu usage to lowest. Any ideas? (9 Replies)
Discussion started by: cwsmichigan
9 Replies

5. Shell Programming and Scripting

CPU Usage for a particular process

Hi, I have a shell script. But, upon execution of the same, the cpu usage is sometimes getting 100 % (checked executing top command). At that point of time, my process hangs, doesn't run anymore. I need to kill it manually. My concern is, is there any default method, by which I can check... (1 Reply)
Discussion started by: jitendriya.dash
1 Replies

6. AIX

How to trace cpu/memory usage for a process

I don't know when the process will start and end, I need write a script to trace it's cpu/memory usage when it is runing. How to write this script? (2 Replies)
Discussion started by: rainbow_bean
2 Replies

7. Shell Programming and Scripting

CPU Usage of a process

Hi guys, I am currently writing a JAVA script to monitor certain unix processes through JConsole. Upon having lots of trouble with runtime.exec, i decided to bypass the top/ps command call and just get the information straight from /proc/*pid*/whatever. Now i can pull back any... (0 Replies)
Discussion started by: matt9949
0 Replies

8. UNIX for Dummies Questions & Answers

Average CPU and RAM usage for a process

Hi, I will be creating a process myself and I want to know the average CPU and RAM used by the process over the lifetime of the process. I see that there are various tools available(pidstat) for doing , I was wondering if it possible to do it in a single command while creation. Thanks in... (3 Replies)
Discussion started by: koustubh
3 Replies

9. Shell Programming and Scripting

Tricky situation with process cpu usage - AIX

OS: AIX so we frequently receive a lot of cpu related alerts. all types of checks have been created to keep an eye on the cpu but a lot of these checks make too much noise as the CPU is always being seen as high. the system and application owners say there's no issue with the cpu. so now,... (6 Replies)
Discussion started by: SkySmart
6 Replies

10. UNIX for Beginners Questions & Answers

How can I check actual memory usage each Process?

I can't check actual memory usage in the Redhat 5.5... The used memory is 14214 Mb of Total 15919 by Free -m command. I sum the RSS value on PS aux command result and the value is 5428.66Mb. Yes It's quite different actual usage memory and RSS value. So I added Shared memory value... (5 Replies)
Discussion started by: tom8254
5 Replies
All times are GMT -4. The time now is 10:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy