The netpmon command uses the trace facility to obtain a detailed picture of network activity during a time interval. Since it uses the trace facility, netpmon can be run only by root or by a member of the system group. The netpmon command is not designed to work with NFS3(ONC+).
In AIX Version 4, the netpmon command is packaged as part of the Performance Toolbox for AIX. To determine whether netpmon is available, use:
lslpp -lI perfagent.tools
If this package has been installed, netpmon is available.
Tracing is started by the netpmon command, optionally suspended with trcoff and resumed with trcon, and terminated with trcstop. As soon as tracing is terminated, netpmon writes its report to stdout. The following sequence of commands gives a simple example of netpmon use:
# netpmon -o nm.test.out ; ping xactive 256 5 ; trcstop
The report (somewhat condensed) produced by this sequence, in an otherwise idle system, was:
Wed Jan 12 14:33:25 1994 System: AIX alborz Node: 3 Machine: 000249573100 4.155 secs in measured interval ======================================================================== Process CPU Usage Statistics: ----------------------------- Network Process (top 20) PID CPU Time CPU % CPU % ---------------------------------------------------------- ping 12699 0.0573 1.380 0.033 trcstop 12700 0.0150 0.360 0.000 ksh 13457 0.0150 0.360 0.000 rlogind 6321 0.0127 0.306 0.088 netpmon 12690 0.0064 0.153 0.000 netw 771 0.0047 0.113 0.113 netpmon 10650 0.0037 0.090 0.000 trace 10643 0.0023 0.055 0.000 swapper 0 0.0022 0.053 0.000 writesrv 1632 0.0009 0.021 0.000 ---------------------------------------------------------- Total (all processes) 0.1201 2.891 0.234 Idle time 3.8904 93.639 ======================================================================== First Level Interrupt Handler CPU Usage Statistics: --------------------------------------------------- Network FLIH CPU Time CPU % CPU % ---------------------------------------------------------- external device 0.0573 1.379 0.890 data page fault 0.0368 0.887 0.000 floating point 0.0001 0.003 0.000 ---------------------------------------------------------- Total (all FLIHs) 0.0943 2.269 0.890 ======================================================================== Second Level Interrupt Handler CPU Usage Statistics: ---------------------------------------------------- Network SLIH CPU Time CPU % CPU % ---------------------------------------------------------- clock 0.0415 0.998 0.000 tokdd 0.0064 0.154 0.154 <addr=0x00022140> 0.0008 0.019 0.000 ---------------------------------------------------------- Total (all SLIHs) 0.0486 1.171 0.154 ======================================================================== Network Device-Driver Statistics (by Device): --------------------------------------------- ----------- Xmit ---------- ----- Recv ---- Device Pkts/s Bytes/s Util QLen Pkts/s Bytes/s -------------------------------------------------------------- /dev/tok0 3.37 629 0.005 0.005 16.85 1900 ======================================================================== Network Device-Driver Transmit Statistics (by Destination Host): ---------------------------------------------------------------- Host Pkts/s Bytes/s ---------------------------------------- xactive.austin.ibm.com 1.44 390 ======================================================================== Detailed Second Level Interrupt Handler CPU Usage Statistics: ------------------------------------------------------------- SLIH: tokdd count: 84 cpu time (msec): avg 0.076 min 0.058 max 0.097 sdev 0.009 ======================================================================== Detailed Network Device-Driver Statistics: ------------------------------------------ DEVICE: /dev/tok0 recv packets: 70 recv sizes (bytes): avg 112.8 min 68 max 324 sdev 75.2 recv times (msec): avg 0.226 min 0.158 max 0.449 sdev 0.056 xmit packets: 14 xmit sizes (bytes): avg 186.6 min 52 max 314 sdev 100.0 xmit times (msec): avg 1.552 min 1.127 max 2.532 sdev 0.380 ======================================================================== Detailed Network Device-Driver Transmit Statistics (by Host): ------------------------------------------------------------- HOST: xactive.austin.ibm.com xmit packets: 6 xmit sizes (bytes): avg 270.3 min 52 max 314 sdev 97.6 xmit times (msec): avg 1.772 min 1.516 max 2.532 sdev 0.346