Using the netpmon command

The netpmon command will start tracing immediately unless the -d option is used.

Use the trcstop command to stop tracing. At that time, all the specified reports are generated, and the netpmon command exits. In the client-server environment, use the netpmon command to view how networking affects the overall performance. It can be run on both client and server.

The netpmon command can read the I/O trace data from a specified file, instead of from the real-time trace process. In this case, the netpmon report summarizes the network activity for the system and period represented by the trace file. This offline processing method is useful when it is necessary to postprocess a trace file from a remote machine or perform the trace data collection at one time and postprocess it at another time.

The trcrpt -r command must be executed on the trace logfile and redirected to another file, as follows:
# gennames > gennames.out
# trcrpt -r trace.out > trace.rpt

At this point, an adjusted trace logfile is fed into the netpmon command to report on I/O activity captured by a previously recorded trace session as follows:

# netpmon -i trace.rpt -n gennames.out | pg

In this example, the netpmon command reads file system trace events from the trace.rpt input file. Because the trace data is already captured on a file, the netpmon command does not put itself in the background to allow application programs to be run. After the entire file is read, a network activity report will be displayed on standard output (which, in this example, is piped to the pg command).

If the trace command was run with the -C all flag, then run the trcrpt command also with the -C all flag (see Formatting a report from trace -C output).

The following netpmon command running on an NFS server executes the sleep command and creates a report after 400 seconds. During the measured interval, a copy to an NFS-mounted file system /nfs_mnt is taking place.

# netpmon -o netpmon.out -O all; sleep 400; trcstop

With the -O option, you can specify the report type to be generated. Valid report type values are:

cpu
CPU usage
dd
Network device-driver I/O
so
Internet socket call I/O
nfs
NFS I/O
all
All reports are produced. The following is the default value.
# cat netpmon.out

Fri Mar  5 15:41:52 2004
System: AIX crusade Node: 5 Machine: 000353534C00


========================================================================

Process CPU Usage Statistics:
-----------------------------
                                                   Network
Process (top 20)             PID  CPU Time   CPU %   CPU %
----------------------------------------------------------
netpmon                    45600    0.6995   1.023   0.000
nfsd                       50090    0.5743   0.840   0.840
UNKNOWN                    56912    0.1274   0.186   0.000
trcstop                    28716    0.0048   0.007   0.000
gil                         3870    0.0027   0.004   0.004
ksh                        42186    0.0024   0.003   0.000
IBM.ServiceRMd             14966    0.0021   0.003   0.000
IBM.ERrmd                   6610    0.0020   0.003   0.000
IBM.CSMAgentRMd            15222    0.0020   0.003   0.000
IBM.AuditRMd               12276    0.0020   0.003   0.000
syncd                       4766    0.0020   0.003   0.000
sleep                      28714    0.0017   0.002   0.000
swapper                        0    0.0012   0.002   0.000
rpc.lockd                  34942    0.0007   0.001   0.000
netpmon                    28712    0.0006   0.001   0.000
trace                      54622    0.0005   0.001   0.000
reaper                      2580    0.0003   0.000   0.000
netm                        3612    0.0002   0.000   0.000
aixmibd                     4868    0.0001   0.000   0.000
xmgc                        3354    0.0001   0.000   0.000
----------------------------------------------------------
Total (all processes)               1.4267   2.087   0.844
Idle time                          55.4400  81.108

========================================================================

First Level Interrupt Handler CPU Usage Statistics:
---------------------------------------------------
                                                   Network
FLIH                              CPU Time   CPU %   CPU %
----------------------------------------------------------
external device                     0.3821   0.559   0.559
PPC decrementer                     0.0482   0.070   0.000
data page fault                     0.0137   0.020   0.000
queued interrupt                    0.0002   0.000   0.000
----------------------------------------------------------
Total (all FLIHs)                   0.4441   0.650   0.559

========================================================================

Second Level Interrupt Handler CPU Usage Statistics:
----------------------------------------------------
                                                   Network
SLIH                              CPU Time   CPU %   CPU %
----------------------------------------------------------
phxentdd32                          2.4740   3.619   3.619
----------------------------------------------------------
Total (all SLIHs)                   2.4740   3.619   3.619

========================================================================

Network Device-Driver Statistics (by Device):
---------------------------------------------
                        ----------- Xmit -----------   -------- Recv ---------
Device                   Pkts/s  Bytes/s  Util  QLen   Pkts/s  Bytes/s   Demux
------------------------------------------------------------------------------
ethernet 4              7237.33 10957295  0.0%27.303  3862.63   282624  0.2324

========================================================================

Network Device-Driver Transmit Statistics (by Destination Host):
----------------------------------------------------------------

Host                     Pkts/s  Bytes/s
----------------------------------------
client_machine           7237.33 10957295

========================================================================

NFS Server Statistics (by Client):
----------------------------------
                         ------ Read -----   ----- Write -----     Other
Client                   Calls/s   Bytes/s   Calls/s   Bytes/s   Calls/s
------------------------------------------------------------------------
client_machine		    0.00         0      0.00         0    321.15
------------------------------------------------------------------------
Total (all clients)         0.00         0      0.00         0    321.15

========================================================================

Detailed Second Level Interrupt Handler CPU Usage Statistics:
-------------------------------------------------------------

SLIH: phxentdd32
count:                  33256
  cpu time (msec):      avg 0.074   min 0.018   max 288.374 sdev 1.581

COMBINED (All SLIHs)
count:                  33256
  cpu time (msec):      avg 0.074   min 0.018   max 288.374 sdev 1.581

========================================================================

Detailed Network Device-Driver Statistics:
------------------------------------------

DEVICE: ethernet 4
recv packets:           33003
  recv sizes (bytes):   avg 73.2    min 60      max 618     sdev 43.8
  recv times (msec):    avg 0.000   min 0.000   max 0.005   sdev 0.000
  demux times (msec):   avg 0.060   min 0.004   max 288.360 sdev 1.587
xmit packets:           61837
  xmit sizes (bytes):   avg 1514.0  min 1349    max 1514    sdev 0.7
  xmit times (msec):    avg 3.773   min 2.026   max 293.112 sdev 8.947

========================================================================

Detailed Network Device-Driver Transmit Statistics (by Host):
-------------------------------------------------------------

HOST: client_machine (10.4.104.159)
xmit packets:           61837
  xmit sizes (bytes):   avg 1514.0  min 1349    max 1514    sdev 0.7
  xmit times (msec):    avg 3.773   min 2.026   max 293.112 sdev 8.947

========================================================================

Detailed NFS Server Statistics (by Client):
-------------------------------------------

CLIENT: client_machine
other calls:            2744
  other times (msec):   avg 0.192   min 0.075   max 0.311   sdev 0.025

COMBINED (All Clients)
other calls:            2744
  other times (msec):   avg 0.192   min 0.075   max 0.311   sdev 0.025

The output of the netpmon command is composed of two different types of reports: global and detailed. The global reports list statistics as follows:

  • Most active processes
  • First-level interrupt handlers
  • Second-level interrupt handlers
  • Network device drivers
  • Network device-driver transmits
  • TCP socket calls
  • NFS server or client statistics

The global reports are shown at the beginning of the netpmon output and are the occurrences during the measured interval. The detailed reports provide additional information for the global reports. By default, the reports are limited to the 20 most active statistics measured. All information in the reports is listed from top to bottom as most active to least active.