entstat 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-entstat
핵심 정리
- 이더넷 어댑터(
ent0등) 장치 드라이버의 통계를 보여 줍니다. 인터페이스(en0)가 아니라 어댑터(ent0) 이름을 줍니다. entstat ent0은 일반 통계,entstat -d ent0은 어댑터별 통계(링크 속도, 이중 모드, 링크 상태 등)까지 보여 줍니다.- 네트워크가 느리거나 끊길 때 Transmit·Receive Errors, CRC Errors, No Resource Errors, S/W Transmit Queue Overflow, No mbuf Errors가 늘어나는지 봅니다.
entstat -r ent0으로 통계를 0으로 되돌린 뒤 문제를 재현하면 비교하기 좋습니다(특권 사용자만).netstat -v는 올라온 모든 어댑터에 대해entstat을 플래그 없이 실행합니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 Adapter Data Rate 필드, 영어 외 로케일의 Bad Packets 값 문제 안내, RBAC 안내가 더해짐) |
| 원문 | IBM Commands Reference — 5.3 Volume 2, 6.1 Volume 2 |
| 파일 | /usr/sbin/entstat |
| 관련 명령어 | netstat -v, lsdev -Cc adapter, lsattr -El ent0, chdev, fddistat, tokstat, atmstat |
목적
이더넷 장치 드라이버와 장치의 통계를 보여 줍니다.
영어 원문
Shows ethernet device driver and device statistics.
구문
entstat [ -d -r -t ] Device_Name
설명
entstat 명령은 지정한 이더넷 장치 드라이버가 모은 통계를 보여 줍니다. 장치 일반 통계에 더해 장치별 통계도 볼 수 있으며, 플래그가 없으면 장치 일반 통계만 보여 줍니다.
netstat -v를 실행해도 이 명령이 불립니다. 이때 netstat은 entstat 플래그를 주지 않습니다.
올바르지 않은 Device_Name을 주면 장치에 연결할 수 없다는 오류 메시지를 냅니다.
(6.1) 영어가 아닌 언어의 메시지 카탈로그에서는 받은 잘못된 패킷(Bad Packets) 수가 늘 틀리게 보입니다. 올바른 값을 보려면 로케일을 LANG=C로 정합니다.
영어 원문
The entstat command displays the statistics that are gathered by the specified Ethernet device driver. The user can optionally specify that the device-specific statistics be displayed in addition to the device generic statistics. If no flags are specified, only the device generic statistics are displayed.
This command is also invoked when the netstat command is run with the -v flag. The netstat command does not issue any entstat command flags.
If an invalid Device_Name is specified, the entstat command produces an error message stating that it could not connect to the device.
The entstat command always displays an incorrect value for the number of received bad packets in message catalogs for languages other than English. To fix this problem, you must set the locale to Lang=C to display the correct value for the number of received bad packets.
플래그
| 플래그 | 설명 |
|---|---|
-d |
장치별 통계를 포함해 모든 통계를 보여 줍니다. |
-r |
모든 통계를 처음 값으로 되돌립니다. 특권 사용자만 쓸 수 있습니다. |
-t |
일부 장치 드라이버에서 디버그 추적을 켜고 끕니다. |
영어 원문
-d— Displays all the statistics, including the device-specific statistics.-r— Resets all the statistics back to their initial values. This flag can only be issued by privileged users.-t— Toggles debug trace in some device drivers.
매개변수
| 매개변수 | 설명 |
|---|---|
| Device_Name | 이더넷 장치 이름(예: ent0). |
영어 원문
| | |
Device_Name— The name of the Ethernet device, for example, ent0.
Statistic Fields
참고: 어떤 어댑터는 특정 통계를 지원하지 않을 수 있으며, 지원하지 않는 필드의 값은 늘 0입니다.
제목 필드
| 필드 | 뜻 |
|---|---|
| Device Type | 어댑터 유형 설명 |
| Hardware Address | 장치가 지금 쓰는 이더넷 주소(MAC) |
| Elapsed Time | 통계를 마지막으로 되돌린 뒤 흐른 실제 시간. 하드웨어 오류를 복구하면서 드라이버가 통계 일부를 되돌리면, 출력 중간에 Elapsed Time이 하나 더 나와 시간 차이를 나타냅니다. |
송신 통계 필드
| 필드 | 뜻 |
|---|---|
| Packets, Bytes | 장치가 성공적으로 보낸 패킷 수와 바이트 수 |
| Interrupts | 드라이버가 어댑터에서 받은 송신 인터럽트 수 |
| Transmit Errors | 하드웨어·네트워크 오류로 실패한 송신 수 |
| Packets Dropped | 드라이버가 송신용으로 받았지만 (어떤 이유로든) 장치에 넘기지 못한 패킷 수 |
| Max Packets on S/W Transmit Queue | 소프트웨어 송신 큐에 쌓였던 가장 많은 패킷 수 |
| S/W Transmit Queue Overflow | 소프트웨어 송신 큐를 넘친 패킷 수 |
| Current S/W+H/W Transmit Queue Length | 소프트웨어·하드웨어 송신 큐에서 기다리는 패킷 수 |
| Broadcast Packets, Multicast Packets | 오류 없이 보낸 브로드캐스트·멀티캐스트 패킷 수 |
| No Carrier Sense | 캐리어를 감지하지 못해 실패한 송신 수 |
| DMA Underrun | DMA 언더런으로 실패한 송신 수 |
| Lost CTS Errors | CTS(Clear-to-Send) 신호를 잃어 실패한 송신 수 |
| Max Collision Errors | 충돌이 너무 많아(어댑터의 재시도 수를 넘어) 실패한 송신 수 |
| Late Collision Errors | 늦은 충돌로 실패한 송신 수 |
| Deferred | 네트워크가 바빠 송신을 미룬 패킷 수. 어댑터는 첫 시도만 미루고, 그다음에는 확인하지 않고 보내며, 그때도 바쁘면 충돌로 기록됩니다. |
| SQE Test | 송신 중 성공한 SQE(Signal Quality Error, 하트비트) 시험 수 |
| Timeout Errors | 어댑터가 보고한 타임아웃 오류로 실패한 송신 수 |
| Single Collision Count | 충돌이 한 번 있었던 송신 패킷 수 |
| Multiple Collision Count | 충돌이 여러 번(2~15) 있었던 송신 패킷 수 |
| Current HW Transmit Queue Length | 지금 하드웨어 송신 큐에 있는 패킷 수 |
수신 통계 필드
| 필드 | 뜻 |
|---|---|
| Packets, Bytes | 장치가 성공적으로 받은 패킷 수와 바이트 수 |
| Interrupts | 드라이버가 어댑터에서 받은 수신 인터럽트 수 |
| Receive Errors | 하드웨어·네트워크 오류로 실패한 수신 수 |
| Packets Dropped | 드라이버가 장치에서 받았지만 (어떤 이유로든) 네트워크 디먹서에 넘기지 못한 패킷 수 |
| Bad Packets | 드라이버가 받은(저장한) 잘못된 패킷 수 |
| Broadcast Packets, Multicast Packets | 오류 없이 받은 브로드캐스트·멀티캐스트 패킷 수 |
| CRC Errors | 체크섬(FCS) 오류가 있는 수신 패킷 수 |
| DMA Overrun | DMA 오버런 오류가 있는 수신 패킷 수 |
| Alignment Errors | 정렬 오류가 있는 수신 패킷 수 |
| No Resource Errors | 자원 부족으로 하드웨어가 버린 수신 패킷 수. 보통 어댑터의 수신 버퍼가 바닥났을 때 생기며, 수신 버퍼 크기를 구성 속성으로 바꿀 수 있는 어댑터도 있습니다(장치 구성 속성이나 SMIT 도움말 참고). |
| Receive Collision Errors | 수신 중 충돌 오류가 있는 패킷 수 |
| Packet Too Short Errors | 이더넷 최소 크기보다 작은 수신 패킷 수 |
| Packet Too Long Errors | 이더넷 최대 크기보다 큰 수신 패킷 수 |
| Packets Discarded by Adapter | 그 밖의 이유로 하드웨어가 버린 수신 패킷 수 |
| Receiver Start Count | 어댑터의 수신부를 시작한 횟수 |
일반 통계 필드
| 필드 | 뜻 |
|---|---|
| No mbuf Errors | 드라이버가 mbuf를 얻지 못한 횟수. 보통 받은 패킷을 처리할 mbuf가 없을 때 생기며, 그 크기의 mbuf 풀이 비면 패킷을 버립니다. netstat -m으로 확인합니다. |
| Adapter Reset Count | 어댑터를 다시 시작(재초기화)한 횟수 |
| Adapter Data Rate | 어댑터의 최대 데이터 속도(Mbps). 6.1 문서에만 있음 |
| Driver Flags | 지금 켜진 장치 드라이버 내부 상태 플래그 |
장치별 통계 필드
어댑터 유형마다 다를 수 있습니다. 어댑터 고유 정보와 일반 통계에 없는 확장 통계가 들어가며, 장치별 통계가 없는 어댑터도 있습니다.
영어 원문
Note: Some adapters may not support a specific statistic. The value of non-supported statistic fields is always 0.
The statistic fields displayed in the output of the entstat command and their descriptions are:
Title Fields
Device Type— Displays the description of the adapter type.Hardware Address— Displays the Ethernet network address currently used by the device.Elapsed Time— Displays the real time period which has elapsed since last time the statistics were reset. Part of the statistics may be reset by the device driver during error recovery when a hardware error is detected. There will be another Elapsed Time displayed in the middle of the output when this situation has occurred in order to reflect the time differences between the statistics.- Transmit Statistics Fields
Packets— The number of packets transmitted successfully by the device.Bytes— The number of bytes transmitted successfully by the device.Interrupts— The number of transmit interrupts received by the driver from the adapter.Transmit Errors— The number of output errors encountered on this device. This is a counter for unsuccessful transmissions due to hardware/network errors.Packets Dropped— The number of packets accepted by the device driver for transmission which were not (for any reason) given to the device.Max Packets on S/W Transmit Queue— The maximum number of outgoing packets ever queued to the software transmit queue.S/W Transmit Queue Overflow— The number of outgoing packets which have overflowed the software transmit queue.Current S/W+H/W Transmit Queue Length— The number of pending outgoing packets on either the software transmit queue or the hardware transmit queue.Broadcast Packets— The number of broadcast packets transmitted without any error.Multicast Packets— The number of multicast packets transmitted without any error.No Carrier Sense— The number of unsuccessful transmissions due to the no carrier sense error.DMA Underrun— The number of unsuccessful transmissions due to the DMA underrun error.Lost CTS Errors— The number of unsuccessful transmissions due to the loss of the Clear-to-Send signal error.Max Collision Errors— The number of unsuccessful transmissions due to too many collisions. The number of collisions encountered exceeded the number of retries on the adapter.Late Collision Errors— The number of unsuccessful transmissions due to the late collision error.Deferred— The number of outgoing packets deferred during transmission. Deferred means that the adapter had to defer while trying to transmit a frame. This condition occurs if the network is busy when the adapter is ready to transmit. The adapter will only defer the first attempt to send a packet. After that the adapter will transmit the packet without checking. If the network is still busy then a collision will be recorded.SQE Test— Contains the number of "Signal Quality Error" Tests (i.e. Heartbeat) performed successfully during transmission.Timeout Errors— The number of unsuccessful transmissions due to adapter reported timeout errors.Single Collision Count— The number of outgoing packets with single (only one) collision encountered during transmission.Multiple Collision Count— The number of outgoing packets with multiple (2 - 15) collisions encountered during transmission.Current HW Transmit Queue Length— The number of outgoing packets which currently exist on the hardware transmit queue.CRC Errors— The number of incoming packets with the Checksum (FCS) error.DMA Overrun— The number of incoming packets with the DMA overrun error.Alignment Errors— The number of incoming packets with the alignment error.No Resource Errors— The number of incoming packets dropped by the hardware due to the no resource error. This error usually occurs because the receive buffers on the adapter were exhausted. Some adapters may have the size of the receive buffers as a configurable parameter. Check the device configuration attributes (or smit helps) for possible tuning information.Receive Collision Errors— The number of incoming packets with the collision errors during the reception.Packet Too Short Errors— The number of incoming packets with the length error indicating that the packet size is less than the Ethernet minimum packet size.Packet Too Long Errors— The number of incoming packets with the length error indicating that the packet size is bigger than the Ethernet maximum packet size.Packets Discarded by Adapter— The number of incoming packets dropped by the hardware for any other reasons.Receiver Start Count— The number of times that the receiver (receive unit) on the adapter has been started.- Receive Statistics Fields
Packets— The number of packets received successfully by the device.Bytes— The number of bytes received successfully by the device.Interrupts— The number of receive interrupts received by the driver from the adapter.Receive Errors— The number of input errors encountered on this device. This is a counter for unsuccessful reception due to hardware/network errors.Packets Dropped— The number of packets received by the device driver from this device which were not (for any reason) given to a network demuxer.Bad Packets— The number of bad packets received (i.e. saved) by the device driver.Broadcast Packets— The number of broadcast packets received without any error.Multicast Packets— The number of multicast packets received without any error.CRC Errors— The number of incoming packets with the Checksum (FCS) error.DMA Overrun— The number of incoming packets with the DMA overrun error.Alignment Errors— The number of incoming packets with the alignment error.No Resource Errors— The number of incoming packets dropped by the hardware due to the no resource error.Receive Collision Errors— The number of incoming packets with the collision errors during the reception.Packet Too Short Errors— The number of incoming packets with the length error indicating that the packet size is less than the Ethernet minimum packet size.Packet Too Long Errors— The number of incoming packets with the length error indicating that the packet size is bigger than the Ethernet maximum packet size.Packets Discarded by Adapter— The number of incoming packets dropped by the hardware for any other reasons.Receiver Start Count— The number of times that the receiver (receive unit) on the adapter has been started.- General Statistics Fields
No mbuf Errors— The number of times that mbufs were not available to the device driver. This usually occurs during receive operations when the driver must obtain mbuf buffers to process inbound packets. If the mbuf pool for the requested size is empty, the packet will be discarded. The netstat -m command can be used to confirm this.Adapter Reset Count— The number of times that the adapter has been restarted (re-initialized).Adapter Data Rate— The maximum data rate of the adapter in Mbps (megabits per second).Driver Flags— The device driver internal status flags that are currently turned on.- Device Specific Statistics Fields
This part of the display may be different for each type of the adapter. It may contain adapter specific information and some extended statistics that were not included in the generic statistics. Some adapters may not have any device specific statistics.
보안
RBAC 사용자와 Trusted AIX 사용자는 주의하세요. 이 명령은 특권 작업을 할 수 있으며, 특권 작업은 특권 사용자만 할 수 있습니다. 특권과 권한 목록은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다(6.1 문서에만 있음).
영어 원문
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
예제
ent0의 장치 일반 통계를 봅니다.
entstat ent0
출력은 다음과 비슷합니다(송신·수신 통계가 두 열로 나란히 나옴).
ETHERNET STATISTICS (ent0) :
Device Type: Ethernet High Performance LAN Adapter
Hardware Address: 02:60:8c:2e:d0:1d
Elapsed Time: 0 days 0 hours 8 minutes 41 seconds
Transmit Statistics: Receive Statistics:
-------------------- -------------------
Packets: 3 Packets: 2
Bytes: 272 Bytes: 146
Interrupts: 3 Interrupts: 2
Transmit Errors: 0 Receive Errors: 0
Packets Dropped: 0 Packets Dropped: 0
...
General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running Simplex
ent0의 일반 통계와 장치별 통계를 함께 봅니다. 일반 통계 뒤에 다음과 같은 어댑터별 통계가 붙습니다.
entstat -d ent0
Ethernet High Performance LAN Adapter Specific Statistics:
----------------------------------------------------------
Receive Buffer Pool Size: 37
Transmit Buffer Pool Size: 39
In Promiscuous Mode for IP Multicast: No
Packets Uploaded from Adapter: 0
Host End-of-List Encountered: 0
82586 End-of-List Encountered: 0
Receive DMA Timeouts: 0
Adapter Internal Data: 0x0 0x0 0x0 0x0 0x0
자주 쓰는 형태:
entstat -d ent0 | grep -iE "media speed|link status|duplex" # 링크 속도·상태
entstat -d ent0 | grep -iE "errors|overflow|dropped" # 오류 계열
entstat -r ent0 # 통계 되돌리기
LANG=C entstat -d ent0 # 영어로(Bad Packets 값 문제 회피)
영어 원문
- To display the device generic statistics for ent0, enter:
entstat ent0
This produces the following output: ETHERNET STATISTICS (ent0) : Device Type: Ethernet High Performance LAN Adapter Hardware Address: 02:60:8c:2e:d0:1d Elapsed Time: 0 days 0 hours 8 minutes 41 seconds
Transmit Statistics: Receive Statistics: -------------------- ------------------- Packets: 3 Packets: 2 Bytes: 272 Bytes: 146 Interrupts: 3 Interrupts: 2 Transmit Errors: 0 Receive Errors: 0 Packets Dropped: 0 Packets Dropped: 0 Max Packets on S/W Bad Packets: 0 Transmit Queue:0 S/W Transmit Queue Overflow: 0 Current S/W+H/W Transmit Queue Length: 0
Broadcast Packets: 2 CRC Errors: 0 Multicast Packets: 0 Broadcast Packets: 1 No Carrier Sense: 0 Multicast Packets: 0 DMA Underrun: 0 DMA Overrun: 0 Lost CTS Errors: 0 Alignment Errors: 0 Max Collision Errors: 0 No Resource Errors: 0 Late Collision Errors: 0 Receive Collision Errors: 0 Deferred: 0 Packet Too Short Errors: 0 SQE Test: 0 Packet Too Long Errors: 0 Timeout Errors: 0 Packets Discarded by Adapter: 0 Single Collision Receiver Start Count: 1 Count: 0 Multiple Collision Count: 0 Current HW Transmit Queue Length: 0
General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running Simplex
- To display the Ethernet device generic statistics and the ethernet device-specific statistics for ent0, enter:
entstat -d ent0
This produces the following output:
ETHERNET STATISTICS (ent0) :
Device Type: Ethernet High Performance LAN Adapter
Hardware Address: 02:60:8c:2e:d0:1d
Elapsed Time: 0 days 2 hours 6 minutes 30 seconds
Transmit Statistics: Receive Statistics:
-------------------- -------------------
Packets: 3 Packets: 2
Bytes: 272 Bytes: 146
Interrupts: 3 Interrupts: 2
Transmit Errors: 0 Receive Errors: 0
Packets Dropped: 0 Packets Dropped: 0
Max Packets on S/W Receiver Start Count: 1
Transmit Queue:0
Bad Packets: 0
S/W Transmit Queue Overflow: 0
Current S/W+H/W Transmit Queue Length: 0
Broadcast Packets: 0 Broadcast Packets: 0
Multicast Packets: 0 Multicast Packets: 0
No Carrier Sense: 0 CRC Errors: 0
DMA Underrun: 0 DMA Overrun: 0
Lost CTS Errors: 0 Alignment Errors: 0
Max Collision Errors: 0 No Resource Errors: 0
Late Collision Errors: 0 Receive Collision Errors: 0
Deferred: 0 Packet Too Short Errors: 0
SQE Test: 0 Packet Too Long Errors: 0
Timeout Errors: 0 Packets Discarded by Adapter: 0
Single Collision Count: 0 Receiver Start Count: 1
Multiple Collision Count: 0
Current HW Transmit Queue Length: 0
General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running Simplex
Ethernet High Performance LAN Adapter Specific Statistics:
----------------------------------------------------------
Receive Buffer Pool Size: 37
Transmit Buffer Pool Size: 39
In Promiscuous Mode for IP Multicast: No
Packets Uploaded from Adapter: 0
Host End-of-List Encountered: 0
82586 End-of-List Encountered: 0
Receive DMA Timeouts: 0
Adapter Internal Data: 0x0 0x0 0x0 0x0 0x0
Related reference:
- fddistat Command
Related information:
atmstat command netstat command tokstat command
리눅스(GNU)와 다른 점
리눅스에서는 ethtool -S eth0(드라이버별 통계), ethtool eth0(속도·이중 모드·링크), ip -s link show eth0(일반 송수신·오류 수)로 같은 정보를 봅니다. 통계를 0으로 되돌리는 표준 방법은 없고, 드라이버를 다시 올리거나 차이를 계산합니다.