In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how the Linux tool Nethogs monitors network bandwidth according to the process. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Overview
At present, there are many open source network monitoring tools in Linux system. For example, you can use the command iftop to check bandwidth usage. Netstat is used to view interface statistics reports, as well as top monitoring system currently running process. But if you're looking for a tool that can count network bandwidth utilization by process in real time, then NetHogs is worth a look.
NetHogs is a small net top tool that groups bandwidth by process instead of slowing down each protocol or subnet as most tools do. NetHogs does not rely on loading a particular kernel module. If there is a network congestion, you can start NetHogs and immediately see which PID caused the situation. This makes it easy to find out which program runs away and suddenly takes up your bandwidth.
In a nutshell, you can view the traffic of processes under linux through nethogs.
Installation and deployment
1. Compile and install the nethogs dependent package. There is no package for nethogs in the centos default rpm repository, so we need to compile manually. Nethogs compilation depends on 2 libraries, which need to be installed before compilation
# yum install libpcap libpcap-devel gcc* ncurses*
2. Download nethogs
Since bug (creating socket failed while establishing local IP-are you root?) exists in 0.8, version 0.81 is used here.
# wget-c https://github.com/raboof/nethogs/archive/v0.8.1.tar.gz
3. Compile and install
# tar-xvf v0.8.1.tar.gz # cd nethogs-0.8.1/ # make & & make install
# the default path after installation is / usr/local/sbin/nethogs
4. Test run:
# nethogs
Usage
1. Command line parameters
2. Example:
Instance 1: refresh every 5 seconds, specify refresh rate # nethogs-d 5 instance 2: monitor eth0 network bandwidth # nethogs eth0 instance 3: monitor both eth0 and eth2 interfaces # nethogs eth0 eth2
3. Interactive commands:
Here are some interactive commands (keyboard shortcuts) for NetHogs
M: modify unit
R: sort by traffic
S: sort by send traffic
Q: exit command prompt
On the Linux tool Nethogs how to monitor network bandwidth by process is shared here, I hope the above content can be of some help to you, can 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.