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

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