In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to achieve traffic monitoring MRTG in the Linux server, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
MRTG
MRTG can analyze network traffic, but it must rely on the SNMP protocol. The collected data will be generated into a HTML file and displayed in the form of a picture.
1. Install some dependent software
[root@localhost bandwidthd-2.0.1] # yum install-y net-snmp
2. Configure snmp and edit the configuration file "/ etc/snmp/snmpd.conf"
[root@localhost bandwidthd] # gedit / etc/snmp/snmpd.conf
View systemview included .1.3.6.1.2.1.1
View systemview included .1.3.6.1.2.1.25.1.1
View systemview included .1.3.6.1.2.1.2
3. Start the snmp service
[root@localhost bandwidthd] # service snmpd start
Starting snmpd: [OK]
[root@localhost bandwidthd] #
4. Download the bandwidthd software (https://oss.oetiker.ch/mrtg/pub/?M=D), or install it online by yum
[root@localhost bandwidthd] # yum install-y mrtg
5. Modify the configuration file "/ etc/httpd/conf.d/mrtg.conf"
[root@localhost bandwidthd] # gedit / etc/httpd/conf.d/mrtg.conf
Order deny,allow
# Deny from all / / this sentence should be commented out
Allow from all / / here is all, which allows all ip to be detected
Allow from:: 1
# Allow from .example.com
6. Generate the mrtg file and make some modifications.
[root@localhost bandwidthd] # cfgmaker public@192.168.0.113 > / etc/mrtg/mrtg.cfg / / generate a file. Note that the ip address needs to be set by the user.
[root@localhost bandwidthd] # gedit / etc/mrtg/mrtg.cfg / / modify the file
# for UNIX
WorkDir: / var/www/mrtg / / is currently on the centos system, so this sentence is uncommented. This path is the path of the web page under apache
# or for NT
# WorkDir: C:\ mrtgdata
# Global Defaults
# to get bits instead of bytes and graphs growing to the right
Options [_]: growright, bits / / remove comments
7. Generate html file and execute three instructions
[root@localhost bandwidthd] # env mrtg/ etc/mrtg/mrtg.cfg / / the first time
2018-08-22 14:50:00, Rateup WARNING: / usr/bin/rateup could not read the primary log file for 192.168.0.1138.2
2018-08-22 14:50:00, Rateup WARNING: / usr/bin/rateup The backup log file for 192.168.0.1138.2 was invalid as well
2018-08-22 14:50:00, Rateup WARNING: / usr/bin/rateup Can't remove 192.168.0.113_2.old updating log file
2018-08-22 14:50:00, Rateup WARNING: / usr/bin/rateup Can't rename 192.168.0.113_2.log to 192.168.0.113_2.old updating log file
[root@localhost bandwidthd] # env mrtg/ etc/mrtg/mrtg.cfg / / the second time
[root@localhost bandwidthd] # env mrtg/ etc/mrtg/mrtg.cfg / / the third time
8. Type "127.0.0.1/mrtg/192.168.0.113_2.html" in the browser so that you can access it
The above content is how to implement traffic monitoring MRTG in Linux server. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.