運用コマンドレファレンス Vol.2
[機能]
ネットワークの状態・統計を表示します。
[入力形式]
[show] netstat [detail][ numeric ][ addressfamily <address family> ] [show] netstat all-protocol-address [detail][numeric] [ addressfamily <address family> ] [show] netstat multicast [{ [ detail ][ numeric ] | statistics }] [ addressfamily <address family> ] [show] netstat routing-table[{ [ detail ][numeric ] | statistics }] [ addressfamily <address family> ] [show] netstat interface [ -c ] [show] netstat interface <Name> [{ statistics | -c | wait <time> }] [show] netstat [{ memory | protocol <protocol>| rm }]
[パラメータ]
- 省略
- すべてのソケットの状態を表示します。サーバ・プロセスが使用しているソケットは通常表示されません。
- all-protocol-address
- ソケットに関係するすべてのプロトコル制御ブロックのアドレスを表示します。デバッグに使用します。
- -c
- interface指定時に表示される情報をk(キロ)やM(メガ)などで省略せずに表示します。
- addressfamily <address family>
- 指定したアドレスファミリーだけについて,統計またはアドレス制御ブロックをレポートします。
- アドレスファミリーは,inet,ns,iso,local,inet6が指定可能です。
- multicast
- マルチキャストの仮想インタフェースと経路情報を表示します。
- デフォルトでは,IPv4,IPv6両方の情報を表示します。
- (address familyを同時に指定することで,IPv4またはIPv6だけの情報を表示することが可能です。その際に指定する項目は,inet,inet6です。)
- (statisticsも同時に指定された場合,マルチキャストの統計情報を表示します。)
- interface <Name>
- インタフェースの状態を表示します。<Name>省略時はすべてのインタフェースの状態を表示します。(statisticsも同時に指定すれば詳細な情報を表示します。)
- detail
- ルーティング・テーブルを表示する際,およびソケットの状態を表示する際,IPv6アドレスを省略形ではなく正規表記で表示します。
- memory
- メモリを管理する統計情報を表示します。
- numeric
- ネットワークアドレスをホスト名ではなくアドレス番号として表示します。このオプションは,任意の表示フォーマットで使用できます。
- protocol <protocol>
- 指定したプロトコルについての統計情報を表示します。指定できるプロトコルはtcp6,ip6,udp6,icmp6,isisです。
- routing-table
- ルーティング・テーブルを表示します。(statisticsも同時に指定された場合,代わりにルーティングの統計情報を表示します。)
- rm
- RMの情報を表示します。
- statistics
- 各プロトコルごとの統計情報を表示します。routing-tableオプションも同時に指定された場合,ルーティングの統計情報を表示します。
- wait <time>
- ネットワークインタフェースの統計情報について,<time>で指定した秒ごとに定期的に表示します。
[使用者レベル]
一般ユーザ
[実行例]
show netstatコマンド実行後の表示例を「図2-16 ソケットインタフェースの利用状況」〜「図2-25 インタフェース指定時の統計情報」に示します。
図2-16 ソケットインタフェースの利用状況
>show netstat Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp 0 0 localhost.adminweb *.* LISTEN (途中省略) udp 0 0 *.sunrpc *.* Active Internet6 connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp6 0 0 localhost.adminweb *.* LISTEN (途中省略) udp6 0 0 *.sunrpc *.* Active Local domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr f0a29800 dgram 0 0 0 f083f594 0 f0916314 f0a29780 stream 0 0 0 0 0 0 f083fb00 stream 0 0 f083fa80 0 0 0 /var/run/dialer図2-17 各インタフェースの状態
>show netstat interface Ether1 Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll Ether1 1500 3ffe:10:: 3ffe:10::1 203K 0 130K 0 0 Ether1 1500 fe80::%Ether1 fe80::200:87ff: 203K 0 130K 0 0 Ether1 1497 --- --- 3K 0 3K 0 0 >show netstat interface Ether1 -c Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll Ether1 1500 3ffe:10:: 3ffe:10::1 203418 0 130955 0 0 Ether1 1500 fe80::%Ether1 fe80::200:87ff: 203418 0 130955 0 0 Ether1 1497 --- --- 3033 0 3032 0 0図2-18 ルーティング・テーブルの状態
>show netstat routing-table Routing tables Destination Gateway Flags Refs Use Interface Site1 192.168.0.1 UHLc 0 60428 Ether2 >図2-19 プロトコルicmp6についての統計情報
>show netstat protocol icmp6 icmp6: 284 calls to icmp_error 0 errors not generated because old message was icmp 0utput histogram: destination unreachable: 284 3 messages with bad code fields 0 messages < minimum length 0 bad checksums 0 messages with bad length lnput histogram: destination unreachable: 293 0 message responses generated >図2-20 IPv6情報の表示(アドレスファミリー指定)
>show netstat routing-table detail numeric addressfamily inet6 Routing tables Internet6: Destination Gateway Flags Refs Use Interface 3ffe:1::2 3ffe:1::1 UH/DA 0 0 TUNNEL46 3ffe:10::/64 link#3 UC/DMA 0 0 eth04 3ffe:15::/64 link#4 UC/DMA 0 0 eth05 3ffe:507:202:1::/64 link#3 UC/DMA 0 0 eth04 fe80::%eth04/64 link#3 UC/DMA 0 0 eth04 fe80::%eth05/64 link#4 UC/DMA 0 0 eth05 fe80::%TUNNEL46/64 link#2826 UC/DA 0 0 TUNNEL46 ff02::%eth04/32 link#3 UC/DMA 0 0 eth04 ff02::%eth05/32 link#4 UC/DMA 0 0 eth05 ff02::%TUNNEL46/32 link#2826 UC/DA 0 0 TUNNEL46 >図2-21 インタフェースEther1の累計統計情報
>show netstat interface Ether1 wait 5 Name : Ether1 Ipackets Ierrs Opackets Oerrs colls 40763 659 1 0 0 3 0 0 0 0 6 0 0 0 0 ^C >図2-22 IPv6マルチキャストルーティング状態の表示
>show netstat multicast addressfamily inet6 IPv6 Multicast Interface Table Mif Rate PhyIF Pkts-In Pkts-Out 0 0 reg0 0 0 1 0 Department1 0 0 2 0 Department1 0 0 IPv6 Multicast Forwarding Cache Origin Group Packets Waits In-Mif Out-Mifs 3ffe:ffff:1234:5678:1200:87fe ff1e:1234:5678:a 0 0 0 1 2 >図2-23 IPv6マルチキャストルーティング統計情報の表示
>show netstat multicast statistics addressfamily inet6 IPv6 Multicast forwarding: 0 multicast forwarding cache lookups 0 multicast forwarding cache misses 0 upcalls to mrouted 0 upcall llueue overflows 0 upcalls dropped due to full socket buffer 0 cache cleanups 0 datagrams with no route for origin 0 datagrams arrived with bad tunneling 0 datagrams could not be tunneled 0 datagrams arrived on wrong interface 0 datagrams selectively dropped 0 datagrams dropped due to llueue overflow 0 datagrams dropped for being too large >図2-24 IPv6アドレスファミリーisoについての統計情報
>show netstat addressfamily iso statistics isis: 0 total pdus sent 0 with bad header length 0 with an incorrect protocol identifier 0 pdus discarded due to interface disabled 0 pdus discarded due to interface down 0 pdus delivered 0 total pdus received 0 with bad header length 0 with an incorrect protocol identifier 0 pdus discarded due to interface disabled 0 pdus discarded due to interface down 0 pdus dropped due to no bufs 0 pdus dropped due to full socket buffers 0 pdus dropped to no socket 0 pdus delivered RM: 1039 packets received 0 ip 0 ip6 0 isis 1039 control 0 input packets discarded 0 no memory 0 bad length 0 times ip queue full 0 times ip6 queue full 0 times isis queue full 0 times control queue full 1 times receiver disabled 1 times receiver restarted 1016 packets sent 0 ip 0 ip6 0 isis 1016 control 0 output packets discarded 0 times sender disabled 0 times sender restarted >(注)show netstat protocol isis statisticsでは,isisだけの表示になります
図2-25 インタフェース指定時の統計情報
>show netstat interface eth00 statistics eth00: [IP] 1500 maximum transmission unit [MTU] 0 routing metric (external only) 0 packets received on interface 0 input errors on interface 0 packets sent on interface 0 output errors on interface 0 collisions on csma interfaces 0 total number of octets received 0 total number of octets sent 0 packets received via multicast 0 packets sent via multicast 0 packets dropped on input, this interface 0 packets destined for unsupported protocol [IS-IS] 5 packets received on interface 0 input errors on interface 10 packets sent on interface 0 output errors on interface 7735 total number of octets received 15470 total number of octets sent 0 packets destined for unsupported NLPID
[表示説明]
なし
[ユーザ通信への影響]
なし
[応答メッセージ]
表2-24 show netstat (netstat)(IPv6)コマンドのメッセージ一覧
メッセージ 内容 Socket open error. ソケット生成に失敗しました。 Since cache changed, please try again. コマンド実行中に,情報が変更されました。コマンドを再投入してください。
[注意事項]
パラメータwaitを付けて実行した場合,本コマンドの終了は[Ctrl+C]でします。
Copyright (c)2005 ALAXALA Networks Corporation. All rights reserved.