Chinaunix首页 | 论坛 | 博客
  • 博客访问: 140506
  • 博文数量: 68
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 720
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-28 20:01
文章分类

全部博文(68)

文章存档

2015年(68)

我的朋友

分类: 系统运维

2015-08-31 19:38:33

LINUX上有不少好用的实时查看网络流量的开源工具,像iptraf、iftop、ifstat等,只是这些工具一般都是查看网络的总体概况。如果系统上部有有多个应用,想知道各应用的实时流量,这时nethogs就派上用场了。

安装:

[root@localhost ~]# yum install nethogs

Loaded plugins: rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

Parsing package install arguments

Resolving Dependencies

--> Running transaction check

---> Package nethogs.x86_64 0:0.7-3.20080627cvs.el5 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


========================================================================================================================================================================

 Package                              Arch                                Version                                               Repository                         Size

========================================================================================================================================================================

Installing:

 nethogs                              x86_64                              0.7-3.20080627cvs.el5                                 epel                               28 k


Transaction Summary

========================================================================================================================================================================

Install      1 Package(s)         

Update       0 Package(s)         

Remove       0 Package(s)         


Total download size: 28 k

Is this ok [y/N]: y


使用:

[root@localhost ~]#nethogs


详细用法:

[root@localhost ~]# nethogs -h

usage: nethogs [-V] [-b] [-d seconds] [-t] [-p] [device [device [device ...]]]

                -V : prints version.

                -d : delay for update refresh rate in seconds. default is 1.  //刷新间隔

                -t : tracemode.                    //trace模式

                -b : bughunt mode - implies tracemode.        //调试模式

                -p : sniff in promiscious mode (not recommended).

                device : device(s) to monitor. default is eth0      //监控网卡


When nethogs is running, press:

 q: quit

 m: switch between total and kb/s mode


[root@localhost ~]# nethogs -d 5  eth0

阅读(547) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~