In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install MRTG under FreeBSD to monitor traffic, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take a look at it.
Install MRTG to monitor traffic under FreeBSD
In order to ensure the efficient operation of the network, we often need to control the flow of the network. This paper gives the method of using MRTG to monitor the traffic under FreeBSD.
1. Install net-snmpd first:
Cd / usr/ports/net/net-snmp; make install; rehash
2. Then modify the configuration of snmpd:
Ee / etc/rc.conf
Add the following settings:
Snmpd_enable= "YES" snmpd_flags= "- p / var/run/snmpd.pid" ee / etc/hosts.allow
Add the following:
Snmpd: localhost: allow ee / usr/local/share/snmp/snmpd.conf
Add the following:
Rocommunity mrtgmgrsyslocation FreeBSDsyscontact Bluewolfsysname localhost
3. Then start snmpd:
/ usr/local/sbin/snmpd-P / var/run/snmpd.pid
4. Install MRTG:
Cd / usr/ports/net/mrtg; make install; rehash
5. Set up the WEB directory of MRTG:
Mkdir / usr/local/apache/htdocs/mrtg
6. Generate configuration file:
Cfgmaker\-- global 'WorkDir: / usr/local/apache/htdocs/mrtg'\-- global' Options [_]: growright, bits'\-- global 'Language: chinese'\ mrtgmgr@localhost\ > / usr/local/etc/mrtg/mrtg.cfg
7. Generate web page files:
Indexmaker\-title 'MRTG-bluewolf's FTP Avarage Load'\-addhead=''\-output / usr/local/apache/htdocs/mrtg/index.html\-columns=1\-nolegend\ / usr/local/etc/mrtg/mrtg.cfg
8. Run MRTG:
/ usr/local/bin/mrtg / usr/local/etc/mrtg/mrtg.cfg
Run time will prompt an error, ignore, run 3 times in a row, the system no longer prompts an error.
9. Set up to run MRTG automatically every 5 minutes:
Crontab-e
Then enter the following:
0 usr/local/bin/mrtg 5 10 15 15 20 25 30 35 40 45 50 55 * / usr/local/bin/mrtg / usr/local/etc/mrtg/mrtg.cfg-- logging / var/log/snmp/smthome.log
Note:
1. You don't need to install snmpd to catch the switch, but you need to install snmp.
2.RunAsDaemon: yes
Refresh: 300
# No need for crontab-e
3. Gigabit public@192.168.0.254::::2
4.Target [net1]: 110:public@192.168.0.254::::2
SetEnv [net1]: MRTG_INT_IP= "" MRTG_INT_DESCR= "RMON-Port-10-on-unit-1"
MaxBytes [net1]: 125000000
Title [net1]: XXXXX
PageTop [net1]:
XXXX
System:XXXXX Port-10
Maintainer:tyyx
Description:3com4400
Max Speed:125.0 MBytes/s
Output web page net1.htm, content can be customized
This is the end of the story of installing MRTG to monitor traffic under FreeBSD.
Thank you for reading this article carefully. I hope the article "how to install MRTG to monitor traffic under FreeBSD" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.