分类:
2008-05-11 22:22:44
myaix#/> netstat -v en0 | grep -p "Specific Statistics"
2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902) Specific Statistics:
--------------------------------------------------------------------
Link Status : Down
Media Speed Selected: Auto negotiation
Media Speed Running: Unknown
PCI Mode: PCI-X (100-133)
PCI Bus Width: 64-bit
Latency Timer: 144
Cache Line Size: 128
Jumbo Frames: Disabled
TCP Segmentation Offload: Enabled
TCP Segmentation Offload Packets Transmitted: 11
TCP Segmentation Offload Packet Errors: 0
Transmit and Receive Flow Control Status: Enabled
XON Flow Control Packets Transmitted: 0
XON Flow Control Packets Received: 0
XOFF Flow Control Packets Transmitted: 0
XOFF Flow Control Packets Received: 0
Transmit and Receive Flow Control Threshold (High): 45056
Transmit and Receive Flow Control Threshold (Low): 24576
Transmit and Receive Storage Allocation (TX/RX): 16/48
如果认为某个网口长时间没有收发数据包,就是这个网口没连接网线,那下面的命令也可以。
myaix#/> tcpdump -i en0
tcpdump: listening on en0
^C
0 packets received by filter
0 packets dropped by kernel
myaix#/>
myaix#/> netstat -s -Z -I en1; netstat -s -s -I en1
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en1 1500 link#3 0.2.55.2f.74.63 0 0 0 0 0
en1 1500 9.186.183 myaix 0 0 0 0 0
myaix#/> netstat -s -s -I en1
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en1 1500 link#3 0.2.55.2f.74.63 6 0 4 0 0
en1 1500 9.186.183 myaix 6 0 4 0 0
myaix#/> netstat -s -s -I en0
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 0.2.55.2f.74.62 0 0 0 0 0
en0 1500 192.168.0 myaix 0 0 0 0 0
myaix#/>
以上命令都可以变通,比如:
netstat -v | grep -p "Specific Statistics"
netstat -I en1; sleep 2; netstat -I en1
netstat -s -Z; netstat -D
netstat -s -s -p ip