달력

112024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

1. NIC카드의 Ring값(NIC카드의 Buffer를 의미)을 변경하는 방법

 

1-1. ring값의 확인

 # ethtool -g eth0

 Ring parameters for eth0:

 Pre-set maximums:

 RX:             511

 RX Mini:        0

 RX Jumbo:       0

 TX:             511

 Current hardware settings:

 RX:             200

 RX Mini:        0

 RX Jumbo:       0

 TX:             511

 

1-2. ring값의 변경

 # ethtool -G eth0 rx 511

 

1-3. 변경 값의 확인

 # ethtool -g eth0

 Ring parameters for eth0:

 Pre-set maximums:

 RX:             511

 RX Mini:        0

 RX Jumbo:       0

 TX:             511

 Current hardware settings:

 RX:             511

 RX Mini:        0

 RX Jumbo:       0

 TX:             511

1-4. 변경하는 이유

 ring값을 변경하는 이유는 대량의 데이터로 인하여 packet이 dropped되거나 discrd되는 경우임.

 - 확인방법

   # ethtool -S eth0 | grep -i discard

   # ifconfig eth0 | grep -i dropped

   위 두 개의 값이 동시에 올라가는 경우

 

1-5. 계속적인 값을 유지하는 방법

 # vi /etc/rc.local

   ethtool -G eth0 rx|tx [값]

 (ex)

   ethtool -G eth0 rx 511

 

 

2. NIC카드의 Flow Control 활성/비활성 방법

 

2-1.NIC카드의 Flow Control를 활성화 시키는 방법:

# ethtool -a eth0

Pause parameters for eth0:  

Autonegotiate:  on  

RX:             off  

TX:             off

# ethtool -A eth0 rx on tx on

# ethtool -a eth0

Pause parameters for eth0:  

Autonegotiate:  on  

RX:             on

TX:             on

 

2-2.NIC카드의 Flow Control를 비활성화 시키는 방법:

# ethtool -a eth0

Pause parameters for eth0:  

Autonegotiate:  on  

RX:             on  

TX:             on

# ethtool -A eth0 rx off tx off

# ethtool -a eth0

Pause parameters for eth0:  

Autonegotiate:  on  

RX:             off

TX:             off

 

 

3. NIC카드의 환경 변경방법

 

3-1. Speed, Duplex, and Auto-Negotiation

   # ethtool eth1    ß eth1 카드의 정보를 보여줌

   # ethtool -s eth1 speed 100 duplex full autoneg off

     ß Speed : 100, Duplex : Full, Auto-negotiation : off 로 Setting 경우

   # ethtool eth1    ß 변경한 값의 확인

 

   /etc/sysconfig/network-scripts/ifcfg-eth1 파일에 아래의 내용을 추가하고

   ETHTOOL_OPTS="speed 100 duplex full autoneg off"

 

 

# ethtool eth1

Settings for eth1:

        Supported ports: [ MII ]

        Supported link modes:   10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Half 1000baseT/Full

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Half 1000baseT/Full

        Advertised auto-negotiation: Yes

        Speed: 100Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 1

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: g

        Wake-on: d

        Current message level: 0x000000ff (255)

        Link detected: yes

 

 

4. NIC Device의 Statistic를 볼 수 있는 방법

# ethtool -S eth0

NIC statistics:

rx_octets: 539343296583

rx_fragments: 0

rx_ucast_packets: 2011075719

rx_mcast_packets: 3780

rx_bcast_packets: 2550

rx_fcs_errors: 0

rx_align_errors: 0

rx_xon_pause_rcvd: 0

rx_xoff_pause_rcvd: 0

rx_mac_ctrl_rcvd: 0

rx_xoff_entered: 0

rx_frame_too_long_errors: 0

rx_jabbers: 0

rx_undersize_packets: 0

rx_in_length_errors: 0

rx_out_length_errors: 0

rx_64_or_less_octet_packets: 749695535

rx_65_to_127_octet_packets: 657788895

rx_128_to_255_octet_packets: 171091324

rx_256_to_511_octet_packets: 102868153

rx_512_to_1023_octet_packets: 135942724

rx_1024_to_1522_octet_packets: 193695435

rx_1523_to_2047_octet_packets: 0

rx_2048_to_4095_octet_packets: 0

rx_4096_to_8191_octet_packets: 0

rx_8192_to_9022_octet_packets: 0

tx_octets: 398

tx_collisions: 0

tx_xon_sent: 0

tx_xoff_sent: 0

tx_flow_control: 0

tx_mac_errors: 0

tx_single_collisions: 0

tx_mult_collisions: 0

tx_deferred: 0

tx_excessive_collisions: 0

tx_late_collisions: 0

tx_collide_2times: 0

tx_collide_3times: 0

tx_collide_4times: 0

tx_collide_5times: 0

tx_collide_6times: 0

tx_collide_7times: 0

tx_collide_8times: 0

tx_collide_9times: 0

tx_collide_10times: 0

tx_collide_11times: 0

tx_collide_12times: 0

tx_collide_13times: 0

tx_collide_14times: 0

tx_collide_15times: 0

tx_ucast_packets: 0

tx_mcast_packets: 5

tx_bcast_packets: 0

tx_carrier_sense_errors: 0

tx_discards: 0              ß Send packet이 버려진 수

tx_errors: 0

dma_writeq_full: 6624999   ß  Write Buffer가 Full된 횟수

dma_write_prioq_full: 0

rxbds_empty: 0

rx_discards: 11971335      ß Receive Packet이 버려진 수

rx_errors: 0

rx_threshold_hit: 55818352

dma_readq_full: 0              ß  Write Buffer가 Full된 횟수

dma_read_prioq_full: 0

tx_comp_queue_full: 0

ring_set_send_prod_index: 5

ring_status_update: 1276015444

nic_irqs: 1273421222

nic_avoided_irqs: 2594222

nic_tx_threshold_hit: 0

 

 

5. Driver의 정보를 보는 방법

# ethtool –i eth0

driver: e1000                ß Driver Module

version: 7.6.15-NAPI        ß Driver Version

firmware-version: 2.1-12    ß Firmware Version

bus-info: 06:00.0            ß Bus Information

 

Posted by 짜꾸미의골골몽
|