[Next] [Previous] [Up] [Top] [Contents]

18.5 Monitoring the network

18.5.4 netstat

netstat shows the status of a network and displays network tables, e.g. to display the statistics concerning packets transferred, errors, etc.:

% netstat -i

Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue

lo0 8232 loopback localhost 4866839 0 4866839 0 0 0

le0 1500 128.146.116.0 nyssa 28898831 598 17568833 1123 332910 0

To display the routing tables use the -r option (-n to prevent host name lookups), e.g.:

% netstat -rn

Routing Table:

Destination Gateway Flags Ref Use Interface

-------------------- -------------------- ----- ----- ------ ---------

127.0.0.1 127.0.0.1 UH 0 4579185 lo0

128.146.116.0 128.146.116.4 U 3 7624 le0

224.0.0.0 128.146.116.4 U 3 0 le0

default 128.146.116.1 UG 0 41960


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]