NetHogs - Atẹle Fun Lilo Ilana Bandiwidi Nẹtiwọọki ni Akoko Gidi
Awọn ọna ṣiṣe Linux ni awọn toonu ti awọn irinṣẹ ibojuwo nẹtiwọọki orisun lori wẹẹbu. Sọ, o le lo pipaṣẹ oke lati wo ilana ṣiṣe lori eto rẹ. Ṣugbọn ti o ba n wa nkan gaan ti o le fun ọ ni awọn iṣiro akoko gidi ti bandiwidi nẹtiwọọki rẹ fun lilo ilana, lẹhinna NetHogs ni iwulo nikan ti o yẹ ki o wa.
NetHogs jẹ eto laini aṣẹ orisun ṣiṣi (iru si aṣẹ oke Linux) ti a lo fun atẹle bandwidth nẹtiwọọki nẹtiwọọki gidi ti o lo nipasẹ ilana kọọkan tabi ohun elo.
Lati Oju-iwe Ise agbese NetHogs
NetHogs jẹ ohun elo ‘net top’ kekere kan. Dipo fifọ ijabọ si isalẹ fun ilana tabi fun subnet, bi ọpọlọpọ awọn irinṣẹ ṣe, o ṣe ẹgbẹ bandiwidi nipasẹ ilana. NetHogs ko gbẹkẹle igbẹkẹle ekuro modulu lati kojọpọ. Ti o ba wa lojiji ọpọlọpọ ijabọ nẹtiwọọki, o le ṣe ina NetHogs ati lẹsẹkẹsẹ wo eyi ti PID n fa eyi. Eyi jẹ ki o rọrun lati ṣe idanimọ awọn eto ti o ti lọ si aginju ati lojiji n gba bandiwidi rẹ.
Nkan yii ṣalaye fun ọ lori bawo ni a ṣe le fi sori ẹrọ ati wa akoko gidi fun lilo bandiwidi nẹtiwọọki ilana pẹlu iwulo nethogs labẹ awọn ẹrọ ṣiṣiṣẹ Unix/Linux.
Lati fi awọn nethogs sori ẹrọ, o gbọdọ yum paṣẹ lati gba lati ayelujara ati fi sori ẹrọ package nethogs.
# yum install nethogs
yum -y 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!
Lati fi awọn nethogs sori ẹrọ, tẹ iru aṣẹ-gba atẹle lati fi sori ẹrọ package nethogs.
$ sudo apt-get install nethogs
[email :~$ sudo apt-get install nethogs [sudo] password for tecmint: 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) ...
Lati ṣiṣe iwulo nethogs, tẹ aṣẹ atẹle labẹ awọn ọna ṣiṣe ti ijanilaya pupa.
# nethogs
Lati ṣe, o gbọdọ ni awọn igbanilaaye root, nitorinaa ṣiṣe pẹlu aṣẹ sudo bi o ti han.
$ sudo nethogs
Bi o ṣe rii loke firanṣẹ ati awọn ila ti a gba wọle fihan iye ti ijabọ ti nlo nipasẹ ilana kan. Lapapọ ti a firanṣẹ ati gba lilo ti bandiwidi ti a ṣe iṣiro ni isalẹ. O le to lẹsẹsẹ ki o yi aṣẹ pada nipa lilo awọn idari ibanisọrọ ti a sọrọ ni isalẹ.
Atẹle ni awọn aṣayan laini aṣẹ nethogs. Lilo '-d' lati ṣafikun oṣuwọn isọdọtun ati 'orukọ ẹrọ' lati ṣe atẹle ẹrọ ti a fun ni pato tabi bandiwidi awọn ẹrọ (aiyipada jẹ eth0). Fun apẹẹrẹ, lati ṣeto awọn aaya 5 bi oṣuwọn itunra rẹ, lẹhinna tẹ aṣẹ bi.
# nethogs -d 5
$ sudo nethogs -d 5
Lati ṣe atẹle bandwidth nẹtiwọọki kan pato (eth0) nikan, lo aṣẹ bi.
# nethogs eth0
$ sudo nethogs eth0
Lati ṣetọju bandiwidi nẹtiwọọki ti awọn wiwo eth0 ati awọn wiwo eth1, tẹ aṣẹ atẹle.
# nethogs eth0 eth1
$ sudo nethogs eth0 eth1
-d : delay for refresh rate. -h : display available commands usage. -p : sniff in promiscious mode (not recommended). -t : tracemode. -V : prints Version info.
Atẹle ni diẹ ninu awọn idari ibaraenisọrọ to wulo (Awọn ọna abuja Keyboard) ti eto nethogs.
-m : Change the units displayed for the bandwidth in units like KB/sec -> KB -> B-> MB. -r : Sort by magnitude of respectively traffic. -s : Sort by magnitude of sent traffic. -q : Hit quit to the shell prompt.
Fun atokọ kikun ti awọn aṣayan laini iwulo iwulo nethogs, jọwọ ṣayẹwo awọn oju-iwe eniyan nethogs nipa lilo pipaṣẹ bi 'eniyan nethogs' tabi 'sudo man nethogs' lati ọdọ ebute naa. Fun alaye diẹ sii ṣabẹwo si oju-iwe ile iṣẹ akanṣe Nethogs.