Linux服务器---流量监控bandwidthd
生活随笔
收集整理的這篇文章主要介紹了
Linux服务器---流量监控bandwidthd
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Bandwidthd
??????Bandwidthd是一款免費的流量監(jiān)控軟件,它可以用圖標的方式展現(xiàn)出網(wǎng)絡流量行為,并且可區(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需要進行編譯安裝,首先要執(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”,設置監(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)頁根目錄建立一個鏈接,指向bandwidthd,這樣可以快速打開bandwidthd
??????[root@localhost?bandwidthd-2.0.1]#?cd?/var/www/html/
??????[root@localhost?html]#?ln?-s?/usr/local/bandwidthd/htdocs?bandwidthd
7、啟動bandwidthd
??????[root@localhost?html]#?cd?/usr/local/bandwidthd/
??????[root@localhost?bandwidthd]#?./bandwidthd?
8、在瀏覽器輸入“127.0.0.1/bandwidthd”打開bandwidthd。請確保你已經(jīng)開啟了httpd服務。
??????
9、設置bandwidthd開機啟動
??????[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
??????Bandwidthd是一款免費的流量監(jiān)控軟件,它可以用圖標的方式展現(xiàn)出網(wǎng)絡流量行為,并且可區(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需要進行編譯安裝,首先要執(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”,設置監(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)頁根目錄建立一個鏈接,指向bandwidthd,這樣可以快速打開bandwidthd
??????[root@localhost?bandwidthd-2.0.1]#?cd?/var/www/html/
??????[root@localhost?html]#?ln?-s?/usr/local/bandwidthd/htdocs?bandwidthd
7、啟動bandwidthd
??????[root@localhost?html]#?cd?/usr/local/bandwidthd/
??????[root@localhost?bandwidthd]#?./bandwidthd?
8、在瀏覽器輸入“127.0.0.1/bandwidthd”打開bandwidthd。請確保你已經(jīng)開啟了httpd服務。
??????
9、設置bandwidthd開機啟動
??????[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服务器---流量监控bandwidthd的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jmeter学习指南之响应断言和bean
- 下一篇: 从头开始搭建爬虫环境