japanese

makefeedmap

Create netnews flow map as gif data based on the information acquired from the Path field of NetNews articles. Example . An actual delivery figure .
Download
makefeedmap 1.4 (updated 2003/05/16 JST)
Recuired
perl 5.001 or later.
GD
collect-sw
Usage(tst and makefeedmap):
  1. Edit a tst (inside of collect-sw package) script to specify the database location.
    Example: $db ="/var/log/news/tstdb";
  2. Edit 'newsfeeds' of INN.
    Example: TST:!*,fj.*,japan.*:Tc,WH:/usr/news/local/tst
    You should specify the newsgroup you want to collect the data. In this example the newsgroup fj.* and japan.* are collected.
  3. Reload the newsfeeds.
    Example : % ctlinnd reload newsfeeds tst
    Now, tstdb.dir and tstdb.pag are created in the directory /var/log/news/. Waiting for a while, Path will be accumulated on tstdb.pag.
  4. Drop on a file When it is gathered suitably. Before using tst_out, it is necessary to set up tst_out.
    Example # $dbp1: database directory specified in tst
    $dbp1 = "/var/log/news/log/";
    # $dbp2: working directory
    $dbp2 = "/var/log/news/log/db/";
    # $dbnam: database filename specified in tst
    $dbnam = "tstdb";
    # $cflush: command of 'ctlinnd flush'
    $cflush="/usr/news/bin/ctlinnd flush";
    # $host: hostname
    $host='foo.bar.com'
  5. Execute tst_out.
    Example: tst_out -f
    This makes "tstdata" in the directory $dbp2. You can see if this file contains a data like following. Site: foo.bar.com
    Total: 10714
    tamaru-news!kuee-news!9289
    kuee-news!kuis-news!1398
    * If you see only "Total:" in the file, change the value $cutoff in "tst_out" into smaller value.
  6. Setup cron to periodically start tst_out.
    Example: 30 23 * * 0 /usr/news/local/tst_out >/dev/null 2>&1
  7. execute "makefeedmap" to make gif figure
    Example: % makefeedmap /var/log/news/db/tstdata >output.gif
makefeedmap options
-a
An arrow is displayed between two hosts.
-e pathhost
specify a statring pathhost of the host in which tst was executed.
-d num
number of the maximum hop. The host of the larger hop than this value is not displayed. (Default: 10 hops)
-w num
The maximum number of hosts arranged horizontally. (Defaults: 8 hosts)
-r num
The radius of the circle which shows a host. (Default: 20 pixels is 20 pixels.
-R num
Max value of random movement from the center of the node. (Default: 50 pixels)
-g width,height
The size (x and y) of gif figure. (Default: width=1200, height=1000)
-c
Draw the radial picture centering on pathhost.
-h
Show this help.

ono @ ono.org