These procedures enable you to display the following structure formats for network data by using the netstat command:
All sockets and routing table entries
Inet address family for IPv4
Inet6 address family for IPv6
Statistics per interface—IPv6 or ICMPv6 counters
For more information on the netstat command, see the netstat(1M) man page.
% netstat -a UDP: IPv4 Local Address Remote Address State -------------------- -------------------- ------- *.* Unbound *.apexrpc Idle *.* Unbound . . UDP: IPv6 Local Address Remote Address State If --------------------------------- --------------------------------- ------- *.* Unbound *.time Idle *.echo Idle *.discard Idle *.daytime Idle *.chargen Idle TCP: IPv4 Local Address Remote Address Swind Send-Q Rwind Recv-Q State -------------------- -------------------- ----- ------ ----- ------ ------- *.* *.* 0 0 0 0 IDLE *.apexrpc *.* 0 0 0 0 LISTEN *.* *.* 0 0 0 0 IDLE *.ftp *.* 0 0 0 0 LISTEN localhost.427 *.* 0 0 0 0 LISTEN *.telnet *.* 0 0 0 0 LISTEN tn.apex.COM.telnet is.Eng.apex.COM 8760 0 8760 0 ESTABLISHED tn.apex.COM.33528 np.apex.COM.46637 8760 0 8760 0 TIME_WAIT tn.apex.COM.33529 np.apex.COM.apexrpc 8760 0 8760 0 TIME_WAIT TCP: IPv6 Local Address Remote Address Swind Send-Q Rwind Recv-Q State If ----------------- ----------------- ----- ------ ----- ------ ----- *.* *.* 0 0 0 0 IDLE *.ftp *.* 0 0 0 0 LISTEN *.telnet *.* 0 0 0 0 LISTEN *.shell *.* 0 0 0 0 LISTEN *.smtp *.* 0 0 0 0 LISTEN . . 2::56:8.login something.1023 8640 0 8640 0 ESTABLISHED fe80::a:a8.echo fe80::a:89 8640 0 8640 0 ESTABLISHED fe80::a:a8.ftp fe80::a:90 8640 0 8640 0 ESTABLISHED |
% netstat -f inet TCP: IPv4 Local Address Remote Address Swind Send-Q Rwind Recv-Q State -------------------- -------------------- ----- ------ ----- ------ ------- tn.apex.COM.telnet is.apex.COM.35388 8760 0 8760 0 ESTABLISHED tn.apex.COM.1022 alive-v4.nfsd 8760 0 8760 0 ESTABLISHED tn.apex.COM.1021 sl.apex.COM.nfsd 8760 0 8760 0 ESTABLISHED . . tn.apex.COM.33539 np.apex.COM.apexrpc 8760 0 8760 0 TIME_WAIT |
% netstat -f inet6 TCP: IPv6 Local Address Remote Address Swind Send-Q Rwind Recv-Q State If -------------------- --------------------- ----- ------ ----- ------ ----------- ----- 2::56:a8.login something.1023 8640 0 8640 0 ESTABLISHED fe80::a0:a8.echo fe80::a0:de.35389 8640 0 8640 0 ESTABLISHED . . fe80::a0:a8.ftp-data fe80::a0:de.35394 25920 0 25920 0 TIME_WAIT |
% netstat -sa RAWIP rawipInDatagrams = 1407 rawipInErrors = 0 rawipInCksumErrs = 0 rawipOutDatagrams = 5 rawipOutErrors = 0 UDP udpInDatagrams = 7900 udpInErrors = 0 udpOutDatagrams = 7725 udpOutErrors = 0 TCP tcpRtoAlgorithm = 4 tcpRtoMin = 200 tcpRtoMax = 60000 tcpMaxConn = -1 . . IPv4 ipForwarding = 2 ipDefaultTTL = 255 ipInReceives =406345 ipInHdrErrors = 0 ipInAddrErrors = 0 ipInCksumErrs = 0 . . IPv6 for lo0 ipv6Forwarding = 2 ipv6DefaultHopLimit = 0 ipv6InReceives = 0 ipv6InHdrErrors = 0 . . IPv6 for le0 ipv6Forwarding = 2 ipv6DefaultHopLimit = 255 ipv6InReceives = 885 ipv6InHdrErrors = 0 . . IPv6 ipv6Forwarding = 2 ipv6DefaultHopLimit = 255 ipv6InReceives = 885 ipv6InHdrErrors = 0 . . ICMPv4 icmpInMsgs = 618 icmpInErrors = 0 icmpInCksumErrs = 0 icmpInUnknowns = 0 icmpInDestUnreachs = 5 icmpInTimeExcds = 0 . . ICMPv6 for lo0 icmp6InMsgs = 0 icmp6InErrors = 0 icmp6InDestUnreachs = 0 icmp6InAdminProhibs = 0 . . ICMPv6 for le0 icmp6InMsgs = 796 icmp6InErrors = 0 icmp6InDestUnreachs = 0 icmp6InAdminProhibs = 0 icmp6InTimeExcds = 0 icmp6InParmProblems = 0 . . ICMPv6 icmp6InMsgs = 796 icmp6InErrors = 0 icmp6InDestUnreachs = 0 icmp6InAdminProhibs = 0 . . ICMPv6 for ip.6to4tun0 icmp6InMsgs = 57 icmp6InErrors = 0 icmp6InDestUnreachs = 57 icmp6InAdminProhibs = 0 icmp6InTimeExcds = 0 icmp6InParmProblems = 0 icmp6InPktTooBigs = 0 icmp6InEchos = 0 icmp6InEchoReplies = 0 icmp6InRouterSols = 0 icmp6InRouterAds = 0 icmp6InNeighborSols = 0 icmp6InNeighborAds = 0 icmp6InRedirects = 0 icmp6InBadRedirects = 0 icmp6InGroupQueries = 0 icmp6InGroupResps = 0 icmp6InGroupReds = 0 icmp6InOverflows = 0 icmp6OutMsgs = 57 icmp6OutErrors = 0 icmp6OutDestUnreachs= 57 icmp6OutAdminProhibs= 0 icmp6OutTimeExcds = 0 icmp6OutParmProblems= 0 icmp6OutPktTooBigs = 0 icmp6OutEchos = 0 icmp6OutEchoReplies = 0 icmp6OutRouterSols = 0 icmp6OutRouterAds = 0 icmp6OutNeighborSols= 0 icmp6OutNeighborAds = 0 icmp6OutRedirects = 0 icmp6OutGroupQueries= 0 icmp6OutGroupResps = 0 icmp6OutGroupReds = 0 IGMP: 2542 messages received 0 messages received with too few bytes 0 messages received with bad checksum 2542 membership queries received . . |