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個幾次..應該就可以了..
書籤