
ifconfig
또는 둘 중 하나를 사용하여 서버의 네트워크 인터페이스 통계를 쿼리하면 ip -s
999GB로 제한되었다가 0GB로 롤오버되어 다시 시작됩니다. 테라바이트 범위의 통계 로깅을 허용하도록 구성을 변경하는 것이 가능합니까? 아니면 다른 로깅 도구를 사용하시나요? 우분투 20.04를 사용하고 있습니다.
$ uname -p
x86_64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
많은 감사를 드립니다.
요청된 정보를 추가하려면 편집하세요. enp4s0
내 방화벽의 LAN 측이고 최근에 총계가 0GB로 다시 재설정되었습니다. 적절한 시기에 업데이트를 제공하겠습니다.
ifconfig 출력:
$ ifconfig enp4s0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.54.141 netmask 255.255.255.0 broadcast 192.168.54.255
ether 00:26:2d:24:91:43 txqueuelen 1000 (Ethernet)
RX packets 47559414 bytes 8105358582 (8.1 GB)
RX errors 0 dropped 9 overruns 0 frame 0
TX packets 126168339 bytes 183503412184 (183.5 GB)
TX errors 1 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 18
IP 출력:
$ ip -s -h link show enp4s0
4: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:26:2d:24:91:43 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
8.11G 47.6M 0 9 0 3.38k
TX: bytes packets errors dropped carrier collsns
184G 126M 1 0 0 0
답변1
ifconfig
및 둘 다 ip
표시할 데이터의 양에 따라 적절한 단위로 통계를 표시합니다. 장치 롤오버 전후에 표시되는 출력을 제공할 수 있습니까?
Ubuntu 16.04.4 x86_64 서버의 출력은 다음과 같습니다.
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
$ uname -p
x86_64
ifconfig 출력
$ ifconfig enp94s0f1
enp94s0f1 Link encap:Ethernet HWaddr 28:ac:9e:e7:a9:cd
inet addr:196.196.195.10 Bcast:196.196.195.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11694856562 errors:0 dropped:38446 overruns:0 frame:0
TX packets:10658263823 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6448839112903 (6.4 TB) TX bytes:4392568782445 (4.3 TB)
IP 출력
$ ip -s -h link show enp94s0f1
3: enp94s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 28:ac:9e:e7:a9:cd brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
6.45T 11.7G 0 38.4k 0 0
TX: bytes packets errors dropped carrier collsns
4.39T 10.7G 0 0 0 0