如何安裝innreport

簡介

innreport 是一套相當不錯的 inn log file 的統計及分析軟體,除了可以產 daily report 之外,更可以將 daily report 用圖表及html表現出來將令人感到陌生的數字,用更具親和力的圖形表現出來,在觀察 news serverperformance 或是 tuning 方面都是一個好幫手。

除此之外,在目前的inn-1.8current中已經將innreport收進去,成為標準的daily usenet report的程式。

如果想要看看這討軟體的輸出結果,請參考
http://news-peer.nctu.edu.tw/~news/

相關資料及取得

ftp://NCTUCCCA.edu.tw/packages/news/innreport/unsurpported/innreport-2.1.9_6*

需求
  1. 安裝http server
  2. perl 5.004_04
  3. GD perl module
    1. 取得

      在任一個CPAN ftpsite下  [CPAN_DIR]/authors/id/LDS/GD-1.16.tar.gz舉例來說,以NCTUCCCA為例,[CPAN_DIR]就等於
      ftp://NCTUCCCA.edu.tw/computing-languages/perl

    2. 解開以後,在source目錄下執行

      perl Makefile.PL
      make
      make install

    3. 詳細資料請參考GD附上的說明檔
安裝
  1. innreport 可以分析 inn 產生的 log file,如果有inn1.7以上會比較好,除此之外針對 insync 板本和 innfeedloginnreport都能夠分析
  2. innreport-2.1.9_6總共有三個檔案, 分別是

    innreport-2.1.9_6_inn.conf
    innreport-2.1.9_6.pl
    innreport-2.1.9_6_inn.pm

  3. 全部解開後, 順改一下檔名變成

    innreport.conf
    innreport.pl
    innreport_inn.pm
    其中innreport.pl是主程式,innreport_inn.pm是library,innreport.conf就是設定檔。

  4. 把三個檔案通通丟到/usr/news/lib下﹝按照個人的設定,有的人會在/usr/local/news/lib﹞
  5. 看看innreport.pl的前面說明部份
  6. 編輯innreport.conf修該設定,除此之外,也可以在執行時下參數去設定,在innreport.conf中section default{}有些設定, 取幾個簡介一下
    1. html_dir
      指定html所在的目錄,只要可以寫入,web又讀得到就行了, 可以直接放在news的home下面
    2. module
      應該是innreport_inn,除非你把innreport_inn.pm檔名改成別的
    3. index
      你的html的index的名字,通常是index.html
    4. cycle
      innreport的報表是每天一個html檔,想要保存多少個檔案就寫多少
  7. 再來,讓我們來試看看
    innreport.pl -f innreport.conf /var/log/news/news \ /var/log/news/news.notice
  8. 過一段時間就會有stdout的輸出,同時也會產生html
  9. 我們所希望的是每天定時執行,最好跟news.daily一起news.daily會call scanlogs來整理log,scanlogs用的是innlog.pl來分析log,innreport.pl正好可以替換在scanlogs中找到innlog.pl那行,把他換成innreport.pl,當然還有其他相關的也要改一下

    handpoint2.gif (1615 bytes)scanlog的patch提供參考﹝板本是inn-1.7.2.insync1.1d﹞

  10. 接下來, 每天news server的daily report都會附上innreport產生的分析,html也會更新

本文件更新時間為1998/03/05 01:20

Contact:usenet@news-peer.nctu.edu.tw