使用iptraf进行实时监控流量

来源:互联网 发布:php 开源 erp 中文 编辑:程序博客网 时间:2024/05/10 00:15

下载源码安装关联关系太多了(有时候操作系统安装的不是很完全的话,源码安装会有问题),还是用yum方式这样方便(适用于liunx内核),首先用它查看下iptraf依赖关系。

[root@slave1 conf]# yum search iptraf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: mirror-fpt-telecom.fpt.net
==================================================================================== Matched: iptraf =====================================================================================
iptraf.x86_64 : A console-based network monitoring utility.
[root@slave1 conf]#

 

说明iptraf存在

运行安装命令yum install iptraf

[root@slave3 ~]# yum install iptraf
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package iptraf.x86_64 0:3.0.1-14.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================================
 Package                                    Arch                                       Version                                             Repository                                Size
==========================================================================================================================================================================================
Installing:
 iptraf                                     x86_64                                     3.0.1-14.el6                                        base                                     316 k

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

Total download size: 316 k
Installed size: 681 k
Is this ok [y/N]: y
Downloading Packages:
iptraf-3.0.1-14.el6.x86_64.rpm                                                                                                                                     | 316 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : iptraf-3.0.1-14.el6.x86_64                                                                                                                                             1/1
  Verifying  : iptraf-3.0.1-14.el6.x86_64                                                                                                                                             1/1

Installed:
  iptraf.x86_64 0:3.0.1-14.el6                                                                                                                                                           

Complete!

以上就算完成成功,但有时候不会安装成功,就要查下问题了。有时候不成功是有以下信息:

Total download size: 329 k
Is this ok [y/N]: y
Downloading Packages:
http://mirrors.ustc.edu.cn/centos/5/os/x86_64/CentOS/iptraf-3.0.0-5.el5.x86_64.rpm: [Errno 4] IOError: <urlopen error (101, 'Network is unreachable')>
Trying other mirror.


Error Downloading Packages:
  iptraf-3.0.0-5.el5.x86_64: failure: CentOS/iptraf-3.0.0-5.el5.x86_64.rpm from a: [Errno 256] No more mirrors to try.

 

报此错误,检查下机器是否能链接外网。

 

 

原创粉丝点击