Kalai ini saya mau membahas bagaimana cara nya monitoring trafik pada netword /interface dari server. karena server sangatlah penting sehingga kita ingin mengetahui trafik apa saja yang masuk kedalam server dan berapa jumlah trafik tersebut. langsung saja ikuti cara berikut ini. temen-temen harus paham bagaimana car install di OS debian / ubuntu dan centos.
Step 1. Install nethogs dengan cara
[root@nginx ~]# yum install nethogs
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.hns.net.in
* epel: mirror.nus.edu.sg
* extras: mirrors.hns.net.in
* rpmfusion-free-updates: mirrors.ustc.edu.cn
* rpmfusion-nonfree-updates: mirror.de.leaseweb.net
* updates: mirrors.hns.net.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nethogs.i686 0:0.8.0-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
nethogs i686 0.8.0-1.el6 epel 28 k
Transaction Summary
===========================================================================================================
Install 1 Package(s)
Total download size: 28 k
Installed size: 50 k
Downloading Packages:
nethogs-0.8.0-1.el6.i686.rpm | 28 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : nethogs-0.8.0-1.el6.i686 1/1
Verifying : nethogs-0.8.0-1.el6.i686 1/1
Installed:
nethogs.i686 0:0.8.0-1.el6
Complete!
Step 2. Install NetHogs in Ubuntu, Linux Mint and Debian
[root@nginx ~]# sudo apt-get install nethogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
nethogs
0 upgraded, 1 newly installed, 0 to remove and 318 not upgraded.
Need to get 27.1 kB of archives.
After this operation, 100 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ quantal/universe nethogs i386 0.8.0-1 [27.1 kB]
Fetched 27.1 kB in 1s (19.8 kB/s)
Selecting previously unselected package nethogs.
(Reading database ... 216058 files and directories currently installed.)
Unpacking nethogs (from .../nethogs_0.8.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up nethogs (0.8.0-1) ...
Using NetHogs Utility
To run the nethogs utility, type the following command under red-hat based systems.
Step 3. jalankan perintah nethogs
[root@nginx ~]# sudo nethogs
Step 4. Jika ingin lebih spesifik lagi cek interface server yang digunakan
[root@nginx ~]# ip r
[root@nginx ~]# ip addr
[root@nginx ~]# ip a
[root@nginx ~]# ifconfig
perintah diatas ini sama saja dan banyak cara nya untuk melihat interface pada server
Step 5. Setelah di cek interface yang di gunakan maka lakukan cara ini
[root@nginx ~]# sudo nethogs nama_interface
selanjut nya akan keluar hasil trafik pada interface server dan semoga artiket ini dapat bermanfaat.
Sumber : https://www.tecmint.com/nethogs-monitor-per-process-network-bandwidth-usage-in-real-time/




