안녕하세요, 또 뵙겠습니다. 저는 당신들의 친구 전 스택군입니다.
명령 설명:
Ethtool 은 네트워크 카드 매개 변수를 쿼리하고 설정하는 명령입니다.
사용 개요:오피스타입구가 어떻게 되나요?
Ethtool ethx // 쿼리 ethx 네트워크 포트 기본 설정. 여기서 x 는 eth0, eth1 등과 같은 해당 네트워크 카드 번호입니다
Ethtool–h//ethtool 에 대한 명령 도움말 표시 (help)
Ethtool–I ethX//ethx 네트워크 관련 정보 조회
Ethtool–d ethX//ethx 네트워크 등록 정보 조회
Ethtool–r ethX//ethx 메쉬를 적응 모드로 재설정
Ethtool–s ethX//ethx 웹 트랜시버 통계 조회
Ethtool-s ethx [speed 10 | 100 | 1000] [duplex half | full] [autoneg on | off]//메쉬 속도 설정 10/100/
Ethtool-e eth0 magic 0x10798086 offset 0x10 value 0x1a NIC EEPROM 내용 수정 (0x1079 NIC device id, 0x8086 NIC verdor id)
Ethtool -e eth0: dump 네트워크 카드 EEPROM 콘텐츠
사용 예:
1)[root@linux /]# ethtool eth1
Eth1 용 설정:
Supported ports: [TP]
Supported link modes: 10baset/half 10baset/full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baset/half 10baset/full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: 전체
포트: twisted pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: D.
Link detected: 예
2)[root@linux /]# ethtool -i eth1
드라이버: e1000
버전: 5.0.43-k1
Firmware-version: 해당 사항 없음
버스 정보: 06: 08.1
3)[root@linux /]# ethtool -S eth1
Nic 상태:
Rx_packets: 58068300
Tx_packets: 87124083
Rx_bytes: 1589713008
Tx_bytes: 2165825901
Rx_errors: 0
Tx_errors: 0
Rx_dropped: 0
Tx_dropped: 0
Multicast: 0
Collisions: 0
Rx_length_errors: 0
Rx_over_errors: 0
Rx_crc_errors: 0
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
Tx_window_errors: 0
4) [root @ Linux/] # ethtool-s et h1 autoneg off speed 100 duplex full
관련 참조:
1)[root@linux /]# which ethtool // ethtool 이 저장된 경로 조회
/sbin/ethtool
2) [root @ Linux/] # rpm-qf/sbin/ethtool//ethtool 버전 정보 조회
Ethtool-1.6-5
3) 네트워크 디바이스에 ethtool 설정을 영구적으로 저장하는 방법
해결 방법 1:
Ethtool 설정은/etc/sysconfig/network-scripts/ifcfg-ethx 파일을 통해 저장할 수 있으므로 다음에 디바이스를 시작할 때 옵션이 활성화됩니다.
예: ethtool-s eth 0 speed 100 duplex full autoneg off
이 명령은 eth0 장치를 전이중 어댑티브 페이퍼 항공기의 중국어 버전 다운로드 웹 주소가 100Mbs 로 설정되어야 합니다. Eth0 시작 시 이러한 매개 변수를 설정하려면/etc/sysconfig/network-scripts/ifcfg-eth0 파일을 수정하여 다음 행을 추가합니다.
Ethtool _ opts = "speed 100 duplex full autoneg off"
해결 방법 2:
Ethtool 설정을 /etc/rc.d/rc.local 에 기록합니다.
명령 형식 집합
Ethtool devname display standard information about device 는 장치에 대한 표준 정보를 표시합니다.
Ethtool-s |–changedevname change generic options 기본 옵션 변경
[speed 10|100|1000] // 포트 속도 옵션 (Mbps 단위)
[duplex half|full] // 포트 반이중 및 전이중 옵션
[port TP|aui|bnc|mii|fibre] // 포트 옵션, 기본값은 TP 입니다
[autoneg on|off] // 자동 협상 옵션, 기본값은 on 입니다
[phyad %%d] // 물리적 주소 번호 (일반적으로 1 또는 0)
[xcvr internal|external]
[WOL p|u|m|b|a|g|s|d…]
[sopass%% x:%% x:%% x:%% x:%% x:%% x]
[msglvl %%d]
Ethtool-a |–show-pause devname show pause options 는 해당 장치 중단 옵션 설정을 표시합니다
Ethtool-a |–pause devname set pause options 해당 장치에 대한 중단 옵션 설정
[autoneg on|off]
[rx on|off]
[tx on|off]
Ethtool-c |–show-coalesce devname show coalesce options 해당 장치 통합 옵션 설정 표시
Ethtool 종이 항공기의 공식 웹 사이트 다운로드 방법은 무엇입니까?-c |–coalesce devname set coalesce options 해당 장치에 대한 공동 옵션 설정
[adaptive-rx on|off]
[adaptive-tx on|off]
[rx-usecs telegram 공식 홈페이지의 다운로드 사이트는 몇 개인가]
[rx-프레임 n]
[rx-usecs-irq N]
[rx-frames-irq N]
[tx-usecs N]
[tx-프레임 n]
[tx-usecs-irq N]
[tx-frames-irq N]
[stats-block-usecs N]
[pkt-rate-low N]
[rx-usecs-low N]
[rx-frames-low N]
[tx-usecs-low N]
[tx-frames-low N]
[pkt-rate-high N]
[rx-usecs-high N]
[rx-frames-high N]
[tx-usecs-high N]
[tx-frames-high N]
[샘플-내부 n]
Ethtool-g |–show-ring devname query rx/tx ring parameters 쿼리 수신/송신 루프 매개 변수
Ethtool-g |–set-ring devname set rx/tx ring parameters 수신/송신 루프 매개변수 설정
[rx N]
[rx-미니 n]
[rx-점보 n]
[tx N]
Ethtool-k |–show-offload devname get protocol offload telegram 공식 홈페이지 주소는 몇 개입니까 information 이 프로토콜 오프로드 정보를 입수합니까
Ethtool-k |–offload devname set protocol offload 설정 프로토콜 제거
[rx on|off]
[tx on|off]
[SG on|off]
[tso on|off]
[UFO on|off]
[GSO on|off]
Ethtool-I |–driver devname show driver information 은 해당 장치에 대한 드라이버 정보를 표시합니다
Ethtool-d |–register-dump devname do a register dump 레지스터 내보내기
Ethtool-e |–EEPROM-dump devname do a EEPROM dump EEPROM 내보내기
[raw on|off]
[offset N]
[길이 n]
Ethtool-e |–change-EEPROM devname change bytes in device EEPROM 장치 EEPROM 의 바이트 변경
[매직 n]
[offset N]
[값 n]
Ethtool-r |–negotiate devname restart n-way negotation 재시작 n-way 상호 작용
Ethtool-p |–identify devname show visible port identification (e. g. blinking) 은 포트 id 를 표시합니다 (예: 해당 포트 표시등이 켜짐)
[시간-in-seconds]
Ethtool-t |–test devname execute adapter self test 어댑터 자체 테스트를 수행합니다
[online | offline]
Ethtool-s |–statistics devname show adapter statistics 어댑터 통계 표시
Ethtool-h |–help devname show this help 도움말 표시
일반적인 사용법: 네트워크 포트 위치 조회 ethtool -p
이 명령은 멀티포트 서버 호스트를 관리하는 데 많이 사용됩니다. 백플레인의 네트워크 포트 수가 많기 때문에 그 물리적 포트가 eth0 또는 기타 디바이스 번호에 해당하는지 모를 때도 있습니다. 이 명령을 사용하여 조회할 수 있습니다.
사용법: ethtool -p eth0
효과: 장치 번호 eth0 에 해당하는 물리적 포트의 2 개의 led 가 깜박입니다
일반적인 사용법: 포트 속도 수정 ethtool -s 명령은 네트워크 속도를 수동으로 설정하는 데 많이 사용됩니다. 일반 기가비트 카드는 Mbps 단위의 10|100|1000 의 세 가지 속도를 지원합니다.
사용법: ethtool-s eth 0 speed 1000 duplex full autoneg off
효과: 장치 번호 eth0 에 해당하는 물리적 포트를 속도 1000Mbps, 전이중 작동 모드로 설정하고 자동 협상을 끕니다.
참고: 영구 변경이 필요한 경우 두 가지 방법이 있습니다 .1. /etc/rc.local 파일에 위 명령을 기록하면 부팅이 자동으로 실행됩니다. 2./etc/sysconfig/network-scripts/ifcfg-eth0 에 ethtool _ opts = "speed 1000 duplex full autonex 행을 추가합니다 여기서는 eth0 을 예로 들자면, 다른 장치 번호는 같다.
저작권 고지: 이 글의 내용은 인터넷 사용자가 자발적으로 공헌한 것으로, 이 글의 관점은 대표작자 본인일 뿐이다. 본 사이트는 정보 스토리지 공간 서비스만 제공하며 소유권도 없고 관련 법적 책임도 지지 않습니다. 본 사이트에 침해/위법 위반 혐의가 있는 내용이 발견되면 신고에 이메일을 보내 주십시오. 확인되면 본 사이트는 즉시 삭제됩니다.
게시자: 전체 스택 프로그래머 스택 길이, 출처: https://javaforall.cn/203661.html 원본 링크: https://Java forall.cn