ChorusOS 4.0 Network Administration Guide

netstat

netstat(1CC) displays information about network-related data structures, such as network interfaces (use the -i option) and routing tables (use the -r) option. The utility is available both as a C_INIT(1M) built-in command, and as a standalone actor that supports a wider range of options.


Example 6-3 Displaying Network Statistics with netstat

The following example uses the built-in version of netstat to view information about network interfaces and routing tables.


$ rsh target netstat -i
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
ifeth 1500  <Link>      00.e0.29.3c.6c.7f       17     0       10     0     0
ifeth 1500  129.157       129.157.197.88        17     0       10     0     0
lo0   16384 <Link>                               0     0        0     0     0
lo0   16384 127           127.0.0.1              0     0        0     0     0
$ rsh target netstat -r
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
127.0.0.1          127.0.0.1          UH          0        0       lo0
129.157            link#1             UC          0        0 
129.157.197.144    8:0:20:a7:d6:f3    UHLW        3       17    ifeth0   1178

Note that in order for the built-in version to function, you must set the ADMIN_NETSTAT feature to true and rebuild the ChorusOS system image.

netstat is also available as a stand-alone actor, /bin/netstat.r.