MRTG for M$ - 第5頁 - PCZONE 討論區

返回   PCZONE 討論區 > ▲ ADSL_CABLE_FTTH 寬 頻 上 網 討 論 > -- 網 路 技 術 版 > ---- 網 路 技 術 精 華 版


PCZONE 討論區



通知

---- 網 路 技 術 精 華 版 DNS、Mail、WWW 等 SERVER 架設心得或是各種網路技術精華區。

進階會員

引用:
最初由 shyong
我使用 linux 安裝 , 出現下列的錯誤 ,

而且沒有出現 run 這個目錄 , 我適用 mrtg-2.9.17.tar.gz

請問是哪裡出了狀況 , 另外請教如何設定 mrtg.cfg 中的內容


root@tarski bin ./mrtg mrtg.cfg
ERROR: "WorkDir" not specified in mrtg config file
你的mrtg.cfg檔出了問題..

WorkDir..這個是指MRTG輸出檔的存放位置(index.html..gif ..log等檔)..
要和apache相互配合...才能用browser瀏覽..
譬如apache的Document root位置為/home/www...那我的MRTG流量圖的檔案就可以往下放

ex :
WorkDir: /home/www/mrtg/my-computer

會員

請問一下
我是裝在WIN2K下面的
例如我想監控三個設備
如何可以讓三個設備的流量在同一個畫面出現阿
也就是一個畫面有三個流量圖
而不用三個設備各建一個流量圖
請問要如何合併阿?
版主

當我要修改 mrtg.cfg 出現了不讓我寫入及修改訊息

請問如何將其 service stop in LINUX ??
進階會員

引用:
最初由 casperyang
請問一下
我是裝在WIN2K下面的
例如我想監控三個設備
如何可以讓三個設備的流量在同一個畫面出現阿
也就是一個畫面有三個流量圖
而不用三個設備各建一個流量圖
請問要如何合併阿?
edit my.cfg ,

Target[your_nic_1_ip]: your_nic_1_OID:your_community_1@your_nic_1_ip:
MaxBytes[your_nic_1_ip]: 1250000
Title[your_nic_1_ip]: Traffic Analysis for 1
PageTop[localhost_1]:

your_nic_1_ip



Target[your_nic_2_ip]: your_nic_2_OID:your_community_2@your_nic_2_ip:
blah ... blah....
blah ...

Target[your_nic_3_ip]: your_nic_3_OID:your_community_3@your_nic_3_ip:
blah ... blah....
blah ...
進階會員

引用:
最初由 shyong
當我要修改 mrtg.cfg 出現了不讓我寫入及修改訊息

請問如何將其 service stop in LINUX ??
不能編輯??!!...用root也不行嗎??!!....
不太可能用root也不行..su成root之後...
chown your_id:your group mrtg.cfg
就可以用your_id去編輯修改mrtg.cfg

請問你要停掉什麼services...如果是要停掉mrtg...
他default是不會一直runㄟ....除非你有放上cron..哪就停掉cron就好..

如果你的mrtg.cfg有RunAsDaemon:Yes這行...
那就把它產生pid 給kill掉
版主

這是我在網路上看到的

在Target[163.18.225.254.2001]: -2001[email protected](IP位置會依實際情況而不同)
中2001代表Zylan 4024的S2/1 port,也就是接ATU-R的port,可用來當成對外的流量!
-2001應改為2001,其餘port均保留負號不變。


上述是作為什麼功能 ?


另外 your_nic_1_OID 是指什麼 ? prot 嗎 ?

我的情形是有一台 PC 要監控另一台 PC ( 有 3組 IP) , 且兩台為平行網域

列如 163.13.136.128 要監控 163.13.136.129 & 163.13.128.130 & 163.13.128.131

另外 , 我該如何讓其 "圖片輸出" ~~~ ?

下列是我的相關軟體版本
apache及其版本號碼 : apache-1.3.12-3lp
gd及其版本號碼 : gd-1.3-7lp
perl及其版本號碼: perl-5.00503-11lp

當我執行 ./mrtg mrtg.cfg 時出現下列訊息


root@power bin ./mrtg mrtg.cfg
SNMP Error:
receiving response PDU: Connection refused
SNMPv1_Session (remote host: "163.13.136.128" [163.13.136.128].161)
community: "POWER"
request ID: 1809315582
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /home/mrtg-2.9.17/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for ifInOctets.21 ifOutOctets.21 sysUptime sysName on [email protected]: at ./mrtg line 1485
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
Rateup WARNING: /home/mrtg-2.9.17/bin/rateup could not read the primary log file for 163.13.136.128.21
Rateup WARNING: /home/mrtg-2.9.17/bin/rateup The backup log file for 163.13.136.128.21 was invalid as well
Rateup WARNING: /home/mrtg-2.9.17/bin/rateup Can't remove 163.13.136.128.21.old updating log file
Rateup WARNING: /home/mrtg-2.9.17/bin/rateup Can't rename 163.13.136.128.21.log to 163.13.136.128.21.old updating log file


請問是何處出了問題 ? 十分感謝您的回答 !

另外關於排程啟動方面 cron.mrtg 我好像找不到這個檔案 !!!
請問如何自行編輯此檔 , 內容有哪些 ?

另外將排程併入 root 的時間排程內, 是不是用 crontab cron.mrtg





會員

引用:
最初由 repsol


edit my.cfg ,

Target[your_nic_1_ip]: your_nic_1_OID:your_community_1@your_nic_1_ip:
MaxBytes[your_nic_1_ip]: 1250000
Title[your_nic_1_ip]: Traffic Analysis for 1
PageTop[localhost_1]:

your_nic_1_ip



Target[your_nic_2_ip]: your_nic_2_OID:your_community_2@your_nic_2_ip:
blah ... blah....
blah ...

Target[your_nic_3_ip]: your_nic_3_OID:your_community_3@your_nic_3_ip:
blah ... blah....
blah ...
由於已經將三個設備都建成不同路徑,也就是分三個網頁去看
所以有A.cfg , B.cfg C.cfg三個檔
現在要把三個放在一個網頁是不是在A.cfg把其他兩個路徑如repsol兄所說的加上去即可ㄋㄟ?
這樣只要進A的網頁就可以看見三台設備的流量了
不知道是不是這樣做阿?
repsonl
會員

請問一下要如何讓mrtg自動去跑程式?? 不用手動~~



引用:
最初由 repsol
1.安裝好 NT or Windows 2000 的機器一台(也請裝上IIS或 apcahe 等)
2.perl for Win 的套件,請上http://www.activestate.com/ 如果你是nt或是win95/98請多下載一個InstMsi.exe
3.MRTG for M$ 的soft 請上http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html企抓...
4.安裝perl :
5.安裝mrtg for M$ :Hmm...請記住一下所解壓縮的目錄..
6.mrtg所有的執行檔都在bin的目錄下...
7.perl cfgmaker [email protected] --global "WorkDir:
c:\InetPub\wwwroot\MRTG" --output mrtg.cfg
稍微解釋一下...
其中xxxxxxxx為你的snmp community
aaa.aaa.aaa.aaa為你所要監測流量機器的ip
c:\InetPub\wwwroot\MRTG...請把他換成你web的document root
mrtg.cfg---->請依自己好記的方式來命名

8.編輯mrtg.cfg
Hmm....可以對照參考一下MRTG官方網站上說明...很詳細...不難懂.....需注意的是要記的設一下Interval這個參數
mrtg就是依照這個cfg檔的設定來產生易懂的html檔的流量圖....
9.indexmaker這個就是產生index.html的執行檔..
perl indexmaker 加上參數...
Options:
--output=filename set output filename (default: stdout)

--filter title=~regexp select targets by matching regexp against titles
--filter pagetop=~regexp select targets by matching regexp against pagetop
--filter name=~regexp select targets by matchin regexp against name

--title=text set title of generated index file
--bodyopt=text set body tag options
--pagetop=text insert this text between and

...



--columns=number show graphs in a table with x columns (default: 2)

--sort=title sort graphs by title
--sort=name sort graphs by their name
--sort=descr sort graphs by their description
--sort=original leave as is (default)

--enumerate add a sequence number to the title of each graph

--width=number set width of graphs (default: not set)
--height=number

--show=day pick which graph to show in the index (default)
--show=week
--show=month
--show=year
--show=none

--section=h1 h1 tag from pagetop as section heading (default)
--section=title title as section headings for graphs
--section=name graph name as section heading
--section=descr graph description as section heading
.....blah blah
舉個例子
perl indexmaker -t "MY Traffic show" mrtg.cfg > c:\InetPub\wwwroot\MRTG\index.html
這樣執行下來 ...就會有index.html出來了

10. 用瀏覽器瀏覽一下自己的http://aaa.aaa.aaa.aaa/MRTG/index.html...
如果不行...check一下..多try個幾次..應該就可以了..
版主

請問應該如何開啟 Linux 中的 SNMP ?
下列是我執行 MRTG 後的錯誤訊息 ~~~~

root@power bin ./mrtg mrtg.cfg
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.10.161)
SNMPv1_Session (remote host: "163.13.136.128" [163.13.136.128].161)
community: "public"
request ID: 489446806
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /home/mrtg-2.9.17/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for ifInOctets.161 ifOutOctets.161 sysUptime sysName on public@1
63.13.136.128: at ./mrtg line 1485
WARNING: Expected a number but got ''
WARNING: Expected a number but got ''
進階會員

引用:
最初由 williamsydu
請問一下要如何讓mrtg自動去跑程式?? 不用手動~~



在你的mrtg.cfg加上這一行
RunAsDaemon: yes
然後..找到你的wperl
start /Dyour\path\mrtg\ ypur\path\perl\wperl mrtg your\path\mrtg\cfg\mrtg.cfg
請問這是你要的嗎??!!

Good Luck !!



類似的主題
主題 主題作者 討論版 回覆 最後發表
MRTG 裝不起來 wbc319 -- FreeBSD & Linux 討 論 版 3 2006-12-08 10:43 AM
about Mrtg for win2k magiclee -- 網 路 技 術 版 3 2003-04-07 11:20 PM
MRTG celong -- 網 路 技 術 版 0 2002-04-19 01:59 PM
MRTG hanster -- 網 路 技 術 版 1 2001-06-08 12:58 AM
MRTG 有誰會裝呀? chengmou ---- ADSL 軟 硬 體 技 術 1 2001-06-04 10:02 AM






 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。