回文章列表
作者adolf.bbs@cd.twbbs.org (Walk On Water) 看板: linux
標題Re: [問題] ifconfig中顯示的介面流量?
時間中正築夢園 (2008/07/03 Thu 21:36:35)
※ 引述《ramDisk.bbs@ptt.cc (RamDisk)》之銘言:
> 請問,在下ifconfig後,RX packets:0這封包統計量是怎判別?
> 其source code可以在何處尋得?
> eth1      Link encap:Ethernet  HWaddr 00:88:77:15:66:97
>           inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>           Interrupt:9
http://lxr.linux.no/linux/include/linux/netdevice.h#L126

struct net_device_stats
{
        unsigned long   rx_packets;             /* total packets received
  */
        unsigned long   tx_packets;             /* total packets transmitted
   */
        unsigned long   rx_bytes;               /* total bytes received
  */
        unsigned long   tx_bytes;               /* total bytes transmitted
   */
        unsigned long   rx_errors;
....
--
* Origin: 中正築夢園 (CcuDream.twbbs.org) ★ From: 140.123.102.254
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻