ネットワークインターフェースチェック
ネットワークインターフェースでどの程度のトラフィックが発生しているのかはnetstat(1)コマンドで確認できます。次のようにnetstat(1)を実行すると、
% netstat -i 1
input (Total) output
packets errs idrops bytes packets errs bytes colls
19 0 0 4200 21 0 8848 0
1 0 0 70 2 0 268 0
11 0 0 1172 10 0 2177 0
3 0 0 234 6 0 656 0
5 0 0 445 4 0 1287 0
3 0 0 269 3 0 329 0
2 0 0 205 2 0 248 0
0 0 0 0 0 0 0 0
11 0 0 1017 12 0 2325 0
159 0 0 196743 99 0 18510 0
6 0 0 1482 8 0 898 0
1 0 0 70 2 0 268 0
0 0 0 0 0 0 0 0
6 0 0 493 6 0 1837 0
12 0 0 1573 13 0 1907 0
25 0 0 2975 25 0 3737 0
4 0 0 430 7 0 696 0
141 0 0 192568 79 0 9623 0
2 0 0 228 3 0 390 0
4 0 0 368 4 0 442 0
140 0 0 192777 78 0 8423 0
システムに複数のネットワークインターフェースが存在している場合、
% netstat -I igb0 1
input igb0 output
packets errs idrops bytes packets errs bytes colls
174 0 0 229221 103 0 12812 0
2 0 0 196 3 0 418 0
7 0 0 575 6 0 1837 0
1 0 0 70 1 0 178 0
4 0 0 388 3 0 406 0
139 0 0 193872 76 0 8202 0
233 0 0 56058 250 0 60452 0
15 0 0 1214 13 0 2642 0
13 0 0 3581 13 0 2822 0
7 0 0 752 8 0 1130 0
7 0 0 628 5 0 604 0
3 0 0 250 3 0 342 0
0 0 0 0 0 0 0 0
8 0 0 725 7 0 1955 0
1 0 0 70 1 0 178 0
23 0 0 6067 24 0 6888 0
19 0 0 4211 20 0 4240 0
12 0 0 2732 6 0 904 0
92 0 0 54486 93 0 54380 0
3 0 0 257 5 0 477 0
169 0 0 200364 117 0 16173 0
ネットワークプロトコルごとにシステム全体の統計情報を見るにはnetstat(1)コマンドに-sオプションを指定します。-sオプションを指定するとシステム全体の統計情報を出力させることができます。ただし、
出力に含まれている単語から必要な情報に絞り込むことができます。たとえば、
% netstat -s | grep -E 'retrans|drop|out-of-order|memory problems|overflow'
218979 data packets (246080911 bytes) retransmitted
2890 data packets unnecessarily retransmitted
1677870 out-of-order packets (2204606312 bytes)
274 discarded due to memory problems
0 listen queue overflows
8017023 connections closed (including 84062 drops)
10484 embryonic connections dropped
198064 retransmit timeouts
1285 connections dropped by rexmit timeout
0 connections dropped by persist timeout
0 Connections (fin_wait_2) dropped because of timeout
8232 connections dropped by keepalive
5880 retransmitted
0 dropped
0 bucket overflow
0 cache overflow
0 bucket overflow
0 SACK scoreboard overflow
1720977 dropped due to no socket
348 dropped due to full socket buffers
0 retransmitted DATA chunks
0 fast retransmitted DATA chunks
Packet drop statistics:
0 where process_chunk_drop said break
0 number of in data drops due to chunk limit reached
0 number of in data drops due to rwnd limit reached
0 fragments dropped (dup or out of space)
0 fragments dropped after timeout
0 output packets dropped due to no bufs, etc.
0 group-source queries dropped
4 total packets dropped due to no ARP entry
0 fragments dropped (dup or out of space)
0 fragments dropped after timeout
0 output packets dropped due to no bufs, etc.
0 messages dropped due to no socket
0 multicast messages dropped due to no socket
0 messages dropped due to full socket buffers
%
エラーに絞って統計情報を表示させるのであれば、
% netstat -s | grep -E 'bad|checksum'
59 discarded for bad checksums
1 discarded for bad header offset field
21515 bad connection attempts
0 badack
0 with bad data length field
0 with bad checksum
1 with no checksum
0 checksum error
0 bad v-tag
0 bad SID
0 bad header checksums
0 with bad options
0 datagrams with bad address in header
0 messages with bad code fields
8 messages with bad checksum
0 messages with bad length
0 messages received with bad checksum
0 discarded for bad checksums
0 discarded packets with a bad version
0 discarded for bad authentication
0 discarded for bad vhid
0 discarded because of a bad address list
/0 packets discarded for bad interface
0 packets discarded for bad ttl
0 packets discarded for bad version
0 packets discarded for bad HMAC
0 packets discarded for bad action
0 states discarded for bad values
0 with bad options
2 messages with bad code fields
0 bad checksums
0 messages with bad length
0 messages with bad ND options
0 bad neighbor solicitation messages
0 bad neighbor advertisement messages
0 bad router solicitation messages
0 bad router advertisement messages
0 bad redirect messages
0 checksum calculations on inbound
0 messages with bad checksum
%
ネットワークの負荷が低い段階では気にならないことが多いのですが、
これ以上細かく調べたいとか、
勉強会
第58回 11月29日(火)19:00~ FreeBSD勉強会
2016年11月29日
参加申請はこちらから。
第59回 12月21日(水)19:00~ FreeBSD勉強会会
ストレージシステムの基盤として使われることの多いZFS。いったん運用を開始あるとあとはボリュームの管理や、
参加申請はこちらから。
