Linux服务器如何实现流量监控bandwidthd-创新互联

这期内容当中小编将会给大家带来有关Linux服务器如何实现流量监控bandwidthd,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。

创新互联公司服务项目包括涞源网站建设、涞源网站制作、涞源网页制作以及涞源网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,涞源网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到涞源省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

Bandwidthd

Bandwidthd是一款免费的流量监控软件,它可以用图标的方式展现出网络流量行为,并且可区分出ftp、tcp等各种协议的流量。

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需要进行编译安装,首先要执行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”,设置监听的网段和网卡

[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          //监听网段

 

# Device to listen on

# Bandwidthd listens on the first device it detects

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

# devices. 

dev "eth0"     //监听网卡

6、建立链接,在apache网页根目录建立一个链接,指向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。请确保你已经开启了httpd服务。

Linux服务器如何实现流量监控bandwidthd     

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了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注创新互联-成都网站建设公司行业资讯频道。


网站题目:Linux服务器如何实现流量监控bandwidthd-创新互联
网站URL:http://myzitong.com/article/dcigdi.html