#21 2009-04-05 22:01:34
Re: 安裝 MRTG 功能
dreams 提到:
請教一個小問題
mrtg流量圖最新的是在左邊
怎樣把最新的流量換到右邊
這樣看的比較習慣
在 mrtg.cfg 裡,找到 Options[_]: ,增加參數 growright
例 Options[_]: growright, bits
參考資料: http://linux.vbird.org/linux_security/old/04mrtg.php#5
技術問題請於論壇上集眾人之力公開討論,感恩
離線
#26 2012-10-27 21:22:49
- jackggyy123
- 新生
- 註冊日期: 2011-11-16
- 文章數: 10
- 目前積分 : 0
Re: 安裝 MRTG 功能
sorry~
我爬文好久了,
我的安裝步驟如下
ipkg install libstdc++
ipkg install php php-fcgi
ipkg install lighttpd
ipkg install php-gd
ipkg install php-mbstring
ipkg install net-snmp
ipkg install mrtg
mkdir /opt/share/www/mrtg
cfgmaker public@127.0.0.1 > /opt/share/www/mrtg/mrtg.cfg
vi /opt/share/www/mrtg/mrtg.cfg
WorkDir: /opt/share/www/mrtg
vi /opt/etc/lighttpd/lighttpd.conf
server.event-handler = "poll"
server.port = 8080
server.modules 中把 "mod_fastcgi" 前面的"#" 去掉
/opt/etc/init.d/S80lighttpd stop
/opt/etc/init.d/S80lighttpd start
mrtg /opt/share/www/mrtg/mrtg.cfg
indexmaker /opt/share/www/mrtg/mrtg.cfg > /opt/share/www/mrtg/index.html
結果在
cfgmaker public@127.0.0.1 > /opt/share/www/mrtg/mrtg.cfg
出錯如下
SNMP Error:
no response received
SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161)
community: "public"
request ID: -1978358875
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /opt/bin/../lib/mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@127.0.0.1::::::v4only
at /opt/bin/cfgmaker line 955
WARNING: Skipping public@127.0.0.1: as no info could be retrieved
也試過cfgmaker public@192.168.1.1 > /opt/share/www/mrtg/mrtg.cfg
也不行
如果不管他,下一道指令,也是出錯
indexmaker /opt/share/www/mrtg/mrtg.cfg > /opt/share/www/mrtg/index.html
如下
Use of uninitialized value in hash element at /opt/bin/indexmaker line 364.
請問如何是好?謝謝~
離線
#27 2012-10-29 08:21:04
Re: 安裝 MRTG 功能
jackggyy123 提到:
SNMP Error: no response received SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161) community: "public" request ID: -1978358875 PDU bufsize: 8000 bytes timeout: 2s retries: 5 backoff: 1) at /opt/bin/../lib/mrtg2/SNMP_util.pm line 629 SNMPWALK Problem for 1.3.6.1.2.1.1 on public@127.0.0.1::::::v4only at /opt/bin/cfgmaker line 955 WARNING: Skipping public@127.0.0.1: as no info could be retrieved
確認一下 SNMP 是否正常?
技術問題請於論壇上集眾人之力公開討論,感恩
離線
#28 2012-10-29 15:21:09
- jackggyy123
- 新生
- 註冊日期: 2011-11-16
- 文章數: 10
- 目前積分 : 0
Re: 安裝 MRTG 功能
Aven 提到:
jackggyy123 提到:
SNMP Error: no response received SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161) community: "public" request ID: -1978358875 PDU bufsize: 8000 bytes timeout: 2s retries: 5 backoff: 1) at /opt/bin/../lib/mrtg2/SNMP_util.pm line 629 SNMPWALK Problem for 1.3.6.1.2.1.1 on public@127.0.0.1::::::v4only at /opt/bin/cfgmaker line 955 WARNING: Skipping public@127.0.0.1: as no info could be retrieved
確認一下 SNMP 是否正常?
我確認一下, SNMP 好像很正常
snmpwalk -v1 -c public localhost -m all
SNMPv2-MIB::sysDescr.0 = STRING: Linux 80211n 2.6.22.19 #8 Tue Nov 30 14:58:27 EST 2010 mips
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-TC::linux
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14107877) 1 day, 15:11:18.77
SNMPv2-MIB::sysContact.0 = STRING: "UNKNOWN CONTACT"
SNMPv2-MIB::sysName.0 = STRING: 80211n
SNMPv2-MIB::sysLocation.0 = STRING: "UNKNOWN LOCATION"
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (8) 0:00:00.08
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: RFC1213-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
....太多了
我爬文一下 iptable 也有設定阿
iptables -L
....
ACCEPT tcp -- anywhere anywhere tcp dpt:161
.....
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
|
17 | 68655 | 2012-05-08 23:07:26 作者 walkman |
|
24 | 100981 | 2010-08-19 21:24:32 作者 zchwy |