需要IPv4等价于/ proc / net / dev_snmp6

时间:2014-12-02 17:06:40

标签: ubuntu linux-kernel

我需要获取类似于/ proc / net / dev_snmp6的IPv4统计信息。我在Ubuntu 14.04.1上 dev_snmp6给出了如下详细的统计数据。我需要类似的一个v4

ifIndex                             2
Ip6InReceives                       22
Ip6InHdrErrors                      0
Ip6InTooBigErrors                   0
Ip6InNoRoutes                       0
Ip6InAddrErrors                     0
Ip6InUnknownProtos                  0
Ip6InTruncatedPkts                  0
Ip6InDiscards                       0
Ip6InDelivers                       22
Ip6OutForwDatagrams                 0
Ip6OutRequests                      34
Ip6OutDiscards                      0
Ip6OutNoRoutes                      0
Ip6ReasmTimeout                     0
Ip6ReasmReqds                       0
Ip6ReasmOKs                         0
Ip6ReasmFails                       0
Ip6FragOKs                          0
Ip6FragFails                        0
Ip6FragCreates                      0
Ip6InMcastPkts                      22
Ip6OutMcastPkts                     42
Ip6InOctets                         3724
Ip6OutOctets                        4584
Ip6InMcastOctets                    3724
Ip6OutMcastOctets                   5212
Ip6InBcastOctets                    0
Ip6OutBcastOctets                   0
Ip6InNoECTPkts                      22
Ip6InECT1Pkts                       0
Ip6InECT0Pkts                       0
Ip6InCEPkts                         0
Icmp6InMsgs                         0
Icmp6InErrors                       0
Icmp6OutMsgs                        12
Icmp6OutErrors                      0
Icmp6InCsumErrors                   0
Icmp6InDestUnreachs                 0
Icmp6InPktTooBigs                   0
Icmp6InTimeExcds                    0
Icmp6InParmProblems                 0
Icmp6InEchos                        0
Icmp6InEchoReplies                  0
Icmp6InGroupMembQueries             0
Icmp6InGroupMembResponses           0
Icmp6InGroupMembReductions          0
Icmp6InRouterSolicits               0
Icmp6InRouterAdvertisements         0
Icmp6InNeighborSolicits             0
Icmp6InNeighborAdvertisements       0
Icmp6InRedirects                    0
Icmp6InMLDv2Reports                 0
Icmp6OutDestUnreachs                0
Icmp6OutPktTooBigs                  0
Icmp6OutTimeExcds                   0
Icmp6OutParmProblems                0
Icmp6OutEchos                       0
Icmp6OutEchoReplies                 0
Icmp6OutGroupMembQueries            0
Icmp6OutGroupMembResponses          0
Icmp6OutGroupMembReductions         0
Icmp6OutRouterSolicits              3
Icmp6OutRouterAdvertisements        0
Icmp6OutNeighborSolicits            1
Icmp6OutNeighborAdvertisements      0
Icmp6OutRedirects                   0
Icmp6OutMLDv2Reports                8
Icmp6OutType133                     3
Icmp6OutType135                     1
Icmp6OutType143                     8

1 个答案:

答案 0 :(得分:0)

/ proc / net / dev检查此文件

Inter-|   Receive                                                |  Transmit


face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
lo: 17601481   83195    0    0    0     0          0         0 17601481   83195    0    0    0     0       0          0

eth0:88304516 1392082 0 0 0 0 0 0 174173 1109 0 0 0 0 0 0