AIX---netpmon

netpmon命令用于监控与网络有关的I/0及CPU的使用情况。

  以root 身份运行下面的命令,可以找出进程使用的CPU时间,以及其中与网络有关的代码使用的CPU时间:

  # netpmon -o /tmp/netpmon.out -O cpu -v; sleep 30; trcstop

  此命令运行30 秒钟,并在/tmp目录下生成文件 netpmon.out。其中字段 CPU Time 为进程使用CPU

  的时间总值,CPU%对应其百分比,Network CPU% 为进程中与网络有关的代码所占用的CPU百分比。如下所示:


# more /tmp/netpmon.out
Wed Aug 15 16:15:15 2007
System: AIX oracle2 Node: 5 Machine: 005073CD4C00

trace -a -T 256000 -o - -j 000,000,001,002,003,005,006,106,10C,139,134,135,100,200,102,103,101,104,465,467,46A,
00A,256,255,262,26A,26B,32D,32E,2A7,2A8,351,352,320,321,30A,30B,330,331,334,335,2C3,2C4,2A4,2A5,2E6,2E7,2DA,2DB
,2EA,2EB,252,216,211      
TIME:    0.000000000    TRACE ON pid 1662992 tid 0x2a8015
TIME:   30.002476450    TRACE OFF
Hook counts
-----------------------------
           TrcOn: 1
          TrcOff: 1
          TrcHdr: 4
        TrcTWrap: 187
        Dispatch: 26204
            Idle: 46017
            Fork: 1
            Exec: 1
            Exit: 8
            Flih: 25479
          Resume: 82837
            Slih: 10655
         SlihRet: 10655
        SVCEnter: 321792
       SVCReturn: 321731
    Createthread: 1
         TrcUtil: 1001
            IfEn: 9257
          Socket: 113004

968836 hooks processed (incl. 1194 utility)
30.002 secs in measured interval

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

Process CPU Usage Statistics:
-----------------------------
                                                   Network
Process                      PID  CPU Time   CPU %   CPU %
----------------------------------------------------------
oracle                   1745142    1.1525   0.960   0.000
UNKNOWN                  2113548    0.6105   0.509   0.000
oracle                   1196136    0.5308   0.442   0.009
oracle                    843984    0.3940   0.328   0.007
oracle                   1548420    0.3821   0.318   0.006
oracle                   1171498    0.3382   0.282   0.006
oracle                   1302590    0.3291   0.274   0.005
oracle                    974996    0.3278   0.273   0.005
oracle                   1507490    0.3224   0.269   0.005
oracle                   1253426    0.3046   0.254   0.005
oracle                    892972    0.2259   0.188   0.004
oracle                   1327172    0.2098   0.175   0.003
oracle                   1204434    0.1992   0.166   0.003
oracle                    925944    0.1913   0.159   0.003
oracle                   2023594    0.1903   0.159   0.003
oracle                    483440    0.1849   0.154   0.003
oracle                    458788    0.1749   0.146   0.003
oracle                   1859812    0.1743   0.145   0.003
oracle                    721084    0.1666   0.139   0.003

请使用浏览器的分享功能分享到微信等