Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 2 210.34.6.89:telnet 210.34.6.96:2873 ESTABLISHED
tcp 296 0 210.34.6.89:1165 210.34.6.84:netbios-ssn ESTABLISHED
tcp 0 0 localhost.localdom:9001 localhost.localdom:1162 ESTABLISHED
tcp 0 0 localhost.localdom:1162 localhost.localdom:9001 ESTABLISHED
tcp 0 80 210.34.6.89:1161 210.34.6.10:netbios-ssn CLOSE
[root@machine1 /]$ netstat -ta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 2 210.34.6.89:telnet 210.34.6.96:2873 ESTABLISHED
tcp 0 0 210.34.6.89:1165 210.34.6.84:netbios-ssn ESTABLISHED
tcp 0 0 localhost.localdom:9001 localhost.localdom:1162 ESTABLISHED
tcp 0 0 localhost.localdom:1162 localhost.localdom:9001 ESTABLISHED
tcp 0 0 *:9001 *:* LISTEN
tcp 0 0 *:6000 *:* LISTEN
tcp 0 0 *:socks *:* LISTEN
tcp 0 80 210.34.6.89:1161 210.34.6.10:netbios-ssn CLOSE
上面的输出表明部分服务器处于等待接入连接状态。利用- a选项的话,netstat还会显示出所有的套接字。注意根据端口号,可以判断出一条连接是否是外出连接。对呼叫方主机来说,列出的端口号应该一直是一个整数,而对众所周知服务(well known service)端口正在使用中的被呼叫方来说,netstat采用的则是取自/etc/services文件的象征性服务名。