In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to achieve traffic monitoring in Linux. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Linux Traffic Monitoring iftop tool
Usefulness: it is used to immediately monitor the network condition and the frequency band of each ip application.
Perform (must be in the capacity of root)
Monitor the flow quality of the network card of eth2
# iftop-I eth2
Display traffic in bytes (bytes) as two bits (default non-bit bits):
$iftop-B
Indirect display IP, no entry DNS orthodox:
$iftop-n
Indirectly display the port number, without implying the title of service:
$iftop-N
Imply the flow of packets in and out of a certain network segment
$iftop-F 192.168.1.0 take 24 or 192.168.1.0 take 255.255.255.0
Whether the other parameters are illustrated in iftop-h.
When entering the iftop drawing, whether to press p toggle non-display connection port, n toggle implied IP or slave domain name,ghd MK4 IV Pure, N toggle display link port code or title, p long stop display, b switch whether to display a few bars, B switch to calculate the uniform flow in a few seconds, other keys can press h to wait and see to clarify.
Linux traffic monitoring nload
Usefulness: it is used to immediately monitor the network condition and the bandwidth of each ip application (very empty talk)
Nload acquiesce to eth0 network card, if you want to monitor the traffic of eth2 network card
# nload eth2
Nload acquiesces to be divided into two parts: the lower part is: Incoming is also the traffic that does not enter the network card, and the upper part is: Outgoing, that is, the traffic coming in from that network card, and each part has no future traffic (Curr), narrow average traffic (Avg), * traffic (Min), minimum traffic (Max), branch war traffic (Ttl), which still seems to be quite curved.
In addition, you can also define the two bits displayed by the traffic value.
# nload-help
You can see the detailed coherent parameters.
Check the uniform traffic of the network
Whether the above is a good way to monitor the uniform traffic of your network, you can reduce the booking time.
#! / bin/bash echo-n "which nic?" Read eth echo "the nic is" $eth echo-n "how much seconds:" read sec echo "duration is" $sec "seconds, wait please..." Infirst=$ (awk'/'$eth'/ {print $1}'/ proc/net/dev | sed's pedigree racer) outfirst=$ (awk'/'$eth'/ {print $10}'/ proc/net/dev) sumfirst=$ ($infirst+$outfirst)) sleep $sec "s" inend=$ (awk'/'$eth'/ {print $1}'/ proc/net/dev | sed's racing purse for ethical purposes) outend=$ (awk'/'$eth'/ {print $10}'/) Proc/net/dev) sumend=$ (($inend+$outend)) sum=$ (($sumend-$sumfirst)) echo $sec "seconds total:" $sum "bytes" aver=$ (($sum/$sec)) echo "avrage:" $aver "bytes/sec" about how to implement traffic monitoring in Linux. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.