In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "example analysis of Linux performance monitoring Network", the content is simple and easy to understand, clear organization, I hope to help you solve doubts, let Xiaobian lead you to study and learn "Linux performance monitoring Network example analysis" this article bar.
Most Ethernet networks are adaptive speed because there may be different network devices operating at different speeds and modes (full duplex or half duplex). Most enterprise networks operate between 100 and 1000BaseTX. The ethtool command sets the operating rate and mode of the network card.
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
Linux performance monitoring We can see that the NIC is operating at 10Mb/s, half-duplex mode, and the adaptive switch is turned on. We force the NIC to operate in 100Mb/s full-duplex mode and turn off the adaptive feature by using the following command.
# ethtool -s eth0 speed 100 duplex full autoneg off
Running ethtool again displays the following:
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
The iptraf tool allows you to clearly see how each network card works.
# iptraf -d eth0
IPtraf can also monitor traffic on fixed TCP ports, such as for Web servers we want to monitor traffic on port 80, and for mail servers we focus on traffic on port 25.
The most common mistake in the network is collision, which has been eliminated because of the switch environment in the network. However, when the network traffic continues to increase, there will be packet loss, network card overload and so on. When the network traffic is heavy, we use the sar command to indicate possible errors in the network:
# sar -n FULL 5 100
Linux 2.6.9-55.ELsmp (sapulpa) 06/23/2007
11:44:32 AM IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s
11:44:37 AM lo 6.00 6.00 424.40 424.40 0.00 0.00 0.00
11:44:37 AM eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
11:44:37 AM sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
11:44:32 AM IFACE rxerr/s txerr/s coll/s rxdrop/s txdrop/s txcarr/s rxfram/s rxfifo/s txfifo/s
11:44:37 AM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
11:44:37 AM eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
11:44:37 AM sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
11:44:32 AM totsck tcpsck udpsck rawsck ip-frag
11:44:37 AM 297 79 8 0 0
rxerr/s is the receive error rate;txerr/s is the transmit error rate;coll/s collision rate;rxdrop/s receive frame loss rate;txdrop/s transmit frame loss rate; txcarr/s carrier error rate;rxfram/s frame alignment errors;rxfifo/s receive FIFO errors;txfifo/s transmit FIFO errors. From the above output, it can be seen that all errors are zero, which proves that the network works well.
Linux performance monitoring In general, monitoring network performance, we have to follow a few points:
1. Check all network interfaces to make sure they are running at the correct rate;
2. Check the throughput of each NIC to make sure it is not overloaded;
3. Check the type of traffic to ensure that the correct data flow is being transmitted.
That's all for the "Linux Performance Monitoring Network Sample Analysis" article. Thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.