메뉴 닫기

실시간 트래픽 모니터링툴 iftop 설치하기

—————————————————————-
1. 서버의 커널 버전, 비트, OS 버전을 확인합니다.
—————————————————————-

uname -a

Linux localhost.localdomain 2.6.18-400.1.1.el5 #1 SMP Thu Dec 18 00:59:53 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

—————————————————————-
2. 프로그램을 설치할 수 있도록 Remi repository 를 등록 합니다.
—————————————————————-

* CentOS 5.x 32bit
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm

* CentOS 5.x 64bit
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
pm -Uvh epel-release-5-4.noarch.rpm

* CentOS 6.x 32bit
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm

* CentOS 6.x 64bit
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm

# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
–2015-01-29 16:14:07–  http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Resolving dl.fedoraproject.org… 209.132.181.24, 209.132.181.25, 209.132.181.26, …
Connecting to dl.fedoraproject.org|209.132.181.24|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: `epel-release-5-4.noarch.rpm’

100%[====================================================>] 12,232      75.6K/s   in 0.2s

2015-01-29 16:14:18 (75.6 KB/s) – `epel-release-5-4.noarch.rpm’ saved [12232/12232]

# rpm -Uvh epel-release-5-4.noarch.rpm
경고: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
준비 중…                  ########################################### [100%]
   1:epel-release           ########################################### [100%]

—————————————————————-
3. iftop 설치합니다.
—————————————————————-

yum install iftop

# yum install iftop
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp.neowiz.com
 * epel: ftp.riken.jp
 * extras: ftp.neowiz.com
 * updates: ftp.neowiz.com
epel                                                                   | 3.7 kB     00:00
epel/primary_db                                                        | 3.3 MB     00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package iftop.x86_64 0:1.0-0.7.pre4.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
 Package            Arch                Version                       Repository         Size
==============================================================================================
Installing:
 iftop              x86_64              1.0-0.7.pre4.el5              epel               51 k

Transaction Summary
==============================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 51 k
Is this ok [y/N]: y
Downloading Packages:
iftop-1.0-0.7.pre4.el5.x86_64.rpm                                      |  51 kB     00:00
경고: rpmts_HdrFromFdno: Header V4 DSA signature: NOKEY, key ID 217521f6
epel/gpgkey                                                            | 1.7 kB     00:00
Importing GPG key 0x217521F6 “Fedora EPEL <epel@fedoraproject.org>” from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : iftop                                                                  1/1

Installed:
  iftop.x86_64 0:1.0-0.7.pre4.el5

Complete!

 

Ubuntu 환경에서는 간단히 패키지 명령으로 설치할 수 있습니다.

apt-get install iftop

# apt-get install iftop

패키지 목록을 읽는 중입니다… 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다… 완료
다음 새 패키지를 설치할 것입니다:
  iftop
0개 업그레이드, 1개 새로 설치, 0개 제거 및 14개 업그레이드 안 함.
0 바이트/36.5 k바이트 아카이브를 받아야 합니다.
이 작업 후 121 k바이트의 디스크 공간을 더 사용하게 됩니다.
Selecting previously unselected package iftop.
(데이터베이스 읽는중 …현재 226895개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack …/iftop_1.0~pre4-2_amd64.deb …
Unpacking iftop (1.0~pre4-2) …
Processing triggers for man-db (2.7.0.2-2) …

—————————————————————-
4. iftop 실행합니다.
—————————————————————-

* 네트웍 인터페이스 장치명 확인

ifconfig

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:25:90:52:8E:08
          inet addr:115.68.11.11  Bcast:115.68.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:75176655 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62714508 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42645277867 (39.7 GiB)  TX bytes:66049152507 (61.5 GiB)
          Interrupt:201 Memory:fb900000-fb920000

* iftop 실행

iftop -i eth0

* iftop 도움말 (iftop 실행화면에서 h키를 입력하면 나옵니다)

Host display:                          General:
 n – toggle DNS host resolution         P – pause display
 s – toggle show source host            h – toggle this help display
 d – toggle show destination host       b – toggle bar graph display
 t – cycle line display mode            B – cycle bar graph average
                                        T – toggle cumulative line totals
Port display:                           j/k – scroll display
 N – toggle service resolution          f – edit filter code
 S – toggle show source port            l – set screen filter
 D – toggle show destination port       L – lin/log scales
 p – toggle port display                ! – shell command
                                        q – quit
Sorting:
 1/2/3 – sort by 1st/2nd/3rd column
 < – sort by source name
 > – sort by dest name
 o – freeze current order

iftop, version 1.0pre4

* iftop 실행화면

iftop

 

 

[polldaddy rating=”7739789″]

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다