linux图形化带宽监控工具darkstat

    近期做视频压测,主要关注带宽使用情况,从网上找到1个图形化带宽监控工具darkstat。

安装方式:

yum -y install epel-release
   
yum install darkstat

但是安装第三方源报错

Public key for epel-release-7-8.noarch.rpm is not installed
epel-release-7-8.noarch.rpm                                                                                                                                                      |  14 kB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7


The GPG keys listed for the "LocalBase" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: epel-release-7-8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

于是使用源码包安装

1、下载安装包

官网被墙了,为方便安装我下载完上传到csdn了:

下载地址https://download.csdn.net/download/c295477887/12328889

2、编译安装

yum install libpcap libpcap-devel
yum install bzip2
tar xvjf darkstat-3.0.719.tar.bz2
cd darkstat-3.0.719
./configure
make
make install

安装中遇到的问题

1、configure: error: can't find usable zlib

    查看系统是有zlib的,原来是缺少zlib-devel,于是:

    yum install zlib-devel

2、configure: error: can't find usable libpcap

    查看系统是由libpcap的,原来是缺少libpcap-devel,yum源也没有这个包,只能rpm安装了:

   下载rpm包:

    rpm  -i libpcap-devel-1.5.3-11.el7.x86_64.rpm

又报错和libpcap版本冲突,于是卸载libpcap:

    yum remove libpcap,rpm安装libpcap:

    rpm -i  libpcap-1.5.3-11.el7.x86_64.rpm

然后再安装libpcap-devel

    rpm -i  libpcap-1.5.3-11.el7.x86_64.rpm

3、启动

darkstat -i eth0 -p 666
-i   你要监控的网卡

-p  启动web端口

4、浏览器打开

http://ip:666

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章