Linux服務(wù)器如何實(shí)現(xiàn)流量監(jiān)控bandwidthd

這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)碛嘘P(guān)Linux服務(wù)器如何實(shí)現(xiàn)流量監(jiān)控bandwidthd,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

目前創(chuàng)新互聯(lián)公司已為上1000+的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)頁空間、網(wǎng)站托管、服務(wù)器租用、企業(yè)網(wǎng)站設(shè)計(jì)、竹山網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。

Bandwidthd

Bandwidthd是一款免費(fèi)的流量監(jiān)控軟件,它可以用圖標(biāo)的方式展現(xiàn)出網(wǎng)絡(luò)流量行為,并且可區(qū)分出ftp、tcp等各種協(xié)議的流量。

1、安裝一些依賴軟件

[root@localhost bandwidthd-2.0.1]# yum install -y libpng libpng-devel gd gd-devel gcc libpcap-devel

2、下載bandwidthd軟件(https://sourceforge.net/projects/bandwidthd/files/bandwidthd/bandwidthd 2.0.1/)

3、解壓bandwidthd。

[root@localhost ~]# tar -xzvf bandwidthd-2.0.1.tar.gz

4、安裝。Bandwidthd需要進(jìn)行編譯安裝,首先要執(zhí)行configure文件,生成makefile,然后在編譯、安裝

[root@localhost bandwidthd-2.0.1]# ./configure

[root@localhost bandwidthd-2.0.1]# make

[root@localhost bandwidthd-2.0.1]# make install

5、修改配置文件“/usr/local/bandwidthd/etc/bandwidthd.conf”,設(shè)置監(jiān)聽的網(wǎng)段和網(wǎng)卡

[root@localhost bandwidthd-2.0.1]# gedit /usr/local/bandwidthd/etc/bandwidthd.conf 

 #subnet 10.0.0.0 255.0.0.0

#subnet 192.168.0.0/16

#subnet 172.16.0.0/12

subnet 192.168.0.0/24          //監(jiān)聽網(wǎng)段

 

# Device to listen on

# Bandwidthd listens on the first device it detects

# by default.  Run "bandwidthd -l" for a list of 

# devices. 

dev "eth0"     //監(jiān)聽網(wǎng)卡

6、建立鏈接,在apache網(wǎng)頁根目錄建立一個(gè)鏈接,指向bandwidthd,這樣可以快速打開bandwidthd

[root@localhost bandwidthd-2.0.1]# cd /var/www/html/

[root@localhost html]# ln -s /usr/local/bandwidthd/htdocs bandwidthd

7、啟動(dòng)bandwidthd

[root@localhost html]# cd /usr/local/bandwidthd/

[root@localhost bandwidthd]# ./bandwidthd 

8、在瀏覽器輸入“127.0.0.1/bandwidthd”打開bandwidthd。請確保你已經(jīng)開啟了httpd服務(wù)。

Linux服務(wù)器如何實(shí)現(xiàn)流量監(jiān)控bandwidthd        

9、設(shè)置bandwidthd開機(jī)啟動(dòng)

[root@localhost html]# gedit /etc/rc.local

touch /var/lock/subsys/local

INITTY=/dev/tty[1-8]

for tty in $INITTY; do

    setleds -D +num < $tty

done

/usr/local/bandwidthd/bandwidthd

上述就是小編為大家分享的Linux服務(wù)器如何實(shí)現(xiàn)流量監(jiān)控bandwidthd了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

網(wǎng)站題目:Linux服務(wù)器如何實(shí)現(xiàn)流量監(jiān)控bandwidthd
標(biāo)題URL:http://muchs.cn/article18/jepsdp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃定制網(wǎng)站、搜索引擎優(yōu)化、微信小程序、ChatGPT、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名