ifconfig 명령어를 통해 network interface의 정보 확인
$ ifconfig
em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 110.45.211.60 netmask 255.255.255.128 broadcast 110.45.211.127
inet6 fe80::e643:4bff:fe18:b550 prefixlen 64 scopeid 0x20<link>
ether e4:43:4b:18:b5:50 txqueuelen 1000 (Ethernet)
RX packets 318352 bytes 159830547 (152.4 MiB)
RX errors 309 dropped 4864 overruns 0 frame 309
TX packets 240498 bytes 41808200 (39.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 246 bytes 27053 (26.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 246 bytes 27053 (26.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ifconfig 명령어 카운터 의미
1.errors
- 에러가 발생한 모든 패킷 카운트
- 너무 긴(짧은) 프레임 에러, 링-버퍼 오버플로우 에러, CRC 에러, 프레임 정렬 에러, FIFO 오버런, 패킷 분실 등
- 아래 3개 overruns, dropped, frame 등을 모두 포함한 에러 카운터
2. overruns
- FIFO 오버런, 버퍼가 꽉차서 버린 패킷 카운트
- 이더넷이 처리할 수 없을 정도로 빠르게 자료가 오고감으로써 손실된 패킷의 갯수
3. dropped
- 의도하지 않는 패킷 카운트
- linux buffers에 공간이 없어서 버려진 패킷. "no space in linux buffers" 표현
- VLAN tags가 맞지 않거나 IPv6 설정이 없는데 IPv6 패킷이 들어왔을 때 버린 패킷들
4. frame
- 프레임 정렬 에러, 프레임 길이가 틀린 패킷 카운트
- 수신 프레임이 바이트 단위가 아닌 여분의 비트를 포함하는 패킷
- frame은 정렬되지 않은 프레임만 계산하므로 길이가 8로 나눌 수 없는 프레임을 의미
- 길이 때문에 유효한 프레임이 아니며 단순히 폐기됨
ethtool -S 명령어를 사용하여 error를 자세하게 확인
$ ethtool -S em1 | grep -i error
rx_errors: 310
tx_errors: 0
rx_over_errors: 0
rx_crc_errors: 310
rx_frame_errors: 0
rx_fifo_errors: 0
rx_missed_errors: 0
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
rx_length_errors: 0
rx_long_length_errors: 0
rx_short_length_errors: 0
rx_csum_offload_errors: 1