Learn about command to check network traffic in linux, we have the largest and most updated command to check network traffic in linux information on alibabacloud.com
#!/bin/bash #显示菜单 (radio) Display_menu () {localsoft=$1localprompt= "which${soft} You ' dselect: ' evallocalarr= (\${${soft}_arr[@]}) whiletruedo echo-e "####################${soft}setting####################\n\n" for ((i=1;iThis article is from the "Smurf Linux ops" blog, so be sure to keep this source http://jin771998569.blog.51cto.com/2147853/1587726Check the network port traffic with the top 10
1. Use C programming to check whether the network card is connected to the network cable
# Include # Include # Include # Include # Include Int main (){If (check_nic ("eth0") = 0)Printf ("detect OK./N ");ElsePrintf ("detect fail./N ");} // If the network card is connected, 0 is returned; otherwise,-1 is returned.Int
1 command line Input directly: Iptraf (if not, install with yum install Iptraf)2. Open Enter to select IP image.3. Select the interface for the monitoring test, all interfaces.4. Turn on the listening status log and the system default log path. /var/log/iptraf/ip_traffic.log4. After running, turn on the monitor network card traffic5.iptraf Reference Usage:Man Iptraf ViewThere are also many tool commands to
Sar–n DEV 1 2After the command 1 2 means: 1 times every second, 2 times.Dev Display Network interface informationThe-n parameter is useful, he has 6 different switches: DEV | Edev | NFS | NFSD | Sock | All.DEV Displays network interface information,EDEV displays statistical data about network errors,NFS Statistics acti
: The bandwidth shows the middle section: the list of external connections, that is, which IP is logged to the right of the middle part of the network connection to this computer: the real-time parameters are the access IP connected to the native 2 seconds, 10 seconds and 40 seconds of average traffic = Send data, Represents the received data at the bottom of three rows: represents the Send, receive, and a
screen filtering function, enter the characters to filter, such as IP, press ENTER, the screen will only show this IP-related traffic information;Press L to toggle the scale on the top of the display screen, and the flow graph bar will change depending on the scale;Press J or press K to scroll up or down the screen to display the connection record;Press 1 or 2 or 3 to sort by the three-column traffic data
, and ifstat KB, this b is byte, Byte is 8 times times the bit. Beginners are apt to be misled.Order to enter IftopAfter entering the iftop screen some operation command (note case) press H to toggle whether to display Help, press N to toggle display the IP or host name of the machine, press S to toggle whether the host information is displayed, press D to toggle whether the host information of the remote target hosts is displayed, or toggle the displ
-time traffic in a graphical manner:
Nload-t 200-i 1024-o 128-u H
Check the flow of the first network card, showing the real-time flow chart
Nload eth0
View the traffic of multiple network adapters at the same time.
Nload-m
Ifstat
This article introduced Linux to see the network card traffic six methods, Linux system using Nload, Iftop, Iostat and other tools to view the network card traffic, here we first to explain the next Iptraf method, the need for a friend reference.
The real-time traffic of th
which ip address occupies network traffic. This is what ifstat cannot do. However, the traffic display unit of iftop is Mb. The B is bit, bit, not byte, And the KB of ifstat. The B is byte, And the byte is eight times the bit. Beginners are easily misled.
Enter the iftop command
After entering the iftop screen, some
Iftop is mainly used to show the local network traffic and the flow of communication between each other, such as the size of the flow between the individual and that machine, is very suitable for proxy server and iptables server use to view network status can use Netstat, nmap and other tools. To view real-time network
There are a lot of SAR command parameters and there's time for man. The-n parameter is useful, he has 6 different switches: DEV | Edev | NFS | NFSD | Sock | All. DEV Displays network interface information, Edev displays statistics about network errors, NFS client Information for NFS statistics activities, NFSD statistics Server for NFS, sock displays socket infor
First, download the websiteWww.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gzSecond, iftop related parametersCommon parameters-I set the monitoring network card, such as: # Iftop-i eth1-B displays traffic in bytes (default is bits), such as: # Iftop-b-N Causes the host information to display IP directly by default, such as: # Iftop-n-N causes port information to be displayed by default directly, such as
determine whether an abnormal connection exists. If yes, we need to disconnect the network for further processing.
2. View service running status
Generally, the functions of a computer correspond to the services they provide. Therefore, many intruders will open various services after entering the computer. It can be seen that it is necessary to detect the services currently running in the system.
Enter "net start" in the
First, in the Start menu in the Command box to enter cmd This command, as shown:
Second, will return to the DOS environment, we can enter the ping command to detect.
1, we first to detect the intranet is the speed of connectivity, if the intranet other machine IP is 192.168.1.10, we can ping 192.168.1.102-t,-t is always ping, as shown in the figure:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.