博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nload 安装操作实例
阅读量:6437 次
发布时间:2019-06-23

本文共 5787 字,大约阅读时间需要 19 分钟。

nload是一款监控网卡流量的工具,小巧灵便,很实用,只是功能较为单一,下面做一下简单的安装以及使用介绍:

安装过程:

wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz
--10:05:03--  http://www.roland-riegel.de/nload/nload-0.7.2.tar.gzResolving www.roland-riegel.de... 109.239.57.139Connecting to www.roland-riegel.de|109.239.57.139|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 145262 (142K) [application/x-gzip]Saving to: `nload-0.7.2.tar.gz'100%[========================================>] 145,262      118K/s   in 1.2s   10:05:08 (118 KB/s) - `nload-0.7.2.tar.gz' saved [145262/145262]

 

tar -zxvf nload-0.7.2.tar.gz /tools
...........................  nload-0.7.2/src/opt_window.h nload-0.7.2/src/setting.cpp nload-0.7.2/src/screen.cpp nload-0.7.2/src/devreaderfactory.h nload-0.7.2/src/form_field.cpp nload-0.7.2/src/devreader-linux-proc.h nload-0.7.2/src/settingstore.h nload-0.7.2/configure.in nload-0.7.2/COPYING nload-0.7.2/missing nload-0.7.2/config.guess nload-0.7.2/Makefile.in nload-0.7.2/nload.spec.in nload-0.7.2/config.sub nload-0.7.2/README
cd /tools/nload-0.7.2
./configure
...................................  checking for sys/ioctl.h... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for an ANSI C-conforming const... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking return type of signal handlers... void checking for gettimeofday... yes checking for inet_ntoa... yes checking for socket... yes configure: creating ./config.status config.status: creating Makefile config.status: creating nload.spec config.status: creating docs/Makefile config.status: creating docs/nload.1 config.status: creating src/Makefile config.status: creating config.h config.status: executing depfiles commands 如果有报错,可能缺少依赖包,yum安装相关包组:
yum install gcc gcc-c++ ncurses-devel
再次进行检测 ./configure,通过后,进行下一步: 
make && make install
....................................... make[2]: Nothing to be done for `all-am'.make[2]: Leaving directory `/tools/nload-0.7.2'make[1]: Leaving directory `/tools/nload-0.7.2'Making install in docsmake[1]: Entering directory `/tools/nload-0.7.2/docs'/bin/sh /tools/nload-0.7.2/install-sh -d /usr/local/share/man/man1/usr/bin/install -c -m 644 ../docs/nload.1 /usr/local/share/man/man1 gzip -f /usr/local/share/man/man1/nload.1 make[1]: Leaving directory `/tools/nload-0.7.2/docs' Making install in src make[1]: Entering directory `/tools/nload-0.7.2/src' make[2]: Entering directory `/tools/nload-0.7.2/src' test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin" /usr/bin/install -c 'nload' '/usr/local/bin/nload' make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/tools/nload-0.7.2/src' make[1]: Leaving directory `/tools/nload-0.7.2/src' make[1]: Entering directory `/tools/nload-0.7.2' make[2]: Entering directory `/tools/nload-0.7.2' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/tools/nload-0.7.2' make[1]: Leaving directory `/tools/nload-0.7.2

 

常用参数组合介绍:

安装完毕,直接输入nload命令就可以使用,也可以配合诸多参数进行自定义调节,常用参数如下:

1 -u设置屏显网卡带宽单位,子参数分别表示:

                 b: Bit/s, k: kBit/s, m: MBit/s etc. 

                 B: Byte/s, K: kByte/s, M: MByte/s etc

nload -u m

 Device eth1 [192.168.1.2] (2/4):

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

Incoming:

 

Curr: 0.02 MBit/s

Avg: 0.03 MBit/s
Min: 0.00 MBit/s
Max: 0.13 MBit/s
Ttl: 42.74 GByte

nload -u b

Device eth1 [192.168.1.2] (2/4):

=================================================================================
Incoming:

 

Curr: 95872.00 Bit/s

Avg: 83840.00 Bit/s

Min: 472.00 Bit/s
Max: 311112.00 Bit/s
.. Ttl: 15.26 GByte

 

2 -t 设置屏显刷新时间,单位是毫秒,默认值是500

nload -t 800

 

3 -m 显示所有网卡占用带宽情况,即时消息,如果有多块网卡,一屏显示不完,可以使用左右键切换到其他屏

nload -m

Device eth0 [166.80.64.15] (1/4):

=================================================================================
Incoming: Outgoing:
Curr: 2.31 kBit/s Curr: 0.00 Bit/s
Avg: 7.02 kBit/s Avg: 10.38 kBit/s
Min: 1.84 kBit/s Min: 0.00 Bit/s
Max: 14.72 kBit/s Max: 23.93 kBit/s
Ttl: 15.26 GByte Ttl: 21.68 GByte

Device eth1 [192.168.1.2] (2/4):

=================================================================================
Incoming: Outgoing:
Curr: 53.98 kBit/s Curr: 0.80 kBit/s
Avg: 19.45 kBit/s Avg: 0.22 kBit/s
Min: 6.45 kBit/s Min: 15.11 kBit/s
Max: 53.98 kBit/s Max: 0.80 kBit/s
Ttl: 42.74 GByte Ttl: 468.94 GByte

Device lo [127.0.0.1] (3/4):

=================================================================================
Incoming: Outgoing:
Curr: 0.00 Bit/s Curr: 0.00 Bit/s
Avg: 0.00 Bit/s Avg: 0.00 Bit/s
Min: 0.00 Bit/s Min: 0.00 Bit/s
Max: 0.00 Bit/s Max: 0.00 Bit/s
Ttl: 603.05 MByte Ttl: 603.05 MByte

 

 

 

详尽参数:

-a-----------period Sets the length in seconds of the time window for average calculation.     

-i  --------- ---max_scaling Specifies the 100% mark in kBit/s of the graph indicating the

                  incoming bandwidth usage. Ignored if max_scaling is 0 or the switch -m is given.

 
-m ---------  Show multiple devices at a time; no traffic graphs.

-o ------------max_scaling Same as -i but for the graph indicating the outgoing bandwidth usage.

                                           
-t --------- interval Determines the refresh interval of the display in milliseconds.
                                               
-u  h|b|k|m|g --------- Sets the type of unit used for the display of traffic numbers.
     H|B|K|M|G                             h: auto, b: Bit/s, k: kBit/s, m: MBit/s etc.
                                                 H: auto, B: Byte/s, K: kByte/s, M: MByte/s etc.
                                                
-U h|b|k|m|g--------- Same as -u, but for a total amount of data (without "/s").
    H|B|K|M|G                            
                                    devices Network devices to use.
                                    Default is to use all auto-detected devices.
-h--------- Print this help.

 

转载于:https://www.cnblogs.com/daino/p/4216348.html

你可能感兴趣的文章
Mysql-高性能索引
查看>>
chrome浏览器最小字号解决方案
查看>>
富文本编译器UEditor+SSM的使用
查看>>
Java EE之旅02 CSS基础
查看>>
kubernetes学习笔记 (二):k8s初体验
查看>>
swift3 0 流控制
查看>>
Data-Mediator专题之属性回调
查看>>
每天一个Linux命令之ps-查看系统进程信息
查看>>
图解JavaScript原型链继承
查看>>
用VIPER构建iOS应用
查看>>
Java开源诊断工具 Arthas 发布v3.1.0
查看>>
什么是以太坊
查看>>
高效开发者是如何个性化VS Code插件与配置的?
查看>>
Java日志那些事
查看>>
117. Populating Next Right Pointers in Each Node II
查看>>
【笔记】重学前端-winter
查看>>
大数据构建模块:选择体系结构和开源框架
查看>>
62. Unique Paths
查看>>
告诉你微信域名被封的原因和防封方案
查看>>
七个你没用过的炫酷开发工具推荐
查看>>