nethogs — 网络带宽 top

LinuxGem 在这里有介绍但是不是很细体。我在这里在说明吧。

top 可以查看进程占用的 cpu、内存等信息,可以随时监测占用最大 cpu 和内存的进程是哪个。
nethogs
可以说是网络带宽 top,他可以查看进程占用的带宽信息,和 top 一样,随时刷新:

安装:

root@ptubuntu:/home/ptubuntu# apt-get install nethogs

安装完了,默认系统会读取eht0网卡,
root@ptubuntu:/home/ptubuntu# nethogs
ioctl failed while establishing local IP for device eth0   //这个就说明他没有找到相关的本地IP或是eth0网卡。如果你要查其他的网卡。那你可以先查一下网卡再使用命令。如下图。

nethogs01

使用这个是查出相关的网卡信息。接下来我们要查看相关的流量。

nethogs02

在这上面你可以看到三行的。上面两行一看就知道呀。第一个是通过apt通过http更新的流量。第二个就是浏览器的流量。

使用命令:

root@ptubuntu:/home/ptubuntu# nethogs ath0

因为我这个是无线的。所以会是ath0如果你是台式机那就不用填写ath0.

原创文章,转载请注明: 转载自PT Ubuntu Blog

本文链接地址: http://www.ptubuntu.com/2009/01/1407.html

  • Share/Bookmark

Leave a Reply


Verify Code   If you cannot see the CheckCode image,please refresh the page again!

Powered by WordPress | Buy free cell phones from at&t. | Thanks to PalmPreBlog.com, MMO Games and Conveyancing