Linux utility for monitoring Bandwidth usage for TCP/UDP connections by process name.
NeTraf is a linux application that helps you monitor the bandwidth consumption of a specific process. NeTraf is written in C# on .Net-Core and uses the following linux utilities : Netstat, IPTraf and Gnuplot.
Make sur you have the following tools installed before running NeTraf :
-
Netstat : this utility comes installed on some linux distributions. To install it (Debian/Ubuntu) :
# apt-get install net-tools
. -
IPTraf : Download and install this utility from here, then follow these steps to install it:
I. Decompress the .tar.gz file by entering
tar zxvf iptraf-x.y.z.tar.gz
.II. If your tar doesn't support the z option, you can separately decompress the tar.gz then extract the resulting .tar archive.
gunzip iptraf-x.y.z.tar.gz
tar xvf iptraf-x.y.z.tar
III. This will decompress the sources into a directory called iptraf-x.y.z.
IV. x.y.z here should be the IPTraf version number you're installing, like 3.0.0.
V. Change to the src directory. It already contains ready-to-run distribution binaries for IPTraf and the accompanying rvnamed daemon.
VI. To install the software, enter :
make install
. while you are logged in as "root". This will install the distribution binary in the /usr/local/bin directory. The necessary working directory /var/local/iptraf will also be created.VII. Configure IPTraf correctly : a. Enable Logging : IPTraf > Configuration > Logging > On. b. Configure log interval : IPTraf > Configuration > Timers > Logging Interval > 1 mins
-
GnuPlot :
apt-get install gnuplot-qt
. -
.Net Core : Get .Net Core and the toolings here.
-
Download the project here.
-
Navigate to the project's location
../NeTraf
. -
Enter
dotnet restore
to restore the Nuget dependencies. -
Enter
dotnet run
+ args :i. 1st argument : Network interface name. ii. 2nd argument : Process name. iii. 3rd argument : Monitoring interval (in minutes). iv. 4th argument : Output directory. v. Example :
dotnet run ens33 skype 15 ../Desktop/OutputResult
.i. 1st argument : Network interface name.
ii. 2nd argument : Process name.
iii. 3rd argument : Monitoring interval (in minutes).
iv. 4th argument : Output directory.
v. Example :
dotnet run ens33 skype 15 ../Desktop/OutputResult
.
Once the profiling is finished, navigate to the output file you precised in the beginning, there you'll find tow directories :
-
RawOutput files : these contain csv formatted output files describing the input/output bytes, packets and rate.
-
GraphicalOutput files : contain plots describing the input/output bytes, packets and rate, like follows :
This project is under the [Creative Commons Attribution NonCommercial NoDerivs (CC-NC-ND)] (https://tldrlegal.com/license/creative-commons-attribution-noncommercial-noderivs-(cc-nc-nd)#summary) fully described in the (c.f. License.txt) file.