I suddenly wanted to monitor the network card Traffic in Linux and didn't want to use cacti. I thought it was very troublesome to Configure SNMP. Ready-made tools seem to be useless. Decide to write a script by yourself.
Click (Here) Fold or open
#! /Bin/bash
Rx1 = $ (ifconfig $1 | grep "RX bytes" | awk '{print $2}' | awk-F: '{print $2 }')
Sleep 1
Rxa = $ ($ rx1/1000 ))
Rx2 = $ (ifconfig eth0 |
Linux with tcpdump network traffic monitoring, export files get windows with wireshark analysis linux command line: tcpdump-ieth1-s0host10121293-woutputtxt-i specified on eth1 listen, this according to different machines, by default, tcpdump is used in eth0 linux to monitor network traffic. the exported file is obtained to wireshark in windows to analyze the comm
Use iftop to monitor network traffic
Iftop is a useful tool. The following command monitors the wireless network card of my notebook
Iftop-I wlan0
Basic description:
1. the main part of the screen is the data transfer between two machines, with an arrow indicating the direction. The three values on the right are the average traffic of the past 2 seconds, 10
Article Title: View your network using vnStat to monitor broadband traffic. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic categories. many articles have introduced how to monitor bandwidth in Windows operating systems, this article disc
order of magnitudeif[[$RX-lt1024x768]]; ThenRX="${rx}b/s" elif[[$RX-GT1048576]]; ThenRX=$(Echo$RX |awk '{print $1/1048576 "MB/S"}') $STATUS="Busy" ElseRX=$(Echo$RX |awk '{print $1/1024 "kb/s"}') fi# To determine if the sending traffic is larger than the MB level, the MB units are displayed, otherwise the KB order of magnitudeif[[$TX-lt1024x768]]; ThenTX="${tx}b/s" elif[[$TX-GT1048576]]; ThenTX=$(Echo$TX |awk '{print $1/1048576 "MB/S"}')
Nethogs is a small, free open source command-line tool used to count network bandwidth usage in real time by process or program.For use similar to "repo tool", "Depot_tools" and other tools checkout source code is very useful, you can view the current download speed information, so you do not blindly wait.Installation under Ubuntu system
sudo apt-get install Nethogs
How to use
Nethogs [-d] [-h] [-P] [-t] [-v] [device (s)]
THE-D switch delay for the refresh r
/system32/cmd.exe in addition to the administrators user group for security reasons, all other user permissions are deleted. To solve this problem, add the system read and run permissions.
In addition, in the process of searching for information, we found that the MRTG is not authorized to monitor the traffic, and WMI and SNMP can be used to monitor information s
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.