summaryrefslogtreecommitdiff
path: root/src/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib')
-rw-r--r--src/contrib/00INDEX512
-rw-r--r--src/contrib/14all/README9
-rw-r--r--src/contrib/GetSNMPLinesUP/COPYING339
-rw-r--r--src/contrib/GetSNMPLinesUP/COPYRIGHT25
-rwxr-xr-xsrc/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl84
-rw-r--r--src/contrib/GetSNMPLinesUP/INSTALL15
-rw-r--r--src/contrib/GetSNMPLinesUP/Makefile51
-rw-r--r--src/contrib/GetSNMPLinesUP/ModemTable.dial-machine18
-rw-r--r--src/contrib/GetSNMPLinesUP/README34
-rw-r--r--src/contrib/GetSNMPLinesUP/sample.cfg20
-rw-r--r--src/contrib/IxDisk/README4
-rwxr-xr-xsrc/contrib/IxDisk/ixdisk.cfg15
-rwxr-xr-xsrc/contrib/IxDisk/ixdisk.pl30
-rw-r--r--src/contrib/NSI/Mrtg_nsi1189
-rw-r--r--src/contrib/NSI/Mrtg_nsi.cfg393
-rw-r--r--src/contrib/NSI/mrtg-nsi-msg.txt115
-rw-r--r--src/contrib/PMLines/PMLines.pl194
-rw-r--r--src/contrib/PMLines/README38
-rw-r--r--src/contrib/PMLines/mrtg.cfg-demo34
-rw-r--r--src/contrib/TCH/README13
-rw-r--r--src/contrib/TCH/dualpri.pl81
-rw-r--r--src/contrib/TCH/dualt1.pl82
-rw-r--r--src/contrib/TCH/hiperdsp.pl82
-rw-r--r--src/contrib/TCH/mrtg.cfg67
-rw-r--r--src/contrib/TTrafic/TTraffic.asp165
-rw-r--r--src/contrib/TTrafic/gpl.txt133
-rw-r--r--src/contrib/TTrafic/readme.txt94
-rw-r--r--src/contrib/TotalControlModem/example.txt99
-rw-r--r--src/contrib/accesslistmon/INSTALL51
-rw-r--r--src/contrib/accesslistmon/README21
-rwxr-xr-xsrc/contrib/accesslistmon/examplescript16
-rw-r--r--src/contrib/accesslistmon/mrtg.cfg21
-rwxr-xr-xsrc/contrib/adm-mrtg/adm-mrtg149
-rw-r--r--src/contrib/adm-mrtg/adm-mrtg.README66
-rw-r--r--src/contrib/apc_ups/README9
-rw-r--r--src/contrib/apc_ups/ups.cfg23
-rw-r--r--src/contrib/apc_ups/upsdata01.pl12
-rw-r--r--src/contrib/ascendget/ascendget38
-rw-r--r--src/contrib/atmmaker/atmmaker431
-rw-r--r--src/contrib/cfgmaker_ATM/README13
-rw-r--r--src/contrib/cfgmaker_ATM/cfgmaker_atm.pl563
-rw-r--r--src/contrib/cfgmaker_cisco/README23
-rw-r--r--src/contrib/cfgmaker_cisco/cfgmaker.cisco561
-rw-r--r--src/contrib/cfgmaker_dlci/cfgmaker_dlci618
-rw-r--r--src/contrib/cisco_BPX_MGX/howto.html730
-rw-r--r--src/contrib/cisco_ipaccounting/CHANGELOG3
-rw-r--r--src/contrib/cisco_ipaccounting/README70
-rw-r--r--src/contrib/cisco_ipaccounting/TODO3
-rwxr-xr-xsrc/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl144
-rw-r--r--src/contrib/cisco_ipaccounting/networks4
-rw-r--r--src/contrib/cisco_tftp/scarfconf.pl187
-rw-r--r--src/contrib/ciscoindex/README18
-rw-r--r--src/contrib/ciscoindex/ciscoindex.pl135
-rw-r--r--src/contrib/cpuinfo/README17
-rwxr-xr-xsrc/contrib/cpuinfo/cpuinfo.pl195
-rw-r--r--src/contrib/cpuinfo/sample.cfg15
-rw-r--r--src/contrib/cpumon/README31
-rw-r--r--src/contrib/cpumon/cpumon.pl63
-rw-r--r--src/contrib/diskmon/README112
-rw-r--r--src/contrib/diskmon/getdisk.pl30
-rw-r--r--src/contrib/diskmon/sample.cfg25
-rw-r--r--src/contrib/diskmon/showdisk.pl14
-rw-r--r--src/contrib/distrib/distrib.c655
-rwxr-xr-xsrc/contrib/distrib/distrib.pl150
-rw-r--r--src/contrib/distrib/readme.txt51
-rw-r--r--src/contrib/gentcucci-1.0.0/README11
-rwxr-xr-xsrc/contrib/gentcucci-1.0.0/gentcucci261
-rw-r--r--src/contrib/gentcucci-1.0.0/gwcs.list32
-rwxr-xr-xsrc/contrib/gentcucci-1.0.0/mrtg_autorun14
-rw-r--r--src/contrib/gentcucci-1.0.0/nmcs.list14
-rwxr-xr-xsrc/contrib/gentcucci-1.0.0/tcnowstat78
-rwxr-xr-xsrc/contrib/gentcucci-1.0.0/tcnowtemp77
-rw-r--r--src/contrib/get-active/README21
-rw-r--r--src/contrib/get-active/get-active.pl194
-rw-r--r--src/contrib/get-active/get-active2.pl247
-rw-r--r--src/contrib/get-equi/README9
-rw-r--r--src/contrib/get-equi/get-equi.pl83
-rw-r--r--src/contrib/get-multiserial/get-modems-remote.pl58
-rw-r--r--src/contrib/get-multiserial/get-modems.pl45
-rw-r--r--src/contrib/ipchainacc/README20
-rw-r--r--src/contrib/ipchainacc/ipchainacc90
-rw-r--r--src/contrib/ipchains/README61
-rwxr-xr-xsrc/contrib/ipchains/ipchainacc97
-rwxr-xr-xsrc/contrib/ipchains/ipchainacc.rules36
-rw-r--r--src/contrib/ipfilter/fw.pl18
-rw-r--r--src/contrib/ipfilter/ip-filter.readme34
-rw-r--r--src/contrib/iptables-accounting/README21
-rwxr-xr-xsrc/contrib/iptables-accounting/iptables-accounting85
-rw-r--r--src/contrib/iptables_acc/README13
-rwxr-xr-xsrc/contrib/iptables_acc/iptables_acc69
-rw-r--r--src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt73
-rw-r--r--src/contrib/iptables_acc_snmp/README15
-rwxr-xr-xsrc/contrib/iptables_acc_snmp/iptables_acc_snmp167
-rw-r--r--src/contrib/ircstats/README6
-rw-r--r--src/contrib/ircstats/ircstats.pl93
-rw-r--r--src/contrib/ircstats2/README38
-rwxr-xr-xsrc/contrib/ircstats2/crontab.script45
-rw-r--r--src/contrib/ircstats2/example.cf38
-rwxr-xr-xsrc/contrib/ircstats2/ircstats2.pl213
-rw-r--r--src/contrib/jm/README17
-rwxr-xr-xsrc/contrib/jm/finger-mrtg.pl45
-rw-r--r--src/contrib/jm/mrtg-jm.tar.gzbin1391 -> 0 bytes
-rw-r--r--src/contrib/jm/news-mrtg.pl34
-rwxr-xr-xsrc/contrib/jm/quake-mrtg.pl51
-rw-r--r--src/contrib/linux_stat/linux_stats.pl76
-rw-r--r--src/contrib/linux_stat/readme9
-rw-r--r--src/contrib/meminfo/README9
-rw-r--r--src/contrib/meminfo/memory.pl68
-rw-r--r--src/contrib/monitor/Monitor.mdbbin110592 -> 0 bytes
-rw-r--r--src/contrib/monitor/config.asp274
-rw-r--r--src/contrib/monitor/default.asp254
-rw-r--r--src/contrib/monitor/global.asa25
-rw-r--r--src/contrib/monitor/global/main.css411
-rw-r--r--src/contrib/monitor/images/mrtg-l.gifbin343 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/mrtg-m.gifbin1144 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/mrtg-r.gifbin1779 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/mrtg-ti.gifbin4696 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/msie.gifbin9132 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/msprod.gifbin15856 -> 0 bytes
-rw-r--r--src/contrib/monitor/images/spacer.gifbin43 -> 0 bytes
-rw-r--r--src/contrib/monitor/login.asp176
-rw-r--r--src/contrib/monitor/monitor.html78
-rw-r--r--src/contrib/monitor/monitor.inc22
-rw-r--r--src/contrib/monitor/readme.txt139
-rw-r--r--src/contrib/mrtg-archiver-script/README88
-rw-r--r--src/contrib/mrtg-archiver-script/index.html16
-rwxr-xr-xsrc/contrib/mrtg-archiver-script/mrtg-archiver254
-rwxr-xr-xsrc/contrib/mrtg-archiver-script/mrtgnav80
-rw-r--r--src/contrib/mrtg-archiver-script/to-crontab4
-rw-r--r--src/contrib/mrtg-archiver/README54
-rw-r--r--src/contrib/mrtg-archiver/backup.pl62
-rw-r--r--src/contrib/mrtg-archiver/mrtg.archive.conf36
-rwxr-xr-xsrc/contrib/mrtg-archiver/mrtg.archive.pl167
-rw-r--r--src/contrib/mrtg-blast/COPYING339
-rw-r--r--src/contrib/mrtg-blast/COPYRIGHT27
-rw-r--r--src/contrib/mrtg-blast/INSTALL69
-rw-r--r--src/contrib/mrtg-blast/README18
-rwxr-xr-xsrc/contrib/mrtg-blast/mrtg-blast70
-rw-r--r--src/contrib/mrtg-blast/mrtg-blast.cfg58
-rw-r--r--src/contrib/mrtg-blast/tcpblast.c238
-rw-r--r--src/contrib/mrtg-dynip/Changes61
-rw-r--r--src/contrib/mrtg-dynip/FAQ214
-rw-r--r--src/contrib/mrtg-dynip/Install17
-rw-r--r--src/contrib/mrtg-dynip/README67
-rw-r--r--src/contrib/mrtg-dynip/TODO32
-rwxr-xr-xsrc/contrib/mrtg-dynip/mrtg-dynip668
-rw-r--r--src/contrib/mrtg-dynip/mrtg-dynip-sydnet727
-rw-r--r--src/contrib/mrtg-ipacc/README58
-rwxr-xr-xsrc/contrib/mrtg-ipacc/ipacc141
-rwxr-xr-xsrc/contrib/mrtg-ipacc/ipfwadm-wrapper868
-rw-r--r--src/contrib/mrtg-ipget/README18
-rw-r--r--src/contrib/mrtg-ipget/mrtg-ipget.patch43
-rw-r--r--src/contrib/mrtg-mail/README260
-rw-r--r--src/contrib/mrtg-mail/inetd.conf-dist5
-rwxr-xr-xsrc/contrib/mrtg-mail/mailstats92
-rw-r--r--src/contrib/mrtg-mail/mailstats-alternate29
-rw-r--r--src/contrib/mrtg-mail/mailstats-horowitz522
-rw-r--r--src/contrib/mrtg-mail/mailstats.cfg22
-rwxr-xr-xsrc/contrib/mrtg-mail/mqueue15
-rw-r--r--src/contrib/mrtg-mail/mqueue.cfg16
-rw-r--r--src/contrib/mrtg-mail/services-dist3
-rwxr-xr-xsrc/contrib/mrtg-mail/smtp-stats9
-rw-r--r--src/contrib/mrtg-startup-script/README18
-rw-r--r--src/contrib/mrtg-startup-script/mrtg79
-rw-r--r--src/contrib/mrtg.php/README.txt46
-rw-r--r--src/contrib/mrtg.php/mrtg.php178
-rw-r--r--src/contrib/mrtg_php_portal/conf/config.inc.php24
-rw-r--r--src/contrib/mrtg_php_portal/readme.txt31
-rw-r--r--src/contrib/mrtg_php_portal/update.pl17
-rw-r--r--src/contrib/mrtg_php_portal/www/admin.php21
-rw-r--r--src/contrib/mrtg_php_portal/www/index.php34
-rw-r--r--src/contrib/mrtg_php_portal/www/login.php56
-rw-r--r--src/contrib/mrtg_php_portal/www/remove.php77
-rw-r--r--src/contrib/mrtg_php_portal/www/setup.php140
-rw-r--r--src/contrib/mrtg_php_portal/www/update.php50
-rwxr-xr-xsrc/contrib/mrtgidx/mrtgidx64
-rw-r--r--src/contrib/mrtgindex.cgi/README19
-rwxr-xr-xsrc/contrib/mrtgindex.cgi/mrtgindx.cgi172
-rw-r--r--src/contrib/mrtglog/README29
-rw-r--r--src/contrib/mrtglog/mrtglog.c246
-rw-r--r--src/contrib/mrtglog/mrtglog.h25
-rw-r--r--src/contrib/mrtgmk/cfg/192.168.10.1.cfg79
-rwxr-xr-xsrc/contrib/mrtgmk/cfg/EXAMPLE13
-rw-r--r--src/contrib/mrtgmk/cfg/a.cfg21
-rw-r--r--src/contrib/mrtgmk/cfg/alias.cfg4
-rw-r--r--src/contrib/mrtgmk/cfg/convert.cfg11
-rw-r--r--src/contrib/mrtgmk/cfg/hosts.cfg4
-rw-r--r--src/contrib/mrtgmk/cfg/links.cfg4
-rw-r--r--src/contrib/mrtgmk/cfg/misc.cfg6
-rw-r--r--src/contrib/mrtgmk/cfg/mrtg.cfg583
-rw-r--r--src/contrib/mrtgmk/cfg/mrtg_cfg512
-rw-r--r--src/contrib/mrtgmk/cfg/page1.cfg5
-rw-r--r--src/contrib/mrtgmk/cfg/page1.html14
-rw-r--r--src/contrib/mrtgmk/cfg/page2.cfg11
-rw-r--r--src/contrib/mrtgmk/cfg/page2.html18
-rw-r--r--src/contrib/mrtgmk/cfg/today.html15
-rw-r--r--src/contrib/mrtgmk/doc/commands56
-rw-r--r--src/contrib/mrtgmk/doc/readme.1st138
-rw-r--r--src/contrib/mrtgmk/readme.1st26
-rwxr-xr-xsrc/contrib/mrtgmk/smrtgmk6
-rw-r--r--src/contrib/mrtgmk/src/alias.c71
-rw-r--r--src/contrib/mrtgmk/src/defhost.c186
-rw-r--r--src/contrib/mrtgmk/src/fnct0.c280
-rw-r--r--src/contrib/mrtgmk/src/fnctn.c52
-rw-r--r--src/contrib/mrtgmk/src/gif.c51
-rw-r--r--src/contrib/mrtgmk/src/html.c29
-rwxr-xr-xsrc/contrib/mrtgmk/src/mkm1
-rw-r--r--src/contrib/mrtgmk/src/mrtgmk.c35
-rw-r--r--src/contrib/mrtgmk/src/parse.c45
-rw-r--r--src/contrib/mrtgmk/src/parse.ftbl11
-rw-r--r--src/contrib/mrtgmk/src/parse0.c30
-rw-r--r--src/contrib/mrtgmk/src/parse0.ftbl44
-rw-r--r--src/contrib/mrtgmk/src/parsen.c54
-rw-r--r--src/contrib/mrtgmk/src/parsen.ftbl12
-rw-r--r--src/contrib/mrtgmk/src/txte.h34
-rw-r--r--src/contrib/mrtgmk/src/txtro.h34
-rw-r--r--src/contrib/mrtgmk/src/util.c55
-rw-r--r--src/contrib/mrtgmk/src/vars.h50
-rw-r--r--src/contrib/mrtgrq/Net-Telnet-3.02.tar.gzbin30946 -> 0 bytes
-rw-r--r--src/contrib/mrtgrq/README142
-rw-r--r--src/contrib/mrtgrq/cubprev.gifbin1648 -> 0 bytes
-rwxr-xr-xsrc/contrib/mrtgrq/getreport.pl33
-rw-r--r--src/contrib/mrtgrq/grnball.gifbin883 -> 0 bytes
-rw-r--r--src/contrib/mrtgrq/make-mrtg.cfg.awk69
-rwxr-xr-xsrc/contrib/mrtgrq/mrtgrq33
-rw-r--r--src/contrib/mrtgrq/mrtgrq.css36
-rw-r--r--src/contrib/mrtgrq/redball.gifbin881 -> 0 bytes
-rw-r--r--src/contrib/net-hosts/README108
-rw-r--r--src/contrib/net-hosts/cubprev.gifbin1648 -> 0 bytes
-rw-r--r--src/contrib/net-hosts/grnball.gifbin883 -> 0 bytes
-rw-r--r--src/contrib/net-hosts/internet29
-rw-r--r--src/contrib/net-hosts/make-mrtg.cfg.awk205
-rwxr-xr-xsrc/contrib/net-hosts/net-hosts26
-rw-r--r--src/contrib/net-hosts/net-hosts.css36
-rw-r--r--src/contrib/net-hosts/redball.gifbin881 -> 0 bytes
-rw-r--r--src/contrib/nt-services/5mrtg.exebin73728 -> 0 bytes
-rw-r--r--src/contrib/nt-services/5mrtg.reg10
-rw-r--r--src/contrib/nt-services/README59
-rw-r--r--src/contrib/nt-services/install.cmd48
-rw-r--r--src/contrib/nt-services/mrtg-etc.zipbin16304 -> 0 bytes
-rw-r--r--src/contrib/nt_n_cisco/README59
-rw-r--r--src/contrib/nt_n_cisco/RUN_builder.bat5
-rw-r--r--src/contrib/nt_n_cisco/RunCcfgs.cmd11
-rw-r--r--src/contrib/nt_n_cisco/builder.bat19
-rw-r--r--src/contrib/nt_n_cisco/cisco_devices_to_poll.txt6
-rw-r--r--src/contrib/nt_n_cisco/default.asp38
-rw-r--r--src/contrib/nt_n_cisco/make_all_cisco_configs.bat10
-rw-r--r--src/contrib/nt_n_cisco/nt_template.cfg228
-rw-r--r--src/contrib/nt_n_cisco/queryone.bat12
-rw-r--r--src/contrib/ovmrtg/README105
-rw-r--r--src/contrib/ovmrtg/buildht3
-rw-r--r--src/contrib/ovmrtg/buildrtov23
-rw-r--r--src/contrib/ovmrtg/cfgmakerov501
-rw-r--r--src/contrib/ovmrtg/index149
-rwxr-xr-xsrc/contrib/ovmrtg/installov1
-rw-r--r--src/contrib/ovmrtg/installov.cmds12
-rw-r--r--src/contrib/ovmrtg/installov.pl64
-rw-r--r--src/contrib/ovmrtg/mrtgmenu57
-rw-r--r--src/contrib/ovmrtg/newrtrov.txt23
-rw-r--r--src/contrib/ovmrtg/ovadd187
-rw-r--r--src/contrib/ovmrtg/ovcols41
-rw-r--r--src/contrib/ovmrtg/ovcullfile104
-rw-r--r--src/contrib/ovmrtg/ovcvtfile135
-rw-r--r--src/contrib/ovmrtg/ovdel180
-rw-r--r--src/contrib/ovmrtg/oveval.txt29
-rw-r--r--src/contrib/ovmrtg/ovin6
-rw-r--r--src/contrib/ovmrtg/ovmrtg.pm402
-rw-r--r--src/contrib/ovmrtg/ovsho39
-rw-r--r--src/contrib/ovmrtg/ovsysnms43
-rwxr-xr-xsrc/contrib/ovmrtg/ovtgtsbin24591 -> 0 bytes
-rw-r--r--src/contrib/ovmrtg/ovtst38
-rw-r--r--src/contrib/ovmrtg/ovupdate68
-rw-r--r--src/contrib/ping-probe/README22
-rw-r--r--src/contrib/portmasters/README22
-rw-r--r--src/contrib/portmasters/gather59
-rw-r--r--src/contrib/portmasters/portm.cfg70
-rw-r--r--src/contrib/procmem/README83
-rwxr-xr-xsrc/contrib/procmem/create-cfg-mem.pl64
-rwxr-xr-xsrc/contrib/procmem/create-cfg-proc.pl58
-rwxr-xr-xsrc/contrib/procmem/getmem.pl24
-rwxr-xr-xsrc/contrib/procmem/getproc.pl28
-rwxr-xr-xsrc/contrib/rdlog2/rdlog2.c818
-rwxr-xr-xsrc/contrib/rdlog2/readme.html182
-rwxr-xr-xsrc/contrib/rdlog2/wan.fig141
-rw-r--r--src/contrib/routers/README9
-rw-r--r--src/contrib/rumb-stat/README16
-rw-r--r--src/contrib/rumb-stat/gethttpstats53
-rw-r--r--src/contrib/rumb-stat/getsquidstats58
-rw-r--r--src/contrib/snmpping/README7
-rwxr-xr-xsrc/contrib/snmpping/snmpping.pl23
-rw-r--r--src/contrib/stat/README59
-rwxr-xr-xsrc/contrib/stat/dns.named18
-rwxr-xr-xsrc/contrib/stat/dns_mrtg5
-rwxr-xr-xsrc/contrib/stat/mrtg.cfg23
-rwxr-xr-xsrc/contrib/stat/stat.pl169
-rw-r--r--src/contrib/stfc/README35
-rwxr-xr-xsrc/contrib/stfc/stfc67
-rw-r--r--src/contrib/switchmaker/README20
-rw-r--r--src/contrib/switchmaker/switchmaker270
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph.pm1114
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm182
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm189
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/area.pm73
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm923
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/bars.pm176
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/colour.pm290
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS91
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES114
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST83
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL35
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/install/README137
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/legend.pm265
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/lines.pm184
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm62
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm106
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/pie.pm375
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/points.pm177
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile31
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm39
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gifbin824 -> 0 bytes
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt752
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl25
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl29
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl24
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl39
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl29
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl51
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl27
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl31
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl28
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat9
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl50
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl30
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl33
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl42
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat1842
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl60
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl50
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl38
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl23
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl20
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl22
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/area.t60
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t72
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t28
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt46
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl37
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t67
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t51
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t51
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t41
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/t/points.t58
-rw-r--r--src/contrib/whodo/GIFgraph/GIFgraph/utils.pm60
-rw-r--r--src/contrib/whodo/README134
-rw-r--r--src/contrib/whodo/collect.pl329
-rw-r--r--src/contrib/whodo/makeanalyse.pl100
-rw-r--r--src/contrib/whodo/networks24
-rw-r--r--src/contrib/whodo/sources5
-rw-r--r--src/contrib/whodo/sources.cfg18
-rw-r--r--src/contrib/whodo/summarise.pl102
-rw-r--r--src/contrib/whodo/wwwscripts/analyse.pl43
-rw-r--r--src/contrib/whodo/wwwscripts/pie.pl164
-rw-r--r--src/contrib/xlsummary/ReadMe.txt40
-rw-r--r--src/contrib/xlsummary/xlsummary.pl159
384 files changed, 0 insertions, 38488 deletions
diff --git a/src/contrib/00INDEX b/src/contrib/00INDEX
deleted file mode 100644
index db71dfa..0000000
--- a/src/contrib/00INDEX
+++ /dev/null
@@ -1,512 +0,0 @@
-
-The files in this direectory have been contributed to mrtg ... If you have
-questions in connection with these please contact the authors ...
-
-adm-mrtg
---------
-From: "Ripley, Scott" <Scott.Ripley@mail.house.gov>
-
-This script organizes config files for MRTG
-and restarts the MRTG processes cleanly.
-
-mrtg_php_portal
----------------
-From: Damien <damien@detonate.net>
-
-Perl and Php script to provide a 'user-friendly' web interface of
-adding/removing Mrtg polled hosts
-
-iptables_acc_snmp
-----------------
-From: HERITIER Hervé <hh@handco.org>
-
-simple script to capture iptables counter on Linux 2.4 for use with snmpd
-
-apc_ups
--------
-From: Klaus_Klein@mckinsey.com
-
-PERL script to extract the load % and remaining battery time from
-APC UPS systems.
-
-
-cisco_BPX_MGX
--------------
-From: "Newman, Daniel" <NewmanD@telergy.net>
-
-Here is an howto on monitoring Cisco BPX and MGX switches with MRTG.
-
-
-mrtg.php
---------
-From: David Boyer <Boyer_D@glan-hafren.ac.uk>
-
-Live Index of all log files
-
-TTrafic
--------
-From: David A. Pérez <david@kamborio.com>
-
-"TTrafic is a small VBScript to analyse MRTG (http://www.mrtg.org/) log
-files. By using this script, you will be able to know which amount of
-traffic is going through your interfaces."
-
-iptables-accounting
--------------------
-From: "Gill, Vern" <vgill@technologist.com>
-
-I have "hacked" together a module for iptables. I used the ipchainacc
-1.1.0 from the contrib directory.
-
-Total Control Modem CFG
------------------------
-From: Fernando Braghetto - Webmaster Hiway <webmaster@hiway.com.br>
-
-config sample for Control Modem Racks (3Com) to do user monitoring.
-
-
-routers
--------
-From: Steven Shipway <Steven_Shipway@adsweu.com>
-
-check out http://www.cheshire.demon.co.uk/pub/
-for about 1000 neat tools for mrtg & rrdtool
-
-stfc
-----
-
-From: Mihai Claudiu Capatina <mihai.capatina@aignet.ro>
-
-This is a small script that I use on FreeBSD machines running ALTQ
-This machines acts like a traffic management system and I need to see
-the traffic for each class ( CBQ )
-
-gentgucci
----------
-From: Kevin Benton <s1kevin@sotatech.net>
-
-generate configs for 3com total control chassis
-
-procmem
--------
-From Dimitrios Stergiou <dste@intranet.gr>
-
-Cisco CPU & Memory monitoring
-
-iptables_acc
-------------
-From: Gereon Ruetten <g.ruetten@gmx.de>
-
-i wrote a little script for using mrtg with iptables
-
-ipchainacc
-----------
-From: Ilya Konstantinov <future@galanet.net>
-
-I have tweaked version on the ipchainacc perl script provided in MRTG's contrib for
-which accounts BYTES instead of PACKETS
-
-net-hosts
----------
-From: Adrian Turcu <adi@cfrcta.ro>
-
-monitor internet connection state on a chosen route (from traceroute)
-
-mrtgrq
-------
-From: Adrian Turcu <adi@cfrcta.ro>
-
-This script helps to monitor the amount of disk-space
-quota for each e-Mail user on the system. It allows to
-acquire statistical data for each of user.
-
-
-linux_stat
-----------
-From: Mike Machado <mike@cheapnet.net>
-
-simple script to get the current traffic off a linux box
-
-nt_n_cisco
-----------
-From: CmdrData <CmdrData@ex-pressnet.com>
-
-running mrtg on NT and SQL db monitoring Cisco gear ...
-
-cfgmaker_dlci
--------------
-From: Graziano Sommariva <Graziano.Sommariva@elsag.it>
-
-a modified version of the cfgmaker for people who want to
-monitor DLCIs
-
-ipchains
---------
-From: John Lange <john.lange@darkcore.net>
-
-ipchains accounting script for use with MRTG
-
-monitor
--------
-From: Chris Knipe <cgknipe@mweb.co.za>
-
-NT/Access/ASP based network monitoring system using mrtg technology.
-
-mrtg-archiver-script
---------------------
-From: Oleg Krotoff <krot@tnsplus.kz>
-
-I have written a script, that allows to archieve graphs,
-produced by MRTG, organize and index them. CGI-script
-for navigation through archive is enclosed.
-
-
-get-equi
---------
-From: Mike Gaertner <miky@forum.org.kh>
-
-The Equinox SST card does not provide SNMP support. Therefor I wrote a
-small perl script which reads out the byte counter from the Equinox SST
-board.
-
-
-nt-service
-----------
-From: Miroslaw.Maczka@bze.com.pl
-make mrtg a service under NT
-
-snmpping
---------
-From: x <tomm02@yahoo.com>
-
-see if a device speaks snmp
-
-IxDisk
-------
-From: Miroslaw.Maczka@bze.com.pl
-
-Informix Performance monitoring
-
-accesslistmon
--------------
-From: Roddy Strachan <roddy@satlink.com.au>
-
-Access-list Monitoring via MRTG
-
-mrtglog
--------
-From: Vladimir Vul <vul@bds.ru> and Wolfgang Hoffmann <woho@netpark.at>
-
-This simple prog counts total traffic for given period, parsing mrtg logs.
-
-meminfo
--------
-From: Colin Tinker <g1gsw@linux.g1gsw.ampr.org>
-
-This one checks /proc/meminfo for the used
-and free memory parsing it out for MRTG.
-
-ipfiler
--------
-From: Ronald Florence <ron@18james.com>
-
-This script comes handy to interface ip-filter, a superb kernel-level
-packet-filtering router/firewll for Unix and Linux (
-http://coombs.anu.edu.au/~avalon/ip-filter.html ). The script graphs
-connections through the firewall.
-
-switchmaker
------------
-From: Markley P. Dykeman <mdykeman@micron.net>
-
-Switchmaker will make an mrtg config file for a Cisco Catylst
-5XXX switch.
-
-cpuinfo
------------
-From: Matthew Schumacher <schu@schu.net>
-
-A short perl script that I wrote that will monitor system and user CPU usage
-on linux and sun machines that I would like to contrib.
-
-cisco_tftp
-----------
-From: Paul E. Erkkila <pee@gblx.net>
-
-This code will ask a cisco router to tftp it's config..
-
-cisco_ipaccounting
-------------------
-From: cramer@dolphins.ch
-
-gets IP-accounting data from a Cisco Router
-
-NSI (Network Status Imager for MRTG)
-------------------------------------
-From: "Kloberg Mac (LAM)" <mac.kloberg@lam.liebherr.com>
-
-Present network status on a map ...
-
-14all
------
-From: Rainer Bawidamann <Rainer.Bawidamann@informatik.uni-ulm.de>
-
-Generates mrtg graphs on the fly. Uses RRDtool for graphing and logging. Needs
-UseRRDTool: Yes in mrtg.cfg ...
-
-mrtg-ipacc
-----------
-From: Cristian Caramida <brick@bbs.ro>
-
-Using Linux IP accounting kernel rules to feed mrtg
-
-mrtgmk
-------
-From: Iulian Radu <iulian_r@starnets.ro>
-
-"mrtgmk" is a program that scan a .cfg file and generate a mrtg.cfg
-style file + a .html file with links to the .html files generated by
-mrtg.
-
-
-cfgmaker_cisco
---------------
-From: Jon Snyder <JON@PDX.EDU>
-
-CFGMAKER which instead of just returning an incrimenting port number on the
-graps, actually makes the following type of lable: Port 4/3, Vlan 128 ,
-multi mode fiber fast ethernet
-
-This version also grabs and shows all non-VLAN1 VLANS in a different color,
-plus provides aggregate VLAN traffic stastics as well by finding out what
-ports are in the VLAN, then adding those ports together. This means of
-course that a port will be "hit" however many times it is in a VLAN.
-
-cfgmaker_atm
-------------
-From: Henry Steinhauer <H1STEINH@hewitt.com>
-
-Bay ATM Information created from their MIB.
-
-OVmrtg
-------
-From: "Gellatly, Laurie (x8864)" <laurie.gellatly@vodafone.com.au>
-
-HP OpenView integration for MRTG ...
-
-CiscoIndex
-----------
-From: Tim Cimarusti <cimarust@mercernet.com>
-
-This PERL script will read in the a Cisco router config file
-created by the "write network" command and create a HTML index
-for it's interfaces that corresponds with MRTG.
-
-DiskMon (getdisk.pl and showdisk.pl)
-------------------------------------
-From: Steven Micallef <smic@wire.net.au>
-
-Well, here's the scripts I use for graphing disk space on the hosts on our
-network.
-
-stat.pl
-------
-From: Calle Olsen <calle@volvo.se>
-
-this little perlscript helps to monitor your dns server
-
-whodo
------
-From: "Tony-Farr (Canberra)" <Tony.Farr@austrade.gov.au>
-
-Whodo is a set of Perl scripts to analyse IP accounting data from a cisco
-router. The stats for each traffic source are fed into mrtg. Whodo also
-generates pie graphs showing traffic split by source or destination.
-
-xlsummary
----------
-From: "Tony-Farr (Canberra)" <Tony.Farr@austrade.gov.au>
-
-The script extracts summary figures from the MRTG log files. In particular
-it summarises all sites (i.e. as many as will fit on a page) into a single
-Excel chart. Because it uses Excel, it is only useful on Windows.
-
-TCH
----
-From: Eric Billeter <ebilleter@cableone.net>
-
-Here are some scripts i modified to monitor the modem utilization
-of my USR Total control racks.
-
-jm
---
-From: Joey Miller joeym@inficad.com
-
-a few perl scripts I wrote to collect stats on: # of users logged into a
-given shell machine, # of players on a quake server, and # of users
-currently reading news.
-
-get-active
-----------
-get-active From: Russ Wright <Wright@LBL.Gov>
-get-active2 From: Wee-Meng LEE <leewm@hpsgmx18.sgp.hp.com>
-
-This will look at the $trafficDir directory for MRTG generated HTML
-files, parse them and generate a listing of the most active interfaces
-in a file called "active.htlm" in the same directory
-
-cpumon
-------
-From: Matthew Ramsey <mjr@blackened.com>
-
-I use this script to monitor cpu usage on any process that
-maintains a pid file.
-
-mrtg-dynip
-----------
-From: John Heenan <johnhe@syd.net.au>
-
-Mrtg-dynip is a contribution to mrtg, enabling mrtg to generate multi
-interface traffic graphs for various hosts which do not provide a
-consistent interface name for physical interfaces, such as in a dynamic IP
-environment.
-
-
-ircstats
---------
-From: Matt Ramsey (MR227) mjr@geeks.org, mjr@nin.com
-
-ircstats.pl is the simple perl script I use to monitor client
-loads and such on various EFnet IRC servers.
-
-ircstats2
----------
-From: Lucas Nussbaum <lucas@ians.be>
-
-ircstats2.pl is a script used to monitor the user load on IRC networks.
-Contrary to ircstats by Matt Ramsey, it remains connected to the server.
-
-PMLines
---------
-From: Carlos Canau <canau@dawn.EUnet.pt> and Many others
-
-Here's another script for contrib. It allows one to make a
-graph of analog/ISDN lines on a Livingston Portmaster 2/3/4.
-
-atmmaker
---------
-From: Mark Trettin <mkt@lucent.com>
-
-I am sending a copy of our atmmaker script that generates a cfg
-for the FORE ASX switch you may add it to your contrib section.
-
-distrib
--------
-From: Philippe Simonet <sip00@vg.swissptt.ch>
-
-'distrib' read mrtg log files and computes traffic distribution in
- the time. It ouputs a graph with :
- - in x the percentage of trafic utilisation (% bandwith)
- - in y how many times the utilization was reached (% time)
-
-rdlog2
-------
-From: Philippe Simonet <sip00@vg.swissptt.ch>
-
-Rdlog is a small (and primitive) tool that gives indication on network
-traffic on a graphic map. It takes information from MRTG log files, and draw
-a GIF file with links that have colors based on the current traffic on your
-network. This small test explain how to use this tool.
-
-mrtg-ipget
-----------
-From: Jim Willette <mailroom@ctec.net>
-
-I have modified mrtgV2 to record stats based on interface ip address instead
-of Interface number. It does not do all the great errorchecking and no OS
-testing but it is functional for my needs.
-
-mrtgidx
--------
-From: Axel Dunkel <ad@Dunkel.de>
-
-mrtgidx works like makeindex but the output produced looks different ...
-
-
-ascendget
----------
-From: John-David Childs <jdc@ism.net>
-
-SHELL SCRIPT TO GET # of connected users on Ascend
-use Target[router]: `ascendget`
-
-get-multiserial
----------------
-From: T. Pospisek <tpo@spin.ch>
-
-SHELL scripts to get active tty(-dial-in modem-) lines localy and remotely.
-I'm using them with a cyclades board but they can be adapted at wish to
-different tasks.
-
-use Target[modems]: `get-multiserial`
-
-ping-probe
-----------
-From: "Peter W. Osel" <pwo@hl.siemens.de>
-
-A perl script to get roundtrip delays to hosts by sending a ping
-to them.
-
-rumb-stat
----------
-From: Anthony Rumble <anthonyr@ce.com.au>
-
-Heres some handy scripts to get byte stats from apache (web server) 1.1.1
-and better and squid (proxy server) 1.1.1 and better.
-
-portmaster
-----------
-From: Chris Johnson <admin@nantucket.net>
-Subject: MRTG for portmasters
-
-A script and config to produce Modem statistics for Livingston
-Portmasters.
-
-mrtg-blast
-----------
-From: "Balthasar T. Indermuehle" <bi@inside.ch>
-
-This is a tcpblast interface available for MRTG 2.1. It works much like
-the famed ping-probe, instead of ping it uses tcpblast to estimate
-network bandwidth.
-
-GetSNMPLinesUP
---------------
-From: Carlos Canau <canau@dawn.EUnet.pt>
-
-GetSNMPLinesUP.pl checks some SNMP variables for a certain value and
-returns their sum in a format used to feed values to MRTG.
-
-mrtgindex.cgi
--------------
-From: Mick Ghazey <mick@lowdown.com>
-
-like mrtgindex, but runs as a cgi. Thus it will not need SSIs ...
-
-mrtg-mail
----------
-From: Rachel Polanskis <r.polanskis@nepean.uws.edu.au>
-
-plot sendmail mailstats with mrtg
-
-there is a second version bz rick horowitz in the directory as well
-
-mrtg-archiver
--------------
-From: Emanuele Leonardi <Emanuele.Leonardi@roma1.infn.it>
-From: Rawlin Blake <blake@nevada.edu>
-
-It wakes up at 23:54 every night and copies all the current daily gifs
-for the given list of routers to a directory named with the current date
-(e.g. 970717). The Perl code is extremely straightforward so there
-should be no problem in understanding it.
diff --git a/src/contrib/14all/README b/src/contrib/14all/README
deleted file mode 100644
index d69bc86..0000000
--- a/src/contrib/14all/README
+++ /dev/null
@@ -1,9 +0,0 @@
-Because Rainer is very active in fixing bugs and enhancing 14all.cgi.
-Please go to his website to fetch the latest version of his cool
-tool:
-
- http://my14all.sourceforge.net/
-
-
-cheers
-tobi
diff --git a/src/contrib/GetSNMPLinesUP/COPYING b/src/contrib/GetSNMPLinesUP/COPYING
deleted file mode 100644
index e77696a..0000000
--- a/src/contrib/GetSNMPLinesUP/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/src/contrib/GetSNMPLinesUP/COPYRIGHT b/src/contrib/GetSNMPLinesUP/COPYRIGHT
deleted file mode 100644
index aafb24c..0000000
--- a/src/contrib/GetSNMPLinesUP/COPYRIGHT
+++ /dev/null
@@ -1,25 +0,0 @@
- GetSNMPLinesUP.pl
-
- for
-
- MRTG - The Multi Router Traffic Grapher.
-
-
-Copyright (c) 1997 Carlos Canau <canau@EUnet.pt>. All rights reserved.
-
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-675 Mass Ave, Cambridge, MA 02139, USA.
-
-
diff --git a/src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl b/src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl
deleted file mode 100755
index baed6a4..0000000
--- a/src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Copyright (c) 1997 by Carlos Canau <canau@EUnet.pt>, EUnet Portugal.
-# All Rights Reserved.
-#
-# See the file COPYRIGHT in the distribution for the exact terms.
-#
-
-$SNMPGet = '/usr/bin/snmpget';
-$TableBase = '/store/lib/mrtg/GetSNMPLinesUP/ModemTable';
-$Community = "public";
-$progname = 'GetSNMPLinesUP.pl';
-$Router = $ARGV[0];
-$Table = $ARGV[1] || "$TableBase.$Router";
-
-$MAGICLEN = 20;
-
-$UPTIME = "system.sysUpTime.0";
-$NAME = "system.sysName.0";
-
-if (!$Router) {
- die "$progname: $progname ROUTER [TableFile]\n";
-}
-
-$var = "$UPTIME $NAME "; $varlen = 2;
-$buzy = 0;
-
-if ( ! -r "$Table") {
- $Table = "$TableBase.$Router";
-}
-
-open( TABLE, "$Table" );
-while (<TABLE>) {
- chop;
- $var = $var . $_ . " "; $varlen++;
- if ($varlen >= $MAGICLEN) {
- open( GET, "$SNMPGet -v 1 $Router $Community $var |" );
- while ( <GET> ) {
- chop;
-### printf "---%s\n", $_;
- if (/up\(1\)/) {
- $buzy++;
- };
-### if (/$UPTIME/) {
- if (/^system\.sysUpTime/) {
- ($dummy, $Uptime) = split(' = ', $_, 9999);
- }
-### if (/$NAME/) {
- if (/^system\.sysName/) {
- ($dummy, $Name) = split(' = ', $_, 9999);
- }
- }
- close ( GET );
- $var = ""; $varlen = 0;
- }
-}
-close( TABLE );
-
-if ($varlen) {
- open( GET, "$SNMPGet -v 1 $Router $Community $var |" );
- while ( <GET> ) {
- chop;
-### printf "+++%s\n", $_;
- if (/up\(1\)/) {
- $buzy++;
- };
-### if (/$UPTIME/) {
- if (/^system\.sysUpTime/) {
- ($dummy, $Uptime) = split(' = ', $_, 9999);
- }
-### if (/$NAME/) {
- if (/^system\.sysName/) {
- ($dummy, $Name) = split(' = ', $_, 9999);
- }
- }
- close ( GET );
-}
-
-printf "$buzy\n";
-printf "0\n"; # Unused
-printf "$Uptime\n";
-printf "$Name\n";
-
diff --git a/src/contrib/GetSNMPLinesUP/INSTALL b/src/contrib/GetSNMPLinesUP/INSTALL
deleted file mode 100644
index 957a646..0000000
--- a/src/contrib/GetSNMPLinesUP/INSTALL
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Read the docs from MRTG :). Learn to use MRTG :).
-
-Change "ADMINDIR" in the Makefile to where you want to put the
-executable and the tables.
-
-Change "$SNMPGet", "$TableBase" and "$Community" in GetSNMPLinesUP.pl
-for your correct values.
-
-See sample.cfg for a sample configuration entry of a machine with some
-modems connected.
-
-See ModemTable.dial-machine for the corresponding variables to check
-in this sample.
-
diff --git a/src/contrib/GetSNMPLinesUP/Makefile b/src/contrib/GetSNMPLinesUP/Makefile
deleted file mode 100644
index c7e6f97..0000000
--- a/src/contrib/GetSNMPLinesUP/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-#
-
-# $Id: Makefile,v 1.1.1.1 2002/02/26 10:16:30 oetiker Exp $
-# $Source: /home/oetiker/data/cvs-repo/AABM-mrtg/contrib/GetSNMPLinesUP/Makefile,v $
-# $Log: Makefile,v $
-# Revision 1.1.1.1 2002/02/26 10:16:30 oetiker
-# Intial Import
-#
-
-ADMINDIR=/home/mrtg/bin
-
-# RCSFILES
-CI = -ci
-CO = -co
-COFLAGS = -l
-
-CC = gcc
-CFLAGS = -O
-LIBS = -lresolv -l44bsd
-
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-
-TARGETS = ModemTable.dial-machine
-
-PROGS = GetSNMPLinesUP.pl
-
-RCSFILES = $(TARGETS) $(PROGS)
-
-all: install
-
-checkin:
- make clean
- $(CI) $(RCSFILES)
- $(CI) -u Makefile
-
-checkout:
- $(CO) $(COFLAGS) $(RCSFILES)
- $(CO) -l Makefile
-
-linux:
- make CFLAGS="-O -DLINUX" LIBS="" all
-
-install: $(PROGS) $(TARGETS)
- install -g staff -m 0644 -o root $(TARGETS) $(ADMINDIR)
- install -g staff -m 0755 -o root $(PROGS) $(ADMINDIR)
-
-clean:
- /bin/rm -f *~ *.o ,* core tmp*
-
diff --git a/src/contrib/GetSNMPLinesUP/ModemTable.dial-machine b/src/contrib/GetSNMPLinesUP/ModemTable.dial-machine
deleted file mode 100644
index 8abbf45..0000000
--- a/src/contrib/GetSNMPLinesUP/ModemTable.dial-machine
+++ /dev/null
@@ -1,18 +0,0 @@
-interfaces.ifTable.ifEntry.ifOperStatus.3
-interfaces.ifTable.ifEntry.ifOperStatus.4
-interfaces.ifTable.ifEntry.ifOperStatus.5
-interfaces.ifTable.ifEntry.ifOperStatus.6
-interfaces.ifTable.ifEntry.ifOperStatus.7
-interfaces.ifTable.ifEntry.ifOperStatus.8
-interfaces.ifTable.ifEntry.ifOperStatus.9
-interfaces.ifTable.ifEntry.ifOperStatus.10
-interfaces.ifTable.ifEntry.ifOperStatus.11
-interfaces.ifTable.ifEntry.ifOperStatus.12
-interfaces.ifTable.ifEntry.ifOperStatus.13
-interfaces.ifTable.ifEntry.ifOperStatus.14
-interfaces.ifTable.ifEntry.ifOperStatus.15
-interfaces.ifTable.ifEntry.ifOperStatus.16
-interfaces.ifTable.ifEntry.ifOperStatus.17
-interfaces.ifTable.ifEntry.ifOperStatus.18
-interfaces.ifTable.ifEntry.ifOperStatus.19
-interfaces.ifTable.ifEntry.ifOperStatus.20
diff --git a/src/contrib/GetSNMPLinesUP/README b/src/contrib/GetSNMPLinesUP/README
deleted file mode 100644
index 3f0bdeb..0000000
--- a/src/contrib/GetSNMPLinesUP/README
+++ /dev/null
@@ -1,34 +0,0 @@
-
- GetSNMPLinesUP.pl
-
- for
-
- MRTG - The Multi Router Traffic Grapher.
-
-
-Copyright (c) 1997 Carlos Canau <canau@EUnet.pt>. All rights reserved.
-
-
-See the file COPYRIGHT in the distribution for the exact terms.
-
-See the file INSTALL for installation instructions.
-
-
-GetSNMPLinesUP.pl checks some SNMP variables for a certain value and
-returns their sum in a format used to feed values to MRTG. This was
-written in RedHat Linux 3.0.3 with a 2.0.29 kernel with perl
-5.003. Other SO's may vary. Use at your own risk :>
-
-As usual no time to write much documentation. As usual read the
-source, send me questions, comments, changes, improvements and
-patches.
-
-
-I have to thank the following people:
-
-- Tobias Oetiker <oetiker@ee.ethz.ch> and Dave Rand <dlr@bungi.com>
-for MRTG.
-
-- Peter W. Osel <pwo@guug.de> from whom I've ripped the README,
-INSTALL and COPYRIGHT file format from his wonderfull mrtg-ping-probe
-:>.
diff --git a/src/contrib/GetSNMPLinesUP/sample.cfg b/src/contrib/GetSNMPLinesUP/sample.cfg
deleted file mode 100644
index 3b7ac10..0000000
--- a/src/contrib/GetSNMPLinesUP/sample.cfg
+++ /dev/null
@@ -1,20 +0,0 @@
-Target[dial-machine]: `/home/mrtg/bin/GetSNMPLinesUP.pl dial-machine`
-WithPeak[dial-machine]: wym
-Directory[dial-machine]: data
-Options[dial-machine]: growright, absolute, gauge
-MaxBytes[dial-machine]: 32
-AbsMax[dial-machine]: 32
-Title[dial-machine]: dial-machine : MODEMS/RDIS
-Unscaled[dial-machine]: dwyn
-YLegend[dial-machine]: Interfaces
-Colours[dial-machine]: GOLD1#ffd700,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
-XSize[dial-machine]: 340
-YSize[dial-machine]: 100
-ShortLegend[dial-machine]: if's
-Legend1[dial-machine]:
-Legend2[dial-machine]: IF's
-Legend3[dial-machine]:
-Legend4[dial-machine]: Maximal 5 Minute IF's UP
-LegendI[dial-machine]:
-LegendO[dial-machine]: &nbsp; if's:
-PageTop[dial-machine]: <H1>Number of Interfaces UP for dial-machine</H1>
diff --git a/src/contrib/IxDisk/README b/src/contrib/IxDisk/README
deleted file mode 100644
index 0f56072..0000000
--- a/src/contrib/IxDisk/README
+++ /dev/null
@@ -1,4 +0,0 @@
-From: Miroslaw.Maczka@bze.com.pl
-
-This is my script for monitoring database activity, database is Informix
-version 5, system is Hewlett-Packard unix (hp-ux), versions 9,10,11.
diff --git a/src/contrib/IxDisk/ixdisk.cfg b/src/contrib/IxDisk/ixdisk.cfg
deleted file mode 100755
index 6f371be..0000000
--- a/src/contrib/IxDisk/ixdisk.cfg
+++ /dev/null
@@ -1,15 +0,0 @@
-IconDir: /MRTG/mrtgicons/
-WorkDir: /opt/hppd/etc/NCSAhttpd/MRTG/ixdisk
-
-Target[ix]: `/opt/MRTG/run/IxDisk/ixdisk.pl`
-Title[ix]: Informix reads and writes from disk
-PageTop[ix]: <H1> Informix reads and writes from disk </H1>
-MaxBytes1[ix]: 2000000000
-MaxBytes2[ix]: 2000000000
-LegendI[ix]: reads&nbsp;
-LegendO[ix]: writes&nbsp;
-Legend1[ix]: reads&nbsp;
-Legend2[ix]: writes&nbsp;
-YLegend[ix]: Informix
-ShortLegend[ix]: #
-
diff --git a/src/contrib/IxDisk/ixdisk.pl b/src/contrib/IxDisk/ixdisk.pl
deleted file mode 100755
index 73e619c..0000000
--- a/src/contrib/IxDisk/ixdisk.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-#
-# Miroslaw M. Maczka: Miroslaw_Maczka@hotmail.com, mmm@bze.com.pl
-# Date 2000-1-6
-#
-open(FI,"/usr/informix/bin/tbstat -p |") or die "";
-
-while(<FI>){
-#if(/RSAM Version 5.04.UC3 -- On-Line -- Up 1 days 21:56:47 -- 10960 Kbytes/){
-if(/.+Version\s+(.+) --\s+(.+)\s+-- Up\s+(.+)\s+--.*/){
-#print "[$1|$2|$3]\n";
-$db="$2 $1";
-$uptime=$3;
-}
-
-
-if(/dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits \%cached/){
-$_=<FI>;
-($dskreads,$pagreads,$bufreads,$cached1,$dskwrits,$pagwrits,$bufwrits,$cached2)=split();
-#print "[$dskreads,$pagreads,$bufreads,$cached1,$dskwrits,$pagwrits,$bufwrits,$cached2]\n";
-#
-#$uname = `/bin/uname -n`;
-print "$dskreads\n$dskwrits\n$uptime\n$db";
-#
-}#if
-
-}#while
-close(FI);
-#-=EOF=-
-
diff --git a/src/contrib/NSI/Mrtg_nsi b/src/contrib/NSI/Mrtg_nsi
deleted file mode 100644
index 472509d..0000000
--- a/src/contrib/NSI/Mrtg_nsi
+++ /dev/null
@@ -1,1189 +0,0 @@
-#! /usr/bin/perl
-# -*- mode: Perl -*-
-BEGIN{
-#$main::OS = 'UNIX';
-$main::OS = 'NT';
-#$main::OS = 'VMS';
-##################################################################
-# MRTG-NSI 1.0 Network Status Imager for MRTG
-##################################################################
-# Created by: Mac Kloberg <mac@nacs.net><mac.kloberg@lam.liebherr.com>
-#
-# WARNING: This thing was developed 'quick and dirty' on WinNT...
-# I've never actually tried this on Unix or VMS, so I
-# don't know if it will work. Guess you'll find out...
-# Send me mail...
-#
-# Built and based on: MRTG by Tobias Oetiker <oetiker@ee.ethz.ch>
-# and Dave Rand <dlr@bungi.com>
-#
-# Credits: THANKS, TOBI AND DAVE!!! K.U.T.G.W.
-#
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-###################################################################
- # The path separator is a slash, backslash or semicolon, depending
- # on the platform.
- $main::SL = {
- UNIX=>'/',
- WINDOWS=>'\\',
- NT=>'\\',
- VMS=>''
- }->{$main::OS};
-
- # The search path separator is a colon or semicolon depending on the
- # operating system.
- $main::PS = {
- UNIX=>':',
- WINDOWS=>';',
- NT=>';',
- VMS=>':'
- }->{$main::OS};
-
- # We need to find the place where mrtg is installed, and
- # then take it from there...
- $main::binpath ="";
- if ($0 =~ /^(.+\Q${main::SL}\E)/) {
- $main::binpath="$1";
- } else {
- foreach $pathname ( split ${main::PS}, $ENV{'PATH'}) {
- if ((($main::OS eq 'NT') &&
- (-e "$pathname${main::SL}$0")) ||
- (-x "$pathname${main::SL}$0")) {
- $main::binpath=$pathname;
- last;
- }
- }
- }
- die "ERROR: Can\'t find location of mrtg executable\n"
- unless $main::binpath;
- unshift (@INC,$main::binpath);
-}
-
-# There older perls tend to behave peculiar with
-# large integers ...
-require 5.003;
-
-if ($main::OS eq 'UNIX' || $main::OS eq 'NT') {
- use GD;
- use Net::SMTP; #requires libnet package to be installed
- #use SNMP_Session "0.71";
- #use BER "0.66";
- #use SNMP_util "0.71";
- use locales_mrtg "0.01";
- use Config;
- #$main::SNMPDEBUG =0;
-}
-
-#Doesn't seem to work very well with the win32 port of GD
-#use strict;
-
-if($main::OS eq 'UNIX')
-{
- my($i) = 0;
- my($name);
-
- foreach $name (split(/ /, $Config{sig_name}))
- {
- $main::signo{$name} = $i;
- $main::signame[$i++] = $name;
- }
-}
-
-$main::DEBUG=1;
-
-
-sub END {
- local($?, $!);
- unlink ${main::Cleanfile} if($main::Cleanfile);
-}
-
-sub main {
-
- my ($router, $target ,$gdstyles, $neweventcounter, $eventcounter, $newevents, $neweventstype);
-
- # unbuffer stdout to see everything immediately
- $|=1 if $main::DEBUG;
-
-
- print "\nMRTG - Network Status Imager loading & initializing...\n\n" if $main::DEBUG;
- my ($routers, $cfg, $rcfg, $cfgfile) = readcfg();
- $target = cfgcheck($routers, $cfg, $rcfg);
-
- print "Locking Config Files...\n";
-
- # Check the config and create the target object
- # lets make sure that there are not two mrtg-nsi's running in parallel.
- # so we lock on the cfg file. Nothing fancy, just a lockfile
- #
- my $lockfile = $cfgfile."_l";
- my $templock = $cfgfile."_l_" . $$ ;
- if ($main::OS eq 'VMS' || $main::OS eq 'NT') {
- # too sad NT and VMS can't do links we'll do the diletants lock
- if (-e $lockfile && not unlink $lockfile){
- my($lockage) = time()-(stat($lockfile))[9];
- die ("ERROR: I guess another mrtg-nsi is running. A lockfile ($lockfile)
- aged $lockage seconds is hanging around and I can't remove
- it because another process is still using it.");
- }
-
- open (LOCK, ">$lockfile") or die "ERROR: Can't create lockfile $lockfile\n";
- print LOCK "$$\n";
- close LOCK;
- open (LOCK, "<$lockfile") or die "ERROR: Can't open lockfile $lockfile for owner check\n";
- my($read)=<LOCK>;
- chomp($read);
- die "ERROR: Someone else just got the lockfile $lockfile\n"
- unless $$ == $read;
- } else {
- # now, lets do it the UNIX way ... Daves work ...
- open(LOCK,">$templock") || die "Can't create templock $templock";
- $main::Cleanfile = $templock;
- if (!link($templock,$lockfile)) { # Lock file exists - deal with it.
- my($nlink,$lockage) = (stat($lockfile))[3,9];
- $lockage = time() - $lockage;
- if ($nlink < 2 || $lockage > 30*60) { #lockfile is alone and old
- unlink($lockfile)
- || do{ unlink $templock;
- die "ERROR: Can't unlink stale lockfile ($lockfile). Permissions?\n"};
-
- link($templock,$lockfile)
- || do{ unlink $templock;
- die "ERROR: Can't create lockfile ($lockfile).\n".
- "Permission problem or another mrtg locking succesfully?\n"};
- }
- else {
- unlink $templock;
- die ("ERROR: I guess another mrtg is running. A lockfile ($lockfile) aged\n".
- "$lockage seconds is hanging around. If you are sure that no other mrtg\n".
- "is running you can remove the lockfile\n");
-
- }
-
- }
- }
-
- #Read the messages
- my($msg) = readmsgfile($$cfg{'msgfile'});
- open (BACKGROUNDIMG,"<$$cfg{'statusmapbackground'}") || die "ERROR: Can't open StatusMapBackGround\n";
- my($ImageData) = newFromGif GD::Image(BACKGROUNDIMG) || die "ERROR: GD::newFromGif\n";
- close BACKGROUNDIMG;
-
- #Allocate colors for this image...
- my %defcolors =
- (#Color allocation table
- 'black', "0,0,0",
- 'red', "255,0,0",
- 'green', "0,255,0",
- 'blue', "0,0,255",
- 'yellow', "255,250,205",
- 'white', "255,0,0"
- );
- %colors = ();
- while(($color, $cvalue) = each(%defcolors)){
- #Try to allocate our color
- if($ImageData->colorAllocate(split(/,/,$cvalue)) ne "-1"){
- $colors{$color} = $ImageData->colorAllocate(split(/,/,$cvalue));
- }else{
- #Didn't work, we'll have to match the closest then
- $colors{$color} = $ImageData->colorClosest(split(/,/,$cvalue));
- }
- }
-
- #Define our linestyles
- $$gdstyles{'linestylec1'}{'style'} = "$colors{'yellow'},$colors{'yellow'},$colors{'yellow'},$colors{'yellow'},$colors{'blue'},$colors{'blue'},$colors{'blue'},$colors{'blue'},gdTransparent,gdTransparent";
- $$gdstyles{'linestylew1'}{'style'} = "$colors{'red'},$colors{'red'},$colors{'red'},$colors{'red'},$colors{'blue'},$colors{'blue'},$colors{'blue'},$colors{'blue'},gdTransparent,gdTransparent";
- $$gdstyles{'linestylea1'}{'style'} = "$colors{'red'},$colors{'red'},$colors{'blue'},$colors{'red'},$colors{'red'},$colors{'red'},$colors{'blue'},$colors{'blue'},gdTransparent,gdTransparent,gdTransparent,gdTransparent,gdTransparent,gdTransparent,gdTransparent,gdTransparent,gdTransparent";
-
- drawtext($ImageData, $gdstyles, $cfg, $rcfg, $routers, $router, "cool", "cool", "", "always", "1", "baxter.x", "baxter.y", "baxtersprings", "black",);
-
- $neweventcounter = 0;
-
- foreach $router (@$routers) {
- my($savetz) = $ENV{'TZ'};
-
- if ($$rcfg{'timezone'}{$router} ne '') {
- $ENV{'TZ'} = $$rcfg{'timezone'}{$router}
- }
-
- print "Imaging node: $router\n";
-
- # set the locale
- my($LOC);
- if( $$cfg{'language'} && defined($lang2tran::LOCALE{"\L$$cfg{'language'}\E"}))
- {
- $LOC=$lang2tran::LOCALE{"\L$$cfg{'language'}\E"};
- }
- else
- {
- $LOC=$lang2tran::LOCALE{'default'};
- };
-
- #Node test...
- if($$cfg{'testnodelocations'} =~ /y/i){
- action_draw_crosshair($ImageData, $cfg, $rcfg, $routers, $router, $$rcfg{'nodecenterx'}{$router},$$rcfg{'nodecentery'}{$router},$black);
- next;
- #Normal node processing
- }else{
- my ($incurrent, $outcurrent, $inlast, $outlast) = getnodevalues($$rcfg{'node'}{$router}, $router, $rcfg, $cfg);
-
- #DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG ---
- #if ($router =~ /NewportNewsEmailX400Kirchdorf/i){
- #$inlast = 0;$incurrent = 50;
- #$inlast = 5000;$incurrent = 100;
- #}
- #DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG --- DEBUG ---
-
- my ($nodeinstatus,$nodeoutstatus) = getnodestatus($incurrent,$outcurrent,$$rcfg{'node'}{$router}, $router, $rcfg, $cfg);
- my ($nodeinlaststatus,$nodeoutlaststatus) = getnodestatus($inlast,$outlast,$$rcfg{'node'}{$router}, $router, $rcfg, $cfg);
-
- print "NodeStatus-Old: $nodeinlaststatus($inlast)/$nodeoutlaststatus($outlast)\n";
- print "NodeStatus-New: $nodeinstatus($incurrent)/$nodeoutstatus($outcurrent)\n";
-
- #Generate events for the log and status-email
- my $ineventid = "";
- my $outeventid = "";
- my $ineventtype = "";
- my $outeventtype = "";
-
- #Cool event (in)
- if($nodeinstatus eq "cool" && $nodeinlaststatus eq "alarm" && defined $$rcfg{'nodeincoolmsgid'}{$router}){$ineventid = lc($$rcfg{'nodeincoolmsgid'}{$router});$ineventtype = "Cool";};
-
- #Cool event (in)
- if($nodeinstatus eq "warning" && $nodeinlaststatus eq "alarm" && defined $$rcfg{'nodeincoolmsgid'}{$router}){$ineventid = lc($$rcfg{'nodeincoolmsgid'}{$router});$ineventtype = "Cool";};
-
- #Warning event (in)
- if($nodeinstatus eq "warning" && $nodeinlaststatus eq "cool" && defined $$rcfg{'nodeinwarningmsgid'}{$router}){$ineventid = lc($$rcfg{'nodeinwarningmsgid'}{$router});$ineventtype = "Warn";};
-
- #Alarm event (in)
- if($nodeinstatus eq "alarm" && ($nodeinlaststatus eq "cool" || $nodeinlaststatus eq "warning") && defined $$rcfg{'nodeinalarmmsgid'}{$router}){$ineventid = lc($$rcfg{'nodeinalarmmsgid'}{$router});$ineventtype = "Alarm";};
-
- #Cool event (out)
- if($nodeoutstatus eq "cool" && $nodeoutlaststatus eq "alarm" && defined $$rcfg{'nodeoutcoolmsgid'}{$router}){$outeventid = lc($$rcfg{'nodeoutcoolmsgid'}{$router});$outeventtype = "Cool";};
-
- #Cool event (out)
- if($nodeoutstatus eq "warning" && $nodeoutlaststatus eq "alarm" && defined $$rcfg{'nodeoutcoolmsgid'}{$router}){$outeventid = lc($$rcfg{'nodeoutcoolmsgid'}{$router});$outeventtype = "Cool";};
-
- #Warning event (out)
- if($nodeoutstatus eq "warning" && $nodeoutlaststatus eq "cool" && defined $$rcfg{'nodeoutwarningmsgid'}{$router}){$outeventid = lc($$rcfg{'nodeoutwarningmsgid'}{$router});$outeventtype = "Warn";};
-
- #Alarm event (out)
- if($nodeoutstatus eq "alarm" && ($nodeoutlaststatus eq "cool" || $nodeoutlaststatus eq "warning") && defined $$rcfg{'nodeoutalarmmsgid'}{$router}){$outeventid = lc($$rcfg{'nodeoutalarmmsgid'}{$router});$outeventtype = "Cool";};
-
- #Log events (in)
- if($ineventid ne ""){
- $newevents[$neweventcounter] = $$msg{$ineventid};
- #Translate variables in the event message
- $newevents[$neweventcounter] = transeventvar($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $newevents[$neweventcounter]);
- #Anybody needs to know about this?
- if($$rcfg{'email'}{lc($ineventtype)}{$router}){
- $neweventstype[$neweventcounter] = "$ineventtype/e";
- sendmail($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $newevents[$neweventcounter],$neweventstype[$neweventcounter],$$rcfg{'nodestatusemailtarget'}{$router});
- }else{
- $neweventstype[$neweventcounter] = $ineventtype;
- }
- $neweventcounter++;
- }
-
- #Log events (out)
- if($outeventid ne ""){
- $newevents[$neweventcounter] = $$msg{$outeventid};
- $neweventstype[$neweventcounter] = $outeventtype;
- #Translate variables in the event message
- $newevents[$neweventcounter] = transeventvar($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $newevents[$neweventcounter]);
- #Anybody needs to know about this?
- if($$rcfg{'email'}{lc($outeventtype)}{$router}){
- $neweventstype[$neweventcounter] = "$outeventtype/e";
- sendmail($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $newevents[$neweventcounter],$neweventstype[$neweventcounter],$$rcfg{'nodestatusemailtarget'}{$router});
- }else{
- $neweventstype[$neweventcounter] = $outeventtype;
- }
- $neweventcounter++;
- }
-
- #Main action loop, the right sequencing is important because of overlappling graphics in the status map
- for ($actioncounter = 0; $actioncounter <= $$rcfg{maxaction}{$router}; $actioncounter++){
- if (exists $$rcfg{"action.$actioncounter"}{$router}) {
- my $action = $$rcfg{"action.$actioncounter"}{$router};
- my @acfunctelements = split(/\(/,$action);
- my $acfunc = $acfunctelements[0];
- #Cleanup the function name
- $acfunc=~s/\s/ /g;
- $acfunc=~s/^ *//g;
- $acfunc=~s/ *$//g;
- $acfunc=lc($acfunc);
- my @acfunctelements = split(/[\(\)]/,$action);
- my @acargs = split(/,/,$acfunctelements[1]);
- #Cleanup the functions arguments and put them in parethesis...
- foreach $acarg (@acargs){
- $acarg=~s/\s/ /g;
- $acarg=~s/^ *//g;
- $acarg=~s/ *$//g;
- $acarg=lc($acarg);
- $acarg="\"$acarg\",";
- }
-
- #Execute Action
- eval("$acfunc(\$ImageData, \$gdstyles, \$cfg, \$rcfg, \$routers, \$router, \$msg, \"$nodeinstatus\", \"$nodeoutstatus\", \"$incurrent\" , \"$outcurrent\", @acargs);");
- die "* Problem with action statement: $acfunc(\$ImageData, \$gdstyles, \$cfg, \$rcfg, \$routers, \$router, \$msg, \"$nodeinstatus\", \"$nodeoutstatus\", \"$incurrent\" , \"$outcurrent\", @acargs);\n" if $@;
- }
- }
- }
-
- #put TZ things back in shape ...
- if ($savetz) {$ENV{'TZ'} = $savetz;} else
- {delete $ENV{'TZ'}};
-
- }
-
- #If there are no events, don't do anything
- if ($neweventcounter > 0){
- #Open current log file and get the old log entries
- open (LOGFILE,"<$$cfg{'workdir'}\\mrtg-nsi.log") || print "WARNING: Couldn't open eventlog file for reading: $$cfg{'workdir'}//mrtg-nsi.log\n";
- my @oldeventloglines = <LOGFILE>;
- close LOGFILE;
-
- #Open eventlog again and add new events
- open (LOGFILE,">$$cfg{'workdir'}\\mrtg-nsi.log") || die "ERROR: Couldn't open eventlog file for writing: $$cfg{'workdir'}//mrtg-nsi.log\n";
- open (HTMLLOG,">$$cfg{'eventlog'}") || die "ERROR: Couldn't open eventlog file for writing: $$cfg{'eventlog'}\n";
-
-
- #Add header to the html-log
- print HTMLLOG "<html>\n";
- print HTMLLOG "\n";
- print HTMLLOG "<head>\n";
- print HTMLLOG "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
- print HTMLLOG "<meta http-equiv=\"Refresh\" CONTENT=\"60\">\n";
- print HTMLLOG "<title>Home Page</title>\n";
- print HTMLLOG "</head>\n";
- print HTMLLOG "\n";
- print HTMLLOG "<body topmargin=\"1\" leftmargin=\"1\" bordercolor=\"#FFFFFF\" bgcolor=\"#FFFFFF\">\n";
- print HTMLLOG "\n";
- print HTMLLOG "<p><strong><font face=\"Arial\" size=\"5\">Network Status Imager: Event Log</font><font\n";
- print HTMLLOG "face=\"Arial\"><br>\n";
- print HTMLLOG "</font></strong><font face=\"Arial\" size=\"1\">NSI v1.0 for MRTG, Created by Mac\n";
- print HTMLLOG "Kloberg <a href=\"mailto:mac.kloberg\@lam.liebherr.com\">&lt;mac.kloberg\@lam.liebherr.com&gt;</a> <a\n";
- print HTMLLOG "href=\"mailto:mac\@nacs.net\">&lt;mac\@nacs.net&gt;</a>)<br>\n";
- print HTMLLOG "Credits to Tobias Oetiker <a href=\"mailto:oetiker\@ee.ethz.ch\">&lt;oetiker\@ee.ethz.ch&gt;</a> and Dave Rand <a\n";
- print HTMLLOG "href=\"mailto:dlr\@bungi.com\">&lt;dlr\@bungi.com&gt;</a>.<br>\n";
- print HTMLLOG "Sofware distributed under the GNU copyleft.";
- print HTMLLOG "<br>\n";
- print HTMLLOG "</font></p>\n";
- print HTMLLOG "\n";
- print HTMLLOG "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"575\" bgcolor=\"#C0C0C0\">\n";
- print HTMLLOG " <tr>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"65\"><strong><font size=\"2\">Date</font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"44\"><strong><font size=\"2\">Time</font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"46\" bgcolor=\"#C0C0C0\" align=\"left\"><strong><font size=\"2\">Type</font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"420\" <font size=\"2\"><strong> <font size=\"2\">Event</font></strong></td>\n";
- print HTMLLOG " </tr>\n";
- print HTMLLOG "</table>\n";
- print HTMLLOG "\n";
- print HTMLLOG "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"1575\"> \n";
-
- for ($logfileeventcounter = 0; $logfileeventcounter <= $$cfg{'eventlogmax'}; $logfileeventcounter++){
-
- #Add new events
- if($logfileeventcounter eq 0){
- for ($neweventlogcounter = 0; $neweventlogcounter < $neweventcounter; $neweventlogcounter++){
- my $shortdatestr = &shortdatestr(time);
- print LOGFILE "$shortdatestr - $neweventstype[$neweventlogcounter] - $newevents[$neweventlogcounter]\n";
- my($htmldate,,$htmltime) = split(/ - /,$shortdatestr);
- print HTMLLOG " <tr>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"56\"><font size=\"2\">$htmldate</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"9\"><font size=\"2\">-</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"44\"><font size=\"2\">$htmltime</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"46\" bgcolor=\"#C0C0C0\" align=\"left\"><font size=\"2\">$neweventstype[$neweventlogcounter]</font></td>\n";
- if($neweventstype[$neweventlogcounter] =~ /cool.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#00FF00\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#00FF00\"><strong><font size=\"2\">$newevents[$neweventlogcounter]\n";
- }
- if($neweventstype[$neweventlogcounter] =~ /warn.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#C0C0C0\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#C0C0C0\"><strong><font size=\"2\">$newevents[$neweventlogcounter]\n";
- }
- if($neweventstype[$neweventlogcounter] =~ /alarm.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#FF0000\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#FF0000\"><strong><font size=\"2\">$newevents[$neweventlogcounter]\n";
- }
- print HTMLLOG " </font></strong></td>\n";
- print HTMLLOG " </tr>\n";
- }
- }
-
- #Add old events
- if($logfileeventcounter > 0 && $oldeventloglines[$logfileeventcounter-1] ne ""){
- print LOGFILE "$oldeventloglines[$logfileeventcounter-1]";
- #print "Writing oldevent ($logfileeventcounter): $oldeventloglines[$logfileeventcounter-1]<br>";
- my($htmldate,$htmltime,$htmleventtype,$htmlevent) = split(/ - /,$oldeventloglines[$logfileeventcounter-1]);
- print HTMLLOG " <tr>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"56\"><font size=\"2\">$htmldate</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"9\"><font size=\"2\">-</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"44\"><font size=\"2\">$htmltime</font></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"46\" bgcolor=\"#C0C0C0\" align=\"left\"><font size=\"2\">$htmleventtype</font></td>\n";
- if($htmleventtype =~ /cool.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#00FF00\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#00FF00\"><strong><font size=\"2\">$htmlevent\n";
- }
- if($htmleventtype =~ /warn.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#C0C0C0\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#C0C0C0\"><strong><font size=\"2\">$htmlevent\n";
- }
- if($htmleventtype =~ /alarm.*/i){
- print HTMLLOG " <td valign=\"top\" nowrap width=\"5\" bgcolor=\"#FF0000\"><strong><font size=\"2\"></font></strong></td>\n";
- print HTMLLOG " <td valign=\"top\" nowrap width=\"1415\" bgcolor=\"#FF0000\"><strong><font size=\"2\">$htmlevent\n";
- }
- print HTMLLOG " </font></strong></td>\n";
- print HTMLLOG " </tr>\n";
- }
- }
- print HTMLLOG "</table>\n";
- print HTMLLOG "</body>\n";
- print HTMLLOG "</html>\n";
-
- close HTMLLOG;
- close LOGFILE;
- }
-
- #Finally, timestamp the image
- my($ImgSizeX,$ImgSizeY) = $ImageData->getBounds;
-
- $Today=&datestr(time);
- my $stampstring = "Network Status Imager for MRTG - $Today";
- my $stringwidth = GD::Font::width(gdSmallFont) * length($stampstring);
- $ImageData->string(gdSmallFont,$ImgSizeX - $stringwidth - 3,$ImgSizeY - 13,"$stampstring",$colors{'black'});
-
- #Write the whole thing to the status map
- open (STATUSMAP,">$$cfg{'workdir'}\\\\$$cfg{statusmapimagename}") || die "ERROR: Couldn't write to status map image $$cfg{'workdir'}\\\\$$cfg{statusmapimagename}";
- binmode STATUSMAP;
- print STATUSMAP $ImageData->gif;
- close STATUSMAP;
-
- # OK we are done, remove the lock files ...
- print "Removing Lockfiles\n";
- close LOCK; unlink ($templock, $lockfile);
- print "\nMRTG - Network Status Imager unloading, gone and done...\n\n" if $main::DEBUG;
-}
-
-main;
-exit(0);
-
-
-
-
-sub readcfg {
- my ($first,$second,$key);
- my (%seen);
- my (@routers);
- my (%rcfg,%cfg,%pre,%post,%deflt,%defaulted);
- my ($cfgfile) = pop(@ARGV);
- open (CFG, $cfgfile) || do { print "ERROR: unable to open config file: $cfgfile\n\n"; &printusage };
- while (<CFG>) {
- s/\s+$//g; #remove whitespace at the end of the line
- s/\s/ /g; #replace whitespace by space
- next if /^\s*\#/; #ignore comment lines
- next if /^\s*$/; #ignore empty lines
- # oops spelling error
- s/^supress/suppress/gi;
-
- #Trashcan leading zeros in action statements
- s/^action\.0+/action\./gi;
-
- #Also lets record the number of the highest action given for later
- if ($first =~ /^action.+/){
- $actionnumber = $first;
- $actionnumber =~ s/action\.//gi;
- if($actionnumber > $rcfg{'maxaction'}{$second}){
- $rcfg{'maxaction'}{$second} = $actionnumber;
- }
- }
-
- # append mode
- if ($first && /^\s+(.*\S)\s*$/) {
- if ($second eq '^') {
- $pre{$first} .= " $1";
- next;
- }
- if ($second eq '$' ) {
- $post{$first} .= " $1";
- next;
- }
- if ($second eq '_') {
- $deflt{$first} .= " $1";
- next;
- }
-
- if ($second) {
- $rcfg{$first}{$second} .= " $1";
- } else {
- $cfg{$first} .= " $1";
- }
- next;
- }
-
- if ($first && $second && $post{$first} && ($second !~ /^[\$^_]$/)) {
- if ($defaulted{$first}{$second}) {
- $rcfg{$first}{$second} = $post{$first};
- delete $defaulted{$first}{$second};
- } else {
- $rcfg{$first}{$second} .= " $post{$first}"
- }
- }
-
- if ($first && exists $deflt{$first} && ($second eq '_')) {
- &quickcheck($first,$second,$deflt{$first},$.)
- } elsif ($first && $second && ($second !~ /^[\$^_]$/)) {
- &quickcheck($first,$second,$rcfg{$first}{$second},$.)
- } elsif ($first && ($second !~ /^[\$^_]$/)) {
- &quickcheck($first,0,$cfg{$first},$.)
- }
-
- if (/^([A-Za-z0-9\.]+)\[(\S+)\]\s*:\s*(.*\S?)\s*$/) {
- print "readcfg: rcfg $1 $2 = $3\n" if $main::DEBUG > 1;
-
- $first = lc($1);
- $second = lc($2);
- if ($second eq '^')
- { if ($3 ne '') {$pre{$first}=$3} else {delete $pre{$first}}; next; }
- if ($second eq '$')
- { if ($3 ne '') {$post{$first}=$3} else {delete $post{$first}}; next; }
- if ($second eq '_')
- { if ($3 ne '') {$deflt{$first}=$3} else {delete $deflt{$first}}; next; }
-
- push (@routers, $second) unless grep (/^$second$/, @routers);
-
- # make sure that default tags spring into existance upon first
- # call of a router
-
- foreach $key (keys %deflt) {
- if (! exists $rcfg{$key}{$second}) {
- $rcfg{$key}{$second} = $deflt{$key};
- $defaulted{$key}{$second} = 1;
- }
- }
-
- # make sure that prefix-only tags spring into existance upon first
- # call of a router
-
- foreach $key (keys %pre) {
- if (! exists $rcfg{$key}{$second}) {
- delete $defaulted{$key}{$second} if $defaulted{$key}{$second};
- $rcfg{$key}{$second} = "$pre{$key} ";
- }
- }
-
- if ($seen{$first}{$second}) {
- die ("\nLine $. in CFG file contains a duplicate definition for\n".
- "$first\[$second]. First definition is on line $seen{$first}{$second}\n")
- } else {
- $seen{$first}{$second} = $.;
- }
-
- if ($defaulted{$first}{$second}) {
- $rcfg{$first}{$second} = '';
- delete $defaulted{$first}{$second};
- }
- $rcfg{$first}{$second} .= $3;
-
- next;
-
- }
- if (/^(\S+):\s*(.*\S)\s*$/) {
- $first = lc($1);
- $cfg{$first} = $2;
- $second = '';
- next;
- }
- die ( "\nLine $. in CFG file does not make sense\n" );
- }
-
- # append $ stuff to the very last tag in cfg file if necessary
- if ($first && $second && $post{$first} && ($second !~ /^[\$^_]$/)) {
- if ($defaulted{$first}{$second}) {
- $rcfg{$first}{$second} = $post{$first};
- delete $defaulted{$first}{$second};
- } else {
- $rcfg{$first}{$second} .= " $post{$first}"
- }
- }
-
- #Tobi, I don't know how you did this, but this is something else:
- #Get highest action number for the last line in the config file...
- if ($first =~ /^action.+/){
- $actionnumber = $first;
- $actionnumber =~ s/action\.//gi;
- if($actionnumber > $rcfg{'maxaction'}{$second}){
- $rcfg{'maxaction'}{$second} = $actionnumber;
- }
- }
-
- #check the last input line
- if ($first && exists $deflt{$first} && ($second eq '_')) {
- &quickcheck($first,$second,$deflt{$first},$.)
- } elsif ($first && $second) {
- &quickcheck($first,$second,$rcfg{$first}{$second},$.)
- } elsif ($first) {
- &quickcheck($first,0,$cfg{$first},$.)
- }
-
- close (CFG);
- (\@routers, \%cfg, \%rcfg, $cfgfile);
-}
-
-
-sub cfgcheck {
- my ($routers, $cfg, $rcfg) = @_;
- my ($rou, $confname, $one_option);
- my %node;
- my $error="no";
- my(@known_options) = qw(alarmifnull);
- if (! $$cfg{workdir}) {
- warn ("\nERROR: \"WorkDir\" not specified\n");
- $error = "yes";
- }
-
- foreach $rou (@$routers) {
- if ($$rcfg{'directory'}{$rou})
- {
- # They specified a directory for this router. Append the
- # pathname seperator to it (so that it can either be present or
- # absent, and the rules for including it are the same).
- $$rcfg{'directory'}{$rou} .= ${main::SL};
- # remove any stray spaces ...
- $$rcfg{'directory'}{$rou} =~ s/\s//g;
- }
-
- # Configure e-mail notification for this node
- if (defined($$rcfg{'nodestatusemail'}{$rou})){
- if($$rcfg{'nodestatusemailtarget'}{$rou} ne ""){
- if($$rcfg{'nodestatusemail'}{$rou} =~ /[^cwa *]/i ){
- warn ("\nERROR: NodeStatusEmail[$rou]: \"$$rcfg{'nodestatusemail'}{$rou}\" contains invalid options [cwa].\n");
- $error="yes";
- }else{
- if($$rcfg{'nodestatusemail'}{$rou} =~ /c/i ){
- $$rcfg{'email'}{'cool'}{$rou} = 1;
- }
- if($$rcfg{'nodestatusemail'}{$rou} =~ /w/i ){
- $$rcfg{'email'}{'warn'}{$rou} = 1;
- }
- if($$rcfg{'nodestatusemail'}{$rou} =~ /a/i ){
- $$rcfg{'email'}{'alarm'}{$rou} = 1;
- }
- }
- }else{
- warn ("\nERROR: NodeStatusEmail[$rou]: \"$$rcfg{'nodestatusemail'}{$rou}\" is given but no NodeStatusEmailTarget[$rou] was found.\n");
- $error="yes";
- }
- }
-
- if (exists $$rcfg{"options"}{$rou}) {
- foreach $one_option (split /[,\s]+/, lc($$rcfg{"options"}{$rou})) {
- if (grep {$one_option eq $_} @known_options) {
- $$rcfg{'options'}{$one_option}{$rou} = 1;
- } else {
- warn ("\nERROR: Option[$rou]: \"$one_option\" is unknown\n");
- $error="yes";
- }
- }
- }
-
- if ($error eq "yes") {
- die ("\n\nABORT: Please fix the error(s) in your config file\n\n");
- }
- }
- \%node;
-}
-
-sub quickcheck {
- my ($first,$second,$arg,$line) = @_;
- my %rules =
- (# General CFG
- 'workdir' =>
- ['$arg && (-d $arg)','"Directory $arg does not exist"'],
-
- 'eventlog' =>
- ['$arg','"Eventlog path is missing"'],
-
- 'eventlogmax' =>
- ['$arg =~ /\d+/','"You must specify a value"'],
-
- 'icondir' =>
- ['$arg && (-d $arg)','"Directory $arg does not exist"'],
-
- 'statusmapbackground' =>
- ['$arg && (-f $arg)','"Image file $arg does not exist"'],
-
- 'statusmapimagename' =>
- ['$arg','"Target image name is missing"'],
-
- 'imgsourcedir' =>
- ['$arg && (-d $arg)','"Directory $arg does not exist"'],
-
- 'msgfile' =>
- ['$arg && (-f $arg)','"Message file $arg does not exist"'],
-
- 'statusemailorigin' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'refresh' =>
- ['int($arg) >= 300', '"$arg should be 300 seconds or more"'],
-
- 'interval' =>
- ['int($arg) >= 5','"$arg should be more than 5 Minutes"'],
-
- 'testnodelocations' =>
- ['$arg =~ /[ynYN]/','"This option is either y or n"'],
-
- #Nodes CFG
- 'node[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodecenterx[]' =>
- ['int($arg) >= 0', '"$arg <-- Value cannot be negative"'],
-
- 'nodecentery[]' =>
- ['int($arg) >= 0', '"$arg <-- Value cannot be negative"'],
-
- 'nodealarmthreshhold[]' =>
- ['$arg =~ /\d+/','"You must specify a value"'],
-
- 'nodewarningthreshhold[]' =>
- ['$arg =~ /\d+/','"You must specify a value"'],
-
- 'nodeincoolmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodeinwarningmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodeinalarmmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodeoutcoolmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodeoutwarningmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodeoutalarmmsgid[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodestatusemail[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'nodestatusemailtarget[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
-
- 'options[]' =>
- ['1','"Internal Error"'],
-
- 'action[]' =>
- ['$arg =~ /\w+/','"You must specify something for this option"'],
- );
-
- my $braces = $second ? '[]':'';
-
- #The actions are different from the other options
- if ($first =~ /^action.+/){
- if ($first =~ /action.\d*/) {
- return 1;
- }
- }elsif (exists $rules{$first.$braces}) {
- if (eval($rules{$first.$braces}[0])) {
- return 1;
- } else {
- if ($second) {
- die "\nCFG Error in \"$first\[$second\]\", line $line: ".
- eval($rules{$first.$braces}[1])."\n\n";
- } else {
- die "\nCFG Error in \"$first\", line $line: ".
- eval($rules{$first.$braces}[1])."\n\n";
- }
- }
- }
- die "\nCFG Error: Unknown Option \"$first\" on line $line or above.\n".
- " Check readme.html for Help\n\n";
-}
-
-sub readmsgfile {
- my ($msgfile) = @_;
- my ($first,$second,$key);
- my (%seen);
- my (%rmsg,%msg,%pre,%post);
-
- open (MSGFILE, $msgfile) || do { print "ERROR: unable to open message file: $msgfile\n\n"};
- while (<MSGFILE>) {
- s/\s+$//g; #remove whitespace at the end of the line
- s/\s/ /g; #replace whitespace by space
- next if /^\s*\#/; #ignore comment lines
- next if /^\s*$/; #ignore empty lines
-
- # append mode
- if ($first && /^\s+(.*\S)\s*$/) {
- if ($second eq '^') {
- $pre{$first} .= " $1";
- next;
- }
- if ($second eq '$' ) {
- $post{$first} .= " $1";
- next;
- }
-
- if ($second) {
- $rmsg{$first}{$second} .= " $1";
- } else {
- $msg{$first} .= " $1";
- }
- next;
- }
-
- if (/^(\S+):\s*(.*\S)\s*$/) {
- $first = lc($1);
- $msg{$first} = $2;
- $second = '';
- next;
- }
- die ( "\nLine $. in MSGFILE file does not make sense\n" );
- }
-
- close (MSGFILE);
- (\%msg);
-}
-
-
-sub action_draw_crosshair {
- #This one draws a crosshair symbol
- my($ImageData, $cfg, $rcfg, $routers, $router, $cox, $coy,$color) = @_;
-
- $cox = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, $cox);
- $cox = $cox + nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, $$rcfg{'nodelabeloffsetx'}{$router});
-
- $coy = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, $coy);
- $coy = $coy + nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, $$rcfg{'nodelabeloffsety'}{$router});
-
- #Draw the crosshair...
- $ImageData->arc($cox,$coy,30,30,0,360,$color);
- $ImageData->arc($cox,$coy,20,20,0,360,$color);
- $ImageData->arc($cox,$coy,10,10,0,360,$color);
- $ImageData->line($cox-17,$coy,$cox+17,$coy,$color);
- $ImageData->line($cox,$coy-17,$cox,$coy+17,$color);
-}
-
-sub datestr {
- my ($time) = shift(@_) || return 0;
- my ($wday) = ('Sunday','Monday','Tuesday','Wednesday',
- 'Thursday','Friday','Saturday')[(localtime($time))[6]];
- my ($month) = ('January','February' ,'March' ,'April' ,
- 'May' , 'June' , 'July' , 'August' , 'September' ,
- 'October' ,
- 'November' , 'December' )[(localtime($time))[4]];
- my ($mday,$year,$hour,$min,$sec) = (localtime($time))[3,5,2,1,0];
- if ($min<10) {$min = "0$min";}
- if ($sec<10) {$sec = "0$sec";}
- return "$wday, $month $mday, ".($year+1900)." - $hour:$min:$sec";
-}
-
-sub shortdatestr {
- my ($time) = shift(@_) || return 0;
- my ($mday,$month,$year,$hour,$min,$sec) = (localtime($time))[3,4,5,2,1,0];
- $month++;
- if ($min<10) {$min = "0$min";}
- if ($sec<10) {$sec = "0$sec";}
- return "$month/$mday/".($year+1900)." - $hour:$min:$sec";
-}
-
-sub nsi_eval {
- #Replace references to other nodes and evaluate expressions
- my($ImageData, $cfg, $rcfg, $routers, $router, $evali) = @_;
-
- #Replace .xy-references to other nodes
- foreach $eval_node (@$routers) {
-
- my $lceval_node = lc($eval_node);
-
- #Replace "node.x"
- $evali =~ s/[\W]$lceval_node\.x/$$rcfg{'nodecenterx'}{$eval_node}/gie;
- $evali =~ s/^$lceval_node\.x/$$rcfg{'nodecenterx'}{$eval_node}/gie;
-
- #Replace "node.y"
- $evali =~ s/[\W]$lceval_node\.y/$$rcfg{'nodecentery'}{$eval_node}/gie;
- $evali =~ s/^$lceval_node\.y/$$rcfg{'nodecentery'}{$eval_node}/gie;
- }
-
- #If something else expanded from the nodecenter, evaluate that too...
- $evali = lc($evali);
- foreach $eval_node (@$routers) {
-
- my $lceval_node = lc($eval_node);
-
- #Replace "node.x"
- $evali =~ s/[\W]$lceval_node\.x/$$rcfg{'nodecenterx'}{$eval_node}/gie;
- $evali =~ s/^$lceval_node\.x/$$rcfg{'nodecenterx'}{$eval_node}/gie;
-
- #Replace "node.y"
- $evali =~ s/[\W]$lceval_node\.y/$$rcfg{'nodecentery'}{$eval_node}/gie;
- $evali =~ s/^$lceval_node\.y/$$rcfg{'nodecentery'}{$eval_node}/gie;
- }
-
- #Evaluate and format the expression
- $evali = sprintf("%.0f",eval($evali));
- return $evali;
-}
-
-sub getnodevalues {
- my ($target, $rou, $rcfg, $cfg) = @_;
-
- my $period = 0;
- my $lastperiod = 0;
- my $incurrent=0;
- my $outcurrent=0;
- my $inlast = 0;
- my $outlast = 0;
-
- open (LOG, "<$$cfg{'workdir'}\\\\$target.log") or die "ERROR: Can't open .log file for this node: $target\n";
- my($counterline,$line,$lastline) = <LOG>;
- ($period,$incurrent,$outcurrent)=split(/\D/,$line);
- ($lastperiod,$inlast,$outlast)=split(/\D/,$lastline);
- close LOG;
-
- #Check the period (if we're too far out, we've probably lost contact with the node)
- $time = time unless defined $time;
-
- my($timediff)=$time - $period;
-
- #Give it 2 more minutes, then report the node as down
- if($timediff > $$cfg{'interval'} * 60 + 120){
- $incurrent = -1;
- $outcurrent = -1;
- }
- ($incurrent, $outcurrent, $inlast, $outlast);
-}
-
-sub getnodestatus{
- my ($incurrent,$outcurrent,$target, $router, $rcfg, $cfg) = @_;
-
- my $nodeinstatus = "cool";
- my $nodeoutstatus = "cool";
-
- #Node down?
- if($incurrent eq -1){
- $nodeinstatus = "alarm";
- $nodeoutstatus = "alarm";
- }else{
- #Which direction are we looking?
- if($$rcfg{'nodealarmthreshhold'}{$router} >= $$rcfg{'nodewarningthreshhold'}{$router}){
- #Straight forward
- if($incurrent > $$rcfg{'nodewarningthreshhold'}{$router}){
- $nodeinstatus = "warning";
- }
- if($outcurrent > $$rcfg{'nodewarningthreshhold'}{$router}){
- $nodeoutstatus = "warning";
- }
- if($incurrent > $$rcfg{'nodealarmthreshhold'}{$router}){
- $nodeinstatus = "alarm";
- }
- if($outcurrent > $$rcfg{'nodealarmthreshhold'}{$router}){
- $nodeoutstatus = "alarm";
- }
- }else{
- #Backwards
- if($incurrent < $$rcfg{'nodewarningthreshhold'}{$router}){
- $nodeinstatus = "warning";
- }
- if($outcurrent < $$rcfg{'nodewarningthreshhold'}{$router}){
- $nodeoutstatus = "warning";
- }
- if($incurrent < $$rcfg{'nodealarmthreshhold'}{$router}){
- $nodeinstatus = "alarm";
- }
- if($outcurrent < $$rcfg{'nodealarmthreshhold'}{$router}){
- $nodeoutstatus = "alarm";
- }
- }
- }
-
- #Check for nulls
- if($$rcfg{'options'}{'alarmifnull'}{$router}){
- if($incurrent eq "0"){
- $nodeinstatus = "alarm";
- }
- if($outcurrent eq "0"){
- $nodeoutstatus = "alarm";
- }
- }
- ($nodeinstatus,$nodeoutstatus);
-}
-
-sub drawnodeline{
- my ($ImageData, $gdstyles, $cfg, $rcfg, $routers, $router, $msg, $nodeinstatus, $nodeoutstatus, $incurrent, $outcurrent, $direction, $cond, $source, $destination, $style) = @_;
-
- #Expand our numeric arguments
- my $sourcex = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$source.x");
- my $sourcey = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$source.y");
- my $destinationx = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$destination.x");
- my $destinationy = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$destination.y");
-
- my $absnodestatus = "$direction$cond";
- my $absnodeinstatus = "in$nodeinstatus";
- my $absnodeoutstatus = "out$nodeoutstatus";
-
- #Draw something depending on the node's status
- if ($absnodestatus eq $absnodeinstatus || $absnodestatus =~ /always/i){
- $ImageData->setStyle(split(/,/,$$gdstyles{$style}{'style'}));
- #$ImageData->setStyle($$gdstyles{$style}{'style'});
- $ImageData->line($sourcex,$sourcey,$destinationx,$destinationy,gdStyled);
- }
-
-}
-
-sub copyimage{
- my ($ImageData, $gdstyles, $cfg, $rcfg, $routers, $router, $msg, $nodeinstatus, $nodeoutstatus, $incurrent, $outcurrent, $direction, $cond, $image, $coordx, $coordy) = @_;
- #Expand our numeric arguments
-
- my $coordx = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordx");
- my $coordy = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordy");
-
- my $absnodestatus = "$direction$cond";
- my $absnodeinstatus = "in$nodeinstatus";
- my $absnodeoutstatus = "out$nodeoutstatus";
-
- #Draw something depending on the node's status
- if ($absnodestatus eq $absnodeinstatus || $absnodestatus =~ /always/i){
- open (SRCIMG,"<$$cfg{'icondir'}\\\\$image") || die "ERROR: Can't open source image for copy: $$cfg{'icondir'}\\\\$image\n";
- my($srcImageData) = newFromGif GD::Image(SRCIMG) || die "ERROR: GD::newFromGif\n";
- close SRCIMG;
- my($srcImgDataSizeX,$srcImgDataSizeY) = $srcImageData->getBounds;
- $ImageData->copy($srcImageData,$coordx,$coordy,0,0,$srcImgDataSizeX,$srcImgDataSizeY);
- }
-}
-
-
-sub multicopyimage{
- my ($ImageData, $gdstyles, $cfg, $rcfg, $routers, $router, $msg, $nodeinstatus, $nodeoutstatus, $incurrent, $outcurrent, $direction, $cond, $image, $coordx, $coordy, $howoften, $minoften, $maxoften, $stepsize, $angle) = @_;
- #Expand our numeric arguments
-
- print "Coordinates: $coordx/$coordy\n";
-
- my $coordx = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordx");
- my $coordy = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordy");
- my $howoften = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$howoften");
-
- print "Coordinates: $coordx/$coordy\n";
-
- if ($howoften < $minoften){
- $howoften = $minoften;
- }
- if ($howoften > $maxoften){
- $howoften = $maxoften;
- }
-
- my $absnodestatus = "$direction$cond";
- my $absnodeinstatus = "in$nodeinstatus";
- my $absnodeoutstatus = "out$nodeoutstatus";
-
- #Draw something depending on the node's status
- if ($absnodestatus eq $absnodeinstatus || $absnodestatus =~ /always/i){
- open (SRCIMG,"<$$cfg{'icondir'}\\\\$image") || die "ERROR: Can't open source image for copy: $$cfg{'icondir'}\\\\$image\n";
- my($srcImageData) = newFromGif GD::Image(SRCIMG) || die "ERROR: GD::newFromGif\n";
- close SRCIMG;
-
- my($srcImgDataSizeX,$srcImgDataSizeY) = $srcImageData->getBounds;
- my $rad = ($angle * 3.141592654) / 180;
-
- if ($stepsize >= 0){
- for($multicounter = 0; $multicounter < $howoften; $multicounter++){
- my $hyp = $multicounter * $stepsize;
- my $a = sprintf("%.0f",sin($rad) * $hyp);
- my $b = sprintf("%.0f",cos($rad) * $hyp);
- #print "Angle: $angle, Rad: $rad, a: $a, b: $b\n";
- $ImageData->copy($srcImageData,$coordx + $b,$coordy - $a,0,0,$srcImgDataSizeX,$srcImgDataSizeY);
- }
- }else{
- $stepsize = abs($stepsize);
- for($multicounter = $howoften - 1; $multicounter >= 0; $multicounter--){
- my $hyp = $multicounter * $stepsize;
- my $a = sprintf("%.0f",sin($rad) * $hyp);
- my $b = sprintf("%.0f",cos($rad) * $hyp);
- #print "Angle: $angle, Rad: $rad, a: $a, b: $b\n";
- $ImageData->copy($srcImageData,$coordx + $b,$coordy - $a,0,0,$srcImgDataSizeX,$srcImgDataSizeY);
- }
- }
- }
-}
-
-
-sub drawtext{
- my ($ImageData, $gdstyles, $cfg, $rcfg, $routers, $router, $msg, $nodeinstatus, $nodeoutstatus, $incurrent, $outcurrent, $direction, $cond, $font, $coordx, $coordy, $textid, $color) = @_;
- #Expand our numeric arguments
- my $coordx = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordx");
- my $coordy = nsi_eval($ImageData, $cfg, $rcfg, $routers, $router, "$coordy");
-
- my $absnodestatus = "$direction$cond";
- my $absnodeinstatus = "in$nodeinstatus";
- my $absnodeoutstatus = "out$nodeoutstatus";
-
- #Draw something depending on the node's status
- if ($absnodestatus eq $absnodeinstatus || $absnodestatus =~ /always/i){
- if(!defined($$msg{$textid})){
- $$msg{$textid} = "MSG not defined!";
- }
- if($font eq 1){$ImageData->string(gdTinyFont,$coordx,$coordy,$$msg{$textid},$colors{$color});}
- if($font eq 2){$ImageData->string(gdSmallFont,$coordx,$coordy,$$msg{$textid},$colors{$color});}
- if($font eq 3){$ImageData->string(gdMediumBoldFont,$coordx,$coordy,$$msg{$textid},$colors{$color});}
- if($font eq 4){$ImageData->string(gdLargeFont,$coordx,$coordy,$$msg{$textid},$colors{$color});}
- }
-}
-
-sub transeventvar{
- my ($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $transstring) = @_;
-
-
- my @transsplit = split(/\$/,$transstring);
- my $maxelements = $transsplit;
-
- print "MAXELEMNTS: $transstring\n";
-
- for ($transcounter = 0; $transcounter <= $maxelements; $transcounter++){
- $transstring =~ s/\$NodeWarningThreshhold/$$rcfg{nodewarningthreshhold}{$router}/i;
- $transstring =~ s/\$NodeAlarmThreshhold/$$rcfg{nodealarmthreshhold}{$router}/i;
- $transstring =~ s/\$NodeIn/$incurrent/i;
- $transstring =~ s/\$NodeOut/$outcurrent/i;
- }
-
- return $transstring;
-}
-
-sub sendmail{
- my ($cfg, $rcfg, $routers, $router, $incurrent, $outcurrent, $event, $eventtype, $address) = @_;
- print "Sending e-mail to: $address from $$cfg{'statusemailorigin'}\n";
-
- my $smtp = Net::SMTP->new('hampton.lam.liebherr.com'); # connect to an SMTP server
-
- foreach $target (split(/;/,$address)){
- $smtp->mail( $$cfg{'statusemailorigin'} ); # use the sender's address here
- $smtp->to($target); # recipient's address
- $smtp->data(); # Start the mail
-
- # Send the header.
- $smtp->datasend("To: $address\n");
- $smtp->datasend("From: $$cfg{'statusemailorigin'}\n");
- $smtp->datasend("Subject: $eventtype on Node \"$router\"\n");
- $smtp->datasend("\n");
-
- # Send the body.
- $smtp->datasend("$event\n");
- $smtp->datasend("\n");
- $smtp->datasend("\n");
- $smtp->datasend("*******************************************************\n");
- $smtp->datasend("*** This was an automated network status update ***\n");
- $smtp->datasend("*** message generated by: ***\n");
- $smtp->datasend("*** NSI v1.0 for MRTG, Created by Mac Kloberg ***\n");
- $smtp->datasend("*** <mac.kloberg\@lam.liebherr.com> <mac\@nacs.net> ***\n");
- $smtp->datasend("*******************************************************\n");
- $smtp->dataend(); # Finish sending the mail
- }
- $smtp->quit; # Close the SMTP connection
-}
-
diff --git a/src/contrib/NSI/Mrtg_nsi.cfg b/src/contrib/NSI/Mrtg_nsi.cfg
deleted file mode 100644
index 8dbefd1..0000000
--- a/src/contrib/NSI/Mrtg_nsi.cfg
+++ /dev/null
@@ -1,393 +0,0 @@
-######################################################################
-# Network Status Imager for MRTG -- Example Configuration File
-######################################################################
-#
-# * copy this file to ../run and call it mrtg-nsi.cfg
-#
-# Note:
-#
-# * Keywords must start at the begin of a line.
-#
-# * Lines which follow a keyword line which do start
-# with a blank are appended to the keyword line
-#
-# * Empty Lines are ignored
-#
-# * Lines starting with a # sign are comments.
-
-
-# ####################
-# Global Configuration
-# ####################
-
-# Where should the images be created? (Also location of the mrtg .log files)
-
-WorkDir: C:\\InetPub\\wwwroot\\mrtg
-
-
-# Where should your event-log page be created?
-
-EventLog: C:\\InetPub\\wwwroot\\mrtg\\mrtg-nsi-log.html
-
-# The maximum number of events kept in the event-log
-
-EventLogMax: 300
-
-
-# What should the status map image be called?
-
-StatusMapImageName: map.gif
-
-
-# What is the main background image called?
-
-StatusMapBackGround: C:\\InetPub\\wwwroot\\mrtg\\mrtg_nsi-images\\sourcemap.gif
-
-
-# Where are your icons stored?
-
-IconDir: C:\\InetPub\\wwwroot\\mrtg\\mrtg_nsi-images
-
-
-# What is the absolute path to your message file
-
-MsgFile: C:\\InetPub\\mrtg\\run\\mrtg-nsi-msg.txt
-
-
-# What should be in the from field when sending out status e-mails?
-StatusEmailOrigin: mrtg-nsi.status-monitor@liebherr-us.com
-
-# --------------------------
-# Optional Global Parameters
-# --------------------------
-
-# How often do you call mrtg-nsi? The default is 5 minutes. If
-# you call it less often, you should specify it here. This
-# is to recoginze when we lost contact with a device.
-
-Interval: 5
-
-# If you want to keep the mrtg-nsi source images in some place other than the
-# working directory, use the ImgSourceDir varibale to give its url.
-
-ImgSourceDir: C:\\InetPub\\wwwroot\\mrtg\\mrtg_nsi-images
-
-# To precisely locate your nodes on the map, this parameter allows you
-# to >ONLY< display a crosshair centered on the loaction of each particular node.
-
-TestNodeLocations: n
-
-
-# #################################################
-# Configuration for each Note you want to image
-# #################################################
-
-# The configuration keywords "Node" must be followed by a
-# unique name.
-
-##
-## Options ------------------------------------------
-##
-
-# The "Options" Keyword allows you to set some boolean
-# switches:
-#
-# AlarmIfNull - Sometimes a node needs to be recognized as in In, Alarm state when
-# mrtg reports zero (use with "mrtg-ping-probe").
-
-##
-## A note about colors ------------------------------
-##
-#
-# .gif's always have a so called color table inside of them. Basically
-# a database of RGB values that have been allocated to the image already.
-# The problem with that is this: If the color table already has 255 entries
-# (and that's all a gif image takes) you'll see the following phenomenon:
-# Nsi will try to match the colors it produces itself by going though
-# the color pallette of the image, the result might sometimes look funny,
-# because it wasn't able to allocate the colors as close as you would have
-# expected it (they simply where not there)...
-# There is something you can do about this though: When you makeup the background
-# image for your status map, simply leave about 16 colors un-allocated... OR
-# put a small allocator bar in a corner that has the size of 16x1 pixels and
-# put 16 colored dots in there with the system colors...
-#
-
-##
-## A note about events, status log entries and e-mails -
-##
-#
-# It is imperative that you run mrtg-nsi right after mrtg itself and NOT more
-# often than that, which is nonsense anyways, because the data nsi collects
-# from mrtg won't change during that period of course. Bad configurations are for example to
-# have nsi run in it's own cron or nt-at entry which could put it out of sync.
-# Best is to call mrtg through some type of shell script that has mrtg-nsi as
-# the next thing to do...
-# I'm mentioning this here because what is going to happen is this: Since nsi
-# triggers its events, subsequently log entries and status e-mails by looking
-# at the previous period in the mrtg logs and comparing it with the current
-# period, classifying the values as normal,warning or alert. When it does that,
-# it looks for a change in status and will trigger the event if there is a change.
-# The result is that you will get the same log entries/status e-mails twice or even more
-# often, depending on how often you run it between the period of time that mrtg
-# itself updates its data... This is not what you want, hard to track down and
-# this is why I mention this here.
-#
-
-##
-## Network Nodes ----------------------------------------
-##
-
-Node[Saline]: cisco01.ping.lgt.liebherr.com
-NodeCenterX[Saline]: 386
-NodeCenterY[Saline]: 124
-NodeWarningThreshhold[Saline]: 1300
-NodeAlarmThreshhold[Saline]: 5000
-NodeInCoolMsgID[Saline]: Saline0050
-NodeInWarningMsgID[Saline]: Saline0051
-NodeInAlarmMsgID[Saline]: Saline0052
-NodeStatusEmail[Saline]: cwa
-NodeStatusEmailTarget[Saline]: mac.kloberg@lam.liebherr.com; chris.rock@lgt.liebherr.com
-Options[Saline]: AlarmIfNull
-Action.000100[Saline]: DrawNodeLine(In, Cool, NewportNews, Saline, LineStyleC1)
-Action.000200[Saline]: DrawNodeLine(In, Warning, NewportNews, Saline, LineStyleW1)
-#Action.000300[Saline]: DrawNodeLine(In, Alarm, NewportNews, Saline, LineStyleA1)
-Action.000900[Saline]: CopyImage(, Always, network1.gif, Saline.x - 16, Saline.y - 18)
-Action.000910[Saline]: DrawText(, Always,3,Saline.x-20,Saline.y+12,Saline0001,black)
-Action.000911[Saline]: DrawText(, Always,3,Saline.x-24,Saline.y+22,Saline0002,black)
-
-Node[Toronto]: cisco-lca-1.ping.lca.liebherr.com
-NodeCenterX[Toronto]: 447
-NodeCenterY[Toronto]: 96
-NodeWarningThreshhold[Toronto]: 1300
-NodeAlarmThreshhold[Toronto]: 5000
-NodeInCoolMsgID[Toronto]: Toronto0050
-NodeInWarningMsgID[Toronto]: Toronto0051
-NodeInAlarmMsgID[Toronto]: Toronto0052
-NodeStatusEmail[Toronto]: cwa
-NodeStatusEmailTarget[Toronto]: mac.kloberg@lam.liebherr.com
-Options[Toronto]: AlarmIfNull
-Action.000100[Toronto]: DrawNodeLine(In, Cool, NewportNews, Toronto, LineStyleC1)
-Action.000200[Toronto]: DrawNodeLine(In, Warning, NewportNews, Toronto, LineStyleW1)
-#Action.000300[Toronto]: DrawNodeLine(In, Alarm, NewportNews, Toronto, LineStyleA1)
-Action.000900[Toronto]: CopyImage(, Always, network1.gif, Toronto.x - 16, Toronto.y - 18)
-Action.000910[Toronto]: DrawText(, Always,3,Toronto.x-24,Toronto.y+12,Toronto0001,black)
-Action.000911[Toronto]: DrawText(, Always,3,Toronto.x-23,Toronto.y+22,Toronto0002,black)
-
-Node[Montreal]: cisco-lca-2.ping.lca.liebherr.com
-NodeCenterX[Montreal]: 549
-NodeCenterY[Montreal]: 56
-NodeWarningThreshhold[Montreal]: 1300
-NodeAlarmThreshhold[Montreal]: 5000
-NodeInCoolMsgID[Montreal]: Montreal0050
-NodeInWarningMsgID[Montreal]: Montreal0051
-NodeInAlarmMsgID[Montreal]: Montreal0052
-NodeStatusEmail[Montreal]: cwa
-NodeStatusEmailTarget[Montreal]: mac.kloberg@lam.liebherr.com
-Options[Montreal]: AlarmIfNull
-Action.000100[Montreal]: DrawNodeLine(In, Cool, NewportNews, Montreal, LineStyleC1)
-Action.000200[Montreal]: DrawNodeLine(In, Warning, NewportNews, Montreal, LineStyleW1)
-#Action.000300[Montreal]: DrawNodeLine(In, Alarm, NewportNews, Montreal, LineStyleA1)
-Action.000900[Montreal]: CopyImage(, Always, network1.gif, Montreal.x - 16, Montreal.y - 18)
-Action.000910[Montreal]: DrawText(, Always,3,Montreal.x-34,Montreal.y+12,Montreal0001,black)
-Action.000911[Montreal]: DrawText(, Always,3,Montreal.x-26,Montreal.y+22,Montreal0002,black)
-
-Node[Houston]: cisco-lcr-1.ping.lcr.liebherr.com
-NodeCenterX[Houston]: 191
-NodeCenterY[Houston]: 391
-NodeWarningThreshhold[Houston]: 1300
-NodeAlarmThreshhold[Houston]: 5000
-NodeInCoolMsgID[Houston]: Houston0050
-NodeInWarningMsgID[Houston]: Houston0051
-NodeInAlarmMsgID[Houston]: Houston0052
-NodeStatusEmail[Houston]: cwa
-NodeStatusEmailTarget[Houston]: mac.kloberg@lam.liebherr.com
-Options[Houston]: AlarmIfNull
-Action.000100[Houston]: DrawNodeLine(In, Cool, NewportNews, Houston, LineStyleC1)
-Action.000200[Houston]: DrawNodeLine(In, Warning, NewportNews, Houston, LineStyleW1)
-#Action.000300[Houston]: DrawNodeLine(In, Alarm, NewportNews, Houston, LineStyleA1)
-Action.000900[Houston]: CopyImage(, Always, network1.gif, Houston.x - 16, Houston.y - 18)
-Action.000910[Houston]: DrawText(, Always,3,Houston.x+20,Houston.y+2,Houston0001,black)
-Action.000911[Houston]: DrawText(, Always,3,Houston.x+26,Houston.y+12,Houston0002,black)
-
-Node[Baxter]: cisco-lme-1.ping.lme.liebherr.com
-NodeCenterX[Baxter]: 196
-NodeCenterY[Baxter]: 233
-NodeWarningThreshhold[Baxter]: 1300
-NodeAlarmThreshhold[Baxter]: 5000
-NodeInCoolMsgID[Baxter]: Baxter0050
-NodeInWarningMsgID[Baxter]: Baxter0051
-NodeInAlarmMsgID[Baxter]: Baxter0052
-NodeStatusEmail[Baxter]: cwa
-NodeStatusEmailTarget[Baxter]: mac.kloberg@lam.liebherr.com; allen.cunningham@lme.liebherr.com
-Options[Baxter]: AlarmIfNull
-Action.000100[Baxter]: DrawNodeLine(In, Cool, NewportNews, Baxter, LineStyleC1)
-Action.000200[Baxter]: DrawNodeLine(In, Warning, NewportNews, Baxter, LineStyleW1)
-#Action.000300[Baxter]: DrawNodeLine(In, Alarm, NewportNews, Baxter, LineStyleA1)
-Action.000900[Baxter]: CopyImage(, Always, network1.gif, Baxter.x - 16, Baxter.y - 18)
-Action.000910[Baxter]: DrawText(, Always,3,Baxter.x-50,Baxter.y+12,Baxter0001,black)
-Action.000911[Baxter]: DrawText(, Always,3,Baxter.x-20,Baxter.y+22,Baxter0002,black)
-
-Node[Gillette]: cisco-lme-2.ping.lme.liebherr.com
-NodeCenterX[Gillette]: 22
-NodeCenterY[Gillette]: 82
-NodeWarningThreshhold[Gillette]: 1300
-NodeAlarmThreshhold[Gillette]: 5000
-NodeInCoolMsgID[Gillette]: Gillette0050
-NodeInWarningMsgID[Gillette]: Gillette0051
-NodeInAlarmMsgID[Gillette]: Gillette0052
-NodeStatusEmail[Gillette]: cwa
-NodeStatusEmailTarget[Gillette]: mac.kloberg@lam.liebherr.com; allen.cunningham@lme.liebherr.com
-Options[Gillette]: AlarmIfNull
-Action.000100[Gillette]: DrawNodeLine(In, Cool, NewportNews, Gillette, LineStyleC1)
-Action.000200[Gillette]: DrawNodeLine(In, Warning, NewportNews, Gillette, LineStyleW1)
-#Action.000300[Gillette]: DrawNodeLine(In, Alarm, NewportNews, Gillette, LineStyleA1)
-Action.000900[Gillette]: CopyImage(, Always, network1.gif, Gillette.x - 16, Gillette.y - 18)
-Action.000910[Gillette]: DrawText(, Always,3,Gillette.x-15,Gillette.y+12,Gillette0001,black)
-Action.000911[Gillette]: DrawText(, Always,3,Gillette.x-10,Gillette.y+22,Gillette0002,black)
-
-Node[InternetGW]: newportnews-gw1-ping.lam.liebherr.com
-NodeCenterX[InternetGW]: 547
-NodeCenterY[InternetGW]: 180
-NodeWarningThreshhold[InternetGW]: 1300
-NodeAlarmThreshhold[InternetGW]: 5000
-NodeInCoolMsgID[InternetGW]: InternetGW0050
-NodeInWarningMsgID[InternetGW]: InternetGW0051
-NodeInAlarmMsgID[InternetGW]: InternetGW0052
-NodeStatusEmail[InternetGW]: cwa
-NodeStatusEmailTarget[InternetGW]: mac.kloberg@lam.liebherr.com; chris.rock@lgt.liebherr.com; allen.cunningham@lme.liebherr.com
-Options[InternetGW]: AlarmIfNull
-Action.000001[InternetGW]: DrawNodeLine(In, Cool, NewportNews, InternetGW, LineStyleC1)
-Action.000002[InternetGW]: DrawNodeLine(In, Warning, NewportNews, InternetGW, LineStyleW1)
-Action.000020[InternetGW]: CopyImage(In, Cool, attcerfnet.gif, InternetGW.x-22, InternetGW.y)
-Action.000021[InternetGW]: CopyImage(In, Warning, attcerfnet.gif, InternetGW.x-22, InternetGW.y)
-
-Node[Eurotunnel]: pptp.hamptonkirchdorf
-NodeCenterX[Eurotunnel]: 575
-NodeCenterY[Eurotunnel]: 235
-NodeWarningThreshhold[Eurotunnel]: 1300
-NodeAlarmThreshhold[Eurotunnel]: 5000
-NodeInCoolMsgID[Eurotunnel]: Eurotunnel0050
-NodeInWarningMsgID[Eurotunnel]: Eurotunnel0051
-NodeInAlarmMsgID[Eurotunnel]: Eurotunnel0052
-NodeStatusEmail[Eurotunnel]: cwa
-NodeStatusEmailTarget[Eurotunnel]: mac.kloberg@lam.liebherr.com; dieter.kummerer@zdv.liebherr.com; brian.check@lme.liebherr.com
-Options[Eurotunnel]: AlarmIfNull
-Action.000100[Eurotunnel]: DrawNodeLine(In, Cool, NewportNews, Eurotunnel, LineStyleC1)
-Action.000200[Eurotunnel]: DrawNodeLine(In, Warning, NewportNews, Eurotunnel, LineStyleW1)
-Action.000900[Eurotunnel]: CopyImage(In, Cool, sgflag.gif, Eurotunnel.x - 26, Eurotunnel.y+2)
-Action.000901[Eurotunnel]: CopyImage(In, Warning, sgflag.gif, Eurotunnel.x - 26, Eurotunnel.y+2)
-Action.000910[Eurotunnel]: DrawText(In, Cool,2,Eurotunnel.x-53,Eurotunnel.y-13,Eurotunnel0001,black)
-Action.000911[Eurotunnel]: DrawText(In, Warning,2,Eurotunnel.x-53,Eurotunnel.y-13,Eurotunnel0001,black)
-
-Node[NewportNews]: cisco-lam-1.lam.liebherr.com
-NodeCenterX[NewportNews]: 499
-NodeCenterY[NewportNews]: 235
-NodeWarningThreshhold[NewportNews]: 1300
-NodeAlarmThreshhold[NewportNews]: 5000
-NodeStatusEmail[NewportNews]: cwa
-NodeStatusEmailTarget[NewportNews]: mac.kloberg@lam.liebherr.com
-Options[NewportNews]: AlarmIfNull
-Action.000900[NewportNews]: CopyImage(, Always, network1.gif, NewportNews.x - 16, NewportNews.y - 18)
-Action.000910[NewportNews]: DrawText(, Always,3,NewportNews.x-40,NewportNews.y+12,NewportNews0001,black)
-Action.000911[NewportNews]: DrawText(, Always,3,NewportNews.x-26,NewportNews.y+22,NewportNews0002,black)
-
-#
-# E-Mail/MTA Monitoring
-#
-
-Node[NewportNewsEmailX400Kirchdorf]: hampton.mta.x400hamptonkirchdorf.lam.liebherr.com
-NodeCenterX[NewportNewsEmailX400Kirchdorf]: 557
-NodeCenterY[NewportNewsEmailX400Kirchdorf]: 255
-NodeWarningThreshhold[NewportNewsEmailX400Kirchdorf]: 30
-NodeAlarmThreshhold[NewportNewsEmailX400Kirchdorf]: 100
-NodeInCoolMsgID[NewportNewsEmailX400Kirchdorf]: NewportNewsEmailX400Kirchdorf0050
-NodeInWarningMsgID[NewportNewsEmailX400Kirchdorf]: NewportNewsEmailX400Kirchdorf0051
-NodeInAlarmMsgID[NewportNewsEmailX400Kirchdorf]: NewportNewsEmailX400Kirchdorf0052
-NodeStatusEmail[NewportNewsEmailX400Kirchdorf]: cwa
-NodeStatusEmailTarget[NewportNewsEmailX400Kirchdorf]: mac.kloberg@lam.liebherr.com
-Action.000900[NewportNewsEmailX400Kirchdorf]: MultiCopyImage(, Always, envelope.gif, NewportNewsEmailX400Kirchdorf.x, NewportNewsEmailX400Kirchdorf.y, $incurrent / 10, 1, 35, -5, 270)
-
-Node[NewportNewsEmailX400Baxter]: hampton.mta.x400hamptonlti.lam.liebherr.com
-NodeCenterX[NewportNewsEmailX400Baxter]: 451
-NodeCenterY[NewportNewsEmailX400Baxter]: 229
-NodeWarningThreshhold[NewportNewsEmailX400Baxter]: 30
-NodeAlarmThreshhold[NewportNewsEmailX400Baxter]: 100
-NodeInCoolMsgID[NewportNewsEmailX400Baxter]: NewportNewsEmailX400Baxter0050
-NodeInWarningMsgID[NewportNewsEmailX400Baxter]: NewportNewsEmailX400Baxter0051
-NodeInAlarmMsgID[NewportNewsEmailX400Baxter]: NewportNewsEmailX400Baxter0052
-NodeStatusEmail[NewportNewsEmailX400Baxter]: cwa
-NodeStatusEmailTarget[NewportNewsEmailX400Baxter]: mac.kloberg@lam.liebherr.com; allen.cunningham@lme.liebherr.com
-Action.000900[NewportNewsEmailX400Baxter]: MultiCopyImage(, Always, envelope.gif, NewportNewsEmailX400Baxter.x, NewportNewsEmailX400Baxter.y, $incurrent / 10, 1, 23, -5, 180)
-
-Node[NewportNewsEmailX400Saline]: hampton.mta.x400hamptongarfield.lam.liebherr.com
-NodeCenterX[NewportNewsEmailX400Saline]: 465
-NodeCenterY[NewportNewsEmailX400Saline]: 203
-NodeWarningThreshhold[NewportNewsEmailX400Saline]: 30
-NodeAlarmThreshhold[NewportNewsEmailX400Saline]: 100
-NodeInCoolMsgID[NewportNewsEmailX400Saline]: NewportNewsEmailX400Saline0050
-NodeInWarningMsgID[NewportNewsEmailX400Saline]: NewportNewsEmailX400Saline0051
-NodeInAlarmMsgID[NewportNewsEmailX400Saline]: NewportNewsEmailX400Saline0052
-NodeStatusEmail[NewportNewsEmailX400Saline]: cwa
-NodeStatusEmailTarget[NewportNewsEmailX400Saline]: mac.kloberg@lam.liebherr.com; chris.rock@lgt.liebherr.com
-Action.000900[NewportNewsEmailX400Saline]: MultiCopyImage(, Always, envelope.gif, NewportNewsEmailX400Saline.x, NewportNewsEmailX400Saline.y, $incurrent / 10, 1, 10, -5, 135)
-
-Node[NewportNewsEmailX400Burlington]: hampton.mta.x400hamptonburlington.lam.liebherr.com
-NodeCenterX[NewportNewsEmailX400Burlington]: 481
-NodeCenterY[NewportNewsEmailX400Burlington]: 195
-NodeWarningThreshhold[NewportNewsEmailX400Burlington]: 30
-NodeAlarmThreshhold[NewportNewsEmailX400Burlington]: 100
-NodeInCoolMsgID[NewportNewsEmailX400Burlington]: NewportNewsEmailX400Burlington0050
-NodeInWarningMsgID[NewportNewsEmailX400Burlington]: NewportNewsEmailX400Burlington0051
-NodeInAlarmMsgID[NewportNewsEmailX400Burlington]: NewportNewsEmailX400Burlington0052
-NodeStatusEmail[NewportNewsEmailX400Burlington]: cwa
-NodeStatusEmailTarget[NewportNewsEmailX400Burlington]: mac.kloberg@lam.liebherr.com
-Action.000900[NewportNewsEmailX400Burlington]: MultiCopyImage(, Always, envelope.gif, NewportNewsEmailX400Burlington.x, NewportNewsEmailX400Burlington.y, $incurrent / 10, 1, 10, -5, 111)
-
-Node[NewportNewsEmailIMC]: hampton.mta.x400hamptonimc.lam.liebherr.com
-NodeCenterX[NewportNewsEmailIMC]: 515
-NodeCenterY[NewportNewsEmailIMC]: 207
-NodeWarningThreshhold[NewportNewsEmailIMC]: 30
-NodeAlarmThreshhold[NewportNewsEmailIMC]: 100
-NodeInCoolMsgID[NewportNewsEmailIMC]: NewportNewsEmailIMC0050
-NodeInWarningMsgID[NewportNewsEmailIMC]: NewportNewsEmailIMC0051
-NodeInAlarmMsgID[NewportNewsEmailIMC]: NewportNewsEmailIMC0052
-NodeStatusEmail[NewportNewsEmailIMC]: cwa
-NodeStatusEmailTarget[NewportNewsEmailIMC]: mac.kloberg@lam.liebherr.com
-Action.000900[NewportNewsEmailIMC]: MultiCopyImage(, Always, envelope.gif, NewportNewsEmailIMC.x, NewportNewsEmailIMC.y, $incurrent / 10, 1, 20, -5, 0)
-
-Node[SalineEmailX400Hampton]: garfield.mta.x400garfieldhampton.lgt.liebherr.com
-NodeCenterX[SalineEmailX400Hampton]: 418
-NodeCenterY[SalineEmailX400Hampton]: 157
-NodeWarningThreshhold[SalineEmailX400Hampton]: 30
-NodeAlarmThreshhold[SalineEmailX400Hampton]: 100
-NodeInCoolMsgID[SalineEmailX400Hampton]: SalineEmailX400Hampton0050
-NodeInWarningMsgID[SalineEmailX400Hampton]: SalineEmailX400Hampton0051
-NodeInAlarmMsgID[SalineEmailX400Hampton]: SalineEmailX400Hampton0052
-NodeStatusEmail[SalineEmailX400Hampton]: cwa
-NodeStatusEmailTarget[SalineEmailX400Hampton]: mac.kloberg@lam.liebherr.com; chris.rock@lgt.liebherr.com
-Action.000900[SalineEmailX400Hampton]: MultiCopyImage(, Always, envelope.gif, SalineEmailX400Hampton.x, SalineEmailX400Hampton.y, $incurrent / 10, 1, 20, -5, 315)
-
-Node[TorontoEmailX400Hampton]: burlington.mta.x400burlingtonhampton.lca.liebherr.com
-NodeCenterX[TorontoEmailX400Hampton]: 456
-NodeCenterY[TorontoEmailX400Hampton]: 131
-NodeWarningThreshhold[TorontoEmailX400Hampton]: 30
-NodeAlarmThreshhold[TorontoEmailX400Hampton]: 100
-NodeInCoolMsgID[TorontoEmailX400Hampton]: TorontoEmailX400Hampton0050
-NodeInWarningMsgID[TorontoEmailX400Hampton]: TorontoEmailX400Hampton0051
-NodeInAlarmMsgID[TorontoEmailX400Hampton]: TorontoEmailX400Hampton0052
-NodeStatusEmail[TorontoEmailX400Hampton]: cwa
-NodeStatusEmailTarget[TorontoEmailX400Hampton]: mac.kloberg@lam.liebherr.com
-Action.000900[TorontoEmailX400Hampton]: MultiCopyImage(, Always, envelope.gif, TorontoEmailX400Hampton.x, TorontoEmailX400Hampton.y, $incurrent / 10, 1, 20, -5, 291)
-
-Node[BaxterEmailX400Hampton]: hampton.mta.x400hamptonlti.lam.liebherr.com
-NodeCenterX[BaxterEmailX400Hampton]: 217
-NodeCenterY[BaxterEmailX400Hampton]: 229
-NodeWarningThreshhold[BaxterEmailX400Hampton]: 30
-NodeAlarmThreshhold[BaxterEmailX400Hampton]: 100
-NodeInCoolMsgID[BaxterEmailX400Hampton]: BaxterEmailX400Hampton0050
-NodeInWarningMsgID[BaxterEmailX400Hampton]: BaxterEmailX400Hampton0051
-NodeInAlarmMsgID[BaxterEmailX400Hampton]: BaxterEmailX400Hampton0052
-NodeStatusEmail[BaxterEmailX400Hampton]: cwa
-NodeStatusEmailTarget[BaxterEmailX400Hampton]: mac.kloberg@lam.liebherr.com; allen.cunningham@lme.liebherr.com
-Action.000900[BaxterEmailX400Hampton]: MultiCopyImage(, Always, envelope.gif, BaxterEmailX400Hampton.x, BaxterEmailX400Hampton.y, $incurrent / 10, 1, 23, -5, 0)
diff --git a/src/contrib/NSI/mrtg-nsi-msg.txt b/src/contrib/NSI/mrtg-nsi-msg.txt
deleted file mode 100644
index a3ea288..0000000
--- a/src/contrib/NSI/mrtg-nsi-msg.txt
+++ /dev/null
@@ -1,115 +0,0 @@
-######################################################################
-# Network Status Imager for MRTG -- Example Message File
-######################################################################
-#
-# All texts displayed by NSI have to be defined here
-#
-# * copy this file to ../run and call it mrtg-nsi-msg.txt
-#
-# Note:
-#ri
-# * Every text entry should have the syntax: <key: message>
-#
-# * Keys can be everything, but must match what you've defined in the
-# config file. Keys are case insensitive.
-#
-# * Empty Lines are ignored
-#
-# * Lines starting with a # sign are comments.
-#
-# * Valid variables in these lines are:
-# - $NodeWarningThreshhold #The nodes warning threshold
-# - $NodeAlarmThreshhold #The nodes alarm threshold
-# - $NodeIn #In value of the node
-# - $NodeOut #Out value of the node
-
-
-#
-# Node Names and Descriptions
-#
-
-Saline0001: Saline,
-Saline0002: Michigan
-Saline0050: Frame relay connection to Saline is back up.
-Saline0051: Frame relay connection to Saline is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Saline0052: Frame relay connection to Saline is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-Toronto0001: Toronto,
-Toronto0002: Ontario
-Toronto0050: Frame relay connection to Toronto is back up.
-Toronto0051: Frame relay connection to Toronto is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Toronto0052: Frame relay connection to Toronto is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-Montreal0001: Montreal,
-Montreal0002: Quebec
-Montreal0050: Frame relay connection to Montreal is back up.
-Montreal0051: Frame relay connection to Montreal is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Montreal0052: Frame relay connection to Montreal is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-Baxter0001: Baxter Springs,
-Baxter0002: Kansas
-Baxter0050: Frame relay connection to Baxter Springs is back up.
-Baxter0051: Frame relay connection to Baxter Springs is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Baxter0052: Frame relay connection to Baxter Springs is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-Gillette0001: Gillette,
-Gillette0002: Wyoming
-Gillette0050: Frame relay connection to Gillette is back up.
-Gillette0051: Frame relay connection to Gillette is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Gillette0052: Frame relay connection to Gillette is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-NewportNews0001: Newport News,
-NewportNews0002: Virginia
-
-Houston0001: Houston,
-Houston0002: Texas
-Houston0050: Frame relay connection to Houston is back up.
-Houston0051: Frame relay connection to Houston is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Houston0052: Frame relay connection to Houston is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-InternetGW0001: Internet Connection
-InternetGW0050: Internet Connection is back up.
-InternetGW0051: Internet Connection is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-InternetGW0052: Internet Connection is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-Eurotunnel0001: IP-Tunnel
-Eurotunnel0050: PPTP connection to Kirchdorf is back up. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-Eurotunnel0051: PPTP connection to Kirchdorf is congested. Ping response time ($NodeInms) exceeded limit ($NodeWarningThreshholdms).
-Eurotunnel0052: PPTP connection to Kirchdorf is down. (prt.$NodeInms/max.$NodeAlarmThreshholdms)
-
-NewportNewsEmailX400Kirchdorf0050: MTA Hampton -> Kirchdorf is clearing up again (Currently $NodeIn messages in queue).
-NewportNewsEmailX400Kirchdorf0051: MTA Hampton -> Kirchdorf is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-NewportNewsEmailX400Kirchdorf0052: MTA Hampton -> Kirchdorf is congested. (Currently $NodeIn messages in queue).
-
-NewportNewsEmailX400Baxter0050: MTA Hampton -> Baxter Springs is clearing up again (Currently $NodeIn messages in queue).
-NewportNewsEmailX400Baxter0051: MTA Hampton -> Baxter Springs is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-NewportNewsEmailX400Baxter0052: MTA Hampton -> Baxter Springs is congested. (Currently $NodeIn messages in queue).
-
-NewportNewsEmailX400Saline0050: MTA Hampton -> Saline is clearing up again (Currently $NodeIn messages in queue).
-NewportNewsEmailX400Saline0051: MTA Hampton -> Saline is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-NewportNewsEmailX400Saline0052: MTA Hampton -> Saline is congested. (Currently $NodeIn messages in queue).
-
-NewportNewsEmailX400Burlington0050: MTA Hampton -> Toronto is clearing up again (Currently $NodeIn messages in queue).
-NewportNewsEmailX400Burlington0051: MTA Hampton -> Toronto is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-NewportNewsEmailX400Burlington0052: MTA Hampton -> Toronto is congested. (Currently $NodeIn messages in queue).
-
-NewportNewsEmailIMC0050: Internet Mail Service is clearing up again (Currently $NodeIn messages in queue).
-NewportNewsEmailIMC0051: Internet Mail Service is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-NewportNewsEmailIMC0052: Internet Mail Service is congested. (Currently $NodeIn messages in queue).
-
-SalineEmailX400Hampton0050: MTA Saline -> Hampton is clearing up again (Currently $NodeIn messages in queue).
-SalineEmailX400Hampton0051: MTA Saline -> Hampton is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-SalineEmailX400Hampton0052: MTA Saline -> Hampton is congested. (Currently $NodeIn messages in queue).
-
-TorontoEmailX400Hampton0050: MTA Toronto -> Hampton is clearing up again (Currently $NodeIn messages in queue).
-TorontoEmailX400Hampton0051: MTA Toronto -> Hampton is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-TorontoEmailX400Hampton0052: MTA Toronto -> Hampton is congested. (Currently $NodeIn messages in queue).
-
-BaxterEmailX400Hampton0050: MTA Baxter Springs -> Hampton is clearing up again (Currently $NodeIn messages in queue).
-BaxterEmailX400Hampton0051: MTA Baxter Springs -> Hampton is starting to show signs of congestion (Currently $NodeIn messages in queue and building up).
-BaxterEmailX400Hampton0052: MTA Baxter Springs -> Hampton is congested. (Currently $NodeIn messages in queue).
-
-
-#
-# Common messages
-#
diff --git a/src/contrib/PMLines/PMLines.pl b/src/contrib/PMLines/PMLines.pl
deleted file mode 100644
index 1b80e63..0000000
--- a/src/contrib/PMLines/PMLines.pl
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/usr/bin/perl
-
-# PMLines.pl
-#
-# 1998/08/04
-
-#
-# Created by Carlos.Canau@EUnet.pt with cfgmaker from Tobias Oetiker
-# <oetiker@ee.ethz.ch> as skeleton
-#
-# returns:
-# #modems
-# #isdn
-# sysName
-# sysUptime
-#
-
-# 1998/10/30
-#
-# Modified by Butch Kemper <kemper@tstar.net> to allow multiple PortMasters
-# to be specified on the argument line and to output the totals.
-#
-
-# 1999/4/18
-#
-# Modified by Butch Kemper <kemper@tstar.net> to process PM2 systems and
-# to distingish between async and isdn ports.
-#
-# Changed name to PM2lines.pl
-#
-
-# 1999/4/19
-#
-# Modified by Butch Kemper <kemper@tstar.net> to process both PM2 and PM3
-# systems.
-#
-# Changed name to PMlines.pl
-#
-
-
-# 2000/9/5
-#
-# Modified by Robert Boyle (robert@tellurian.net) to work with
-# Lucent's VERY broken PM4 SNMP. Now uses modem number in use to determine if
-# call is ISDN or analog. If modem = "M0" then call is ISDN
-# Not pretty, but it does work. Somone who is a better PERL programmer than I
-# may want to integrate these changes into the base PMlines.pl script and make
-# determination of which method to use based on chassis type.
-#
-# Changed name to PM4lines.pl
-#
-
-# 2000/9/19
-#
-# Modified AGAIN by Robert Boyle (robert@tellurian.net) to work with
-# all Lucent Portmaster 2/3/4 chassis. Now uses port speed to determine if
-# call is ISDN or analog. If speed is 56000 or 64000 then call is ISDN.
-# This may cause a false ISDN reading if someone has a perfect v.90 connection.
-#
-# Changed name back to PMlines.pl
-#
-
-
-use SNMP_Session;
-use BER;
-use Socket;
-use strict;
-
-%snmpget::OIDS = ( 'sysName' => '1.3.6.1.2.1.1.5.0',
- 'sysUptime' => '1.3.6.1.2.1.1.3.0',
- 'ifNumber' => '1.3.6.1.2.1.2.1.0',
- 'PMip' => '1.3.6.1.4.1.307.3.2.1.1.1.14',
- 'PMty' => '1.3.6.1.4.1.307.3.2.1.1.1.11',
- );
-
-my($tot_isdn,$tot_modems,$args) = (0,0,0);
-my($input_string,$PROGNAME,$sysUptime,$sysName,$interfaces)="";
-($PROGNAME = $0) =~ s/.*\///;
-
-diexit(0) if $#ARGV < 0;
-
-for ($args=0; $args < $#ARGV+1; $args++) {
- $input_string = $ARGV[$args];
- my($community,$router) = split /\@/, $input_string;
-
- diexit(0) unless $community && $router;
-
- ($sysName,$sysUptime,$interfaces) =
- snmpget($router,$community,'sysName','sysUptime','ifNumber');
- my @PMip = snmpgettable($router,$community,'PMip');
- my @PMty = snmpgettable($router,$community,'PMty');
- my ($i);
-
- for ($i=0; $i < $#PMip+1; $i++)
- {
-
- if ($PMip[$i] ne "0.0.0.0") {
- if ($PMty[$i] ne "56000" and $PMty[$i] ne "64000") {
- $tot_modems++;
- }
- else {
- $tot_isdn++;
- }
- }
- }
-}
-
-printf "$tot_modems\n";
-printf "$tot_isdn\n";
-printf "$sysUptime\n";
-printf "$sysName\n";
-
-exit(0);
-
-sub diexit {
- die ("USAGE: $PROGNAME community\@portmaster [community\@portmaster]" .
- " \.\.\.\n" .
- " community = snmp read community string\n" .
- " portmaster = FQN of PortMaster\n");
-}
-
-sub snmpget{
- my($host,$community,@vars) = @_;
- my(@enoid, $var,$response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@retvals);
- foreach $var (@vars) {
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
- push @enoid, encode_oid((split /\./, $snmpget::OIDS{$var}));
- }
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- if ($session->get_request_response(@enoid)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- $session->close ();
- while ($bindings) {
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- my $tempo = pretty_print($value);
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
-
- push @retvals, $tempo;
- }
-
- return (@retvals);
- } else {
- die "No answer from $input_string. You may be using the wrong community\n";
- }
-}
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
- $tempo = pretty_print($value);
- #print "$var: '$tempo'\n";
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @table, $tempo;
-
- } else {
- die "No answer from $input_string\n";
- }
- $enoid=$next_oid;
- }
- $session->close ();
- return (@table);
-}
diff --git a/src/contrib/PMLines/README b/src/contrib/PMLines/README
deleted file mode 100644
index e26eab5..0000000
--- a/src/contrib/PMLines/README
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Butch Kemper <kemper@tstar.net>
-Date: Tue, 27 Apr 1999 12:11:55 -0500
-
-Tobias,
-
-I have included a new module "PMLines.pl" for the "contrib" directory which
-replaces "PM3Lines.pl" and the new module now supports both Livingston PM2
-and PM3 servers.
-
-Butch
-
-From: Carlos Canau <canau@dawn.EUnet.pt>
-
- Dear Tobias,
-
- Here's another script for contrib. It allows one to make a
- graph of analog/ISDN lines on a Livingston Portmaster 3. No
- docs, sorry...
-
- </canau
-
-From: Robert Boyle <robert@tellurian.com>
-Date: Tue, 19 Sep 2000 12:07:36 -0400
-
-Here is a new modified version of the PMlines.pl script. This one works
-with the newest version of PortMaster 4 firmware and all other Portmaster
-2/3/4 products.
-
-# 2000/9/19
-#
-# Modified again by Robert Boyle (robert@tellurian.net) to work with
-# all Lucent Portmaster 2/3/4 chassis. Now uses port speed to determine if
-# call is ISDN or analog. If speed is 56000 or 64000 then call is ISDN.
-# This may cause a false ISDN reading if someone has a perfect v.90 connection.
-#
-# Changed name back to PMlines.pl
-#
-
diff --git a/src/contrib/PMLines/mrtg.cfg-demo b/src/contrib/PMLines/mrtg.cfg-demo
deleted file mode 100644
index 52c78ff..0000000
--- a/src/contrib/PMLines/mrtg.cfg-demo
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Usage example on .cfg file:
-#
-Target[dial]: `/usr/local/mrtg/PM3Lines.pl public@dial`
-WithPeak[dial]: wym
-Directory[dial]: data
-Options[dial]: growright, absolute, gauge
-MaxBytes[dial]: 30
-AbsMax[dial]: 30
-Title[dial]: dial.EUnet.pt : MODEMS/ISDN
-Unscaled[dial]: dwyn
-YLegend[dial]: Interfaces
-Colours[dial]: GOLDENROD#D2A13B,BLUE1#0000ff,DARK GREEN#006600,VIOLET#ff00ff
-XSize[dial]: 340
-YSize[dial]: 100
-ShortLegend[dial]: if's
-Legend1[dial]: Modems
-Legend2[dial]: ISDN
-Legend3[dial]: Maximal 5 Minute Modems
-Legend4[dial]: Maximal 5 Minute ISDN
-LegendI[dial]: &nbsp; modems:
-LegendO[dial]: &nbsp; ISDN:
-PageTop[dial]: <H1>Interface Number for dial.EUnet.pt
- <BR>dial.EUnet.pt Interfaces</H1>
- <TABLE>
- <TR><TD>System:</TD><TD>dial.EUnet.pt</TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>MODEMS/ISDN</TD></TR>
- <TR><TD>IP:</TD><TD>dial.EUnet.pt (127.0.0.1)</TD></TR>
- <TR><TD>Max Interfaces:</TD>
- <TD>10 Asyncs / 30 ISDN</TD></TR>
- </TABLE>
-
-
diff --git a/src/contrib/TCH/README b/src/contrib/TCH/README
deleted file mode 100644
index f0691e3..0000000
--- a/src/contrib/TCH/README
+++ /dev/null
@@ -1,13 +0,0 @@
-Date: Tue, 16 Feb 1999 16:44:12 -0700
-From: Eric Billeter <ebilleter@cableone.net>
-
-Here are some scripts i modified to monitor the modem utilization
-of my USR Total control racks. They work great even though I am
-not a programmer. If there is anything you see that would work
-more efficiently it would be appreciated.
-The files are as follows
-
-dualt1.pl - TCH with dual t1 card.
-dualpri.pl - TCH with dual pri card.
-hiperdsp.pl - TCH with hiperdsp cards.
-mrtg-cfg.txt - snippet of cfg file
diff --git a/src/contrib/TCH/dualpri.pl b/src/contrib/TCH/dualpri.pl
deleted file mode 100644
index dfad88a..0000000
--- a/src/contrib/TCH/dualpri.pl
+++ /dev/null
@@ -1,81 +0,0 @@
-#!c:\perl\bin
-
-# dualpri.pl
-#
-
-#
-# Created by Eric Billeter
-# returns:
-# Modems in use (value1)
-# Chassis Capacity (value2)
-
-use SNMP_Session;
-use BER;
-use Socket;
-use strict;
-
-%snmpget::OIDS = ( 'value1' => '1.3.6.1.4.1.429.1.16.4.1.2',
- );
-
-my($community,$router) = split /\@/, $ARGV[0];
-die <<USAGE unless $community && $router;
-
-USAGE: dualpri.pl 'SNMP_community'\@'aaa.bbb.ccc.ddd'
-
-Where 'aaa.bbb.ccc.ddd' is the ip address for the Network Management Card.
-
-USAGE
-
-
-my($sysName,$sysUptime,$interfaces,$value1,$value2) =
- snmpgettable($router,$community,'value1');
-
-exit(0);
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
-
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
-
- my $bulkindex = 3;
- while( $bulkindex < "96" ){
-
- $tempo = substr ($value,$bulkindex,1);
- $bulkindex=$bulkindex+4;
- if( ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value1=$value1 + 1 ;
- }
- if( ord($tempo) eq '2' or ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value2=$value2 + 1 ;
- }
- }
- push @table, $tempo;
- } else {
- die "No answer from $ARGV[0]\n";
- }
- $enoid=$next_oid;
- }
- $session->close ();
-if( $value1 eq ''){$value1 = 0 };
-if( $value2 eq ''){$value2 = 0 };
- print "$value1\n";
- print "$value2\n";
- return (@table);
-}
diff --git a/src/contrib/TCH/dualt1.pl b/src/contrib/TCH/dualt1.pl
deleted file mode 100644
index a6bfe9e..0000000
--- a/src/contrib/TCH/dualt1.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-#!c:\perl\bin
-
-# dualt1.pl
-#
-
-#
-# Created by Eric Billeter
-# returns:
-# Modems in use (value1)
-# Chassis capacity (value2)
-
-use SNMP_Session;
-use BER;
-use Socket;
-use strict;
-
-%snmpget::OIDS = ( 'value1' => '1.3.6.1.4.1.429.1.5.4.1.3',
- );
-
-my($community,$router) = split /\@/, $ARGV[0];
-die <<USAGE unless $community && $router;
-
-USAGE: hiperdsp.pl 'SNMP_community'\@'aaa.bbb.ccc.ddd'
-
-Where 'aaa.bbb.ccc.ddd' is the ip address for the Network Management Card.
-
-USAGE
-
-
-my($sysName,$sysUptime,$interfaces,$value1,$value2) =
- snmpgettable($router,$community,'value1');
-
-exit(0);
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
-
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
-
- my $bulkindex = 2;
- while( $bulkindex < "50" ){
-
- $tempo = substr ($value,$bulkindex,1);
-
- $bulkindex=$bulkindex+2;
- if( ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value1=$value1 + 1 ;
- }
- if( ord($tempo) eq '2' or ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value2=$value2 + 1 ;
- }
- }
- push @table, $tempo;
- } else {
- die "No answer from $ARGV[0]\n";
- }
- $enoid=$next_oid;
- }
- $session->close ();
-if( $value1 eq ''){$value1 = 0 };
-if( $value2 eq ''){$value2 = 0 };
- print "$value1\n";
- print "$value2\n";
- return (@table);
-}
diff --git a/src/contrib/TCH/hiperdsp.pl b/src/contrib/TCH/hiperdsp.pl
deleted file mode 100644
index 8752cf6..0000000
--- a/src/contrib/TCH/hiperdsp.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-#!c:\perl\bin
-
-# hiperdsp.pl
-#
-
-#
-# Created by Eric Billeter
-# returns:
-# Modems in use (value1)
-# Chassis capacity (value2)
-# Capacity is total of Idle, Connected, and Ringing
-
-use SNMP_Session;
-use BER;
-use Socket;
-use strict;
-
-%snmpget::OIDS = ( 'value1' => '1.3.6.1.4.1.429.1.27.2.1.26',
- );
-
-my($community,$router) = split /\@/, $ARGV[0];
-die <<USAGE unless $community && $router;
-
-USAGE: hiperdsp.pl 'SNMP_community'\@'aaa.bbb.ccc.ddd'
-
-Where 'aaa.bbb.ccc.ddd' is the ip address for the Network Management Card.
-
-USAGE
-
-
-my($sysName,$sysUptime,$interfaces,$value1,$value2) =
- snmpgettable($router,$community,'value1');
-
-exit(0);
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
-
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
-
- my $bulkindex = 2;
- while( $bulkindex < "52" ){
-
- $tempo = substr ($value,$bulkindex,1);
- $bulkindex=$bulkindex+2;
- if( ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value1=$value1 + 1 ;
- }
- if( ord($tempo) eq '2' or ord($tempo) eq '5' or ord($tempo) eq '3' or ord($tempo) eq '22' ){$value2=$value2 + 1 ;
- }
- }
- push @table, $tempo;
- } else {
- die "No answer from $ARGV[0]\n";
- }
- $enoid=$next_oid;
- }
- $session->close ();
-if( $value1 eq ''){$value1 = 0 };
-if( $value2 eq ''){$value2 = 0 };
- print "$value1\n";
- print "$value2\n";
- return (@table);
-}
diff --git a/src/contrib/TCH/mrtg.cfg b/src/contrib/TCH/mrtg.cfg
deleted file mode 100644
index 2a64899..0000000
--- a/src/contrib/TCH/mrtg.cfg
+++ /dev/null
@@ -1,67 +0,0 @@
-workdir: c:\mywebfiles
-Unscaled[_]:ymwd
-
-#.....................................................................
-
-Target[tch1]: `perl c:\perl\lib\dualpri.pl public@127.1.1.1`
-MaxBytes[tch1]: 46
-Unscaled[tch1]:ymwd
-Title[tch1]: Total Control Hub #1
-PageTop[tch1]: <H1>TCH1 Modem Utilization </H1>
-YLegend[tch1]:Modem Capacity
-Options[tch1]:gauge,growright
-ShortLegend[tch1]:Modems
-Legend1[tch1]:&nbsp Utilization &nbsp
-Legend2[tch1]:&nbsp Capacity &nbsp
-Legend3[tch1]:&nbsp Connections &nbsp
-Legend4[tch1]:&nbsp Capacity &nbsp
-LegendI[tch1]:&nbsp Utilization &nbsp
-LegendO[tch1]:&nbsp Capacity &nbsp
-
-#.....................................................................
-
-Target[tch2]: `perl c:\perl\lib\dualt1.pl public@127.1.1.2`
-MaxBytes[tch2]: 46
-Title[tch2]: Total Control Hub #2
-PageTop[tch2]: <H1>TCH2 Modem Utilization </H1>
-YLegend[tch2]:Modem Capacity
-Options[tch2]:gauge,growright
-ShortLegend[tch2]:Modems
-Legend1[tch2]:&nbsp Utilization &nbsp
-Legend2[tch2]:&nbsp Capacity &nbsp
-Legend3[tch2]:&nbsp Connections &nbsp
-Legend4[tch2]:&nbsp Capacity &nbsp
-LegendI[tch2]:&nbsp Utilization &nbsp
-LegendO[tch2]:&nbsp Capacity &nbsp
-
-#.....................................................................
-
-Target[tch3]: `perl c:\perl\lib\hiperdsp.pl public@127.1.1.3`
-MaxBytes[tch3]: 46
-Title[tch3]: Total Control Hub #3
-PageTop[tch3]: <H1>TCH3 Modem Utilization </H1>
-YLegend[tch3]:Modem Capacity
-Options[tch3]:gauge,growright
-ShortLegend[tch3]:Modems
-Legend1[tch3]:&nbsp Utilization &nbsp
-Legend2[tch3]:&nbsp Capacity &nbsp
-Legend3[tch3]:&nbsp Connections &nbsp
-Legend4[tch3]:&nbsp Capacity &nbsp
-LegendI[tch3]:&nbsp Utilization &nbsp
-LegendO[tch3]:&nbsp Capacity &nbsp
-
-#.....................................................................
-
-Target[tchtotal]: `perl c:\perl\lib\dualpri.pl public@127.1.1.1`+`perl c:\perl\lib\dualt1.pl public@127.1.1.2`+`perl c:\perl\lib\hiperdsp.pl public@127.1.1.3`
-MaxBytes[tchtotal]: 138
-Title[tchtotal]: Total Control Hub Totals
-PageTop[tchtotal]: <H1>Total Modem Utilization </H1>
-YLegend[tchtotal]:Modem Capacity
-Options[tchtotal]:gauge,growright
-ShortLegend[tchtotal]:Modems
-Legend1[tchtotal]:&nbsp Utilization &nbsp
-Legend2[tchtotal]:&nbsp Capacity &nbsp
-Legend3[tchtotal]:&nbsp Connections &nbsp
-Legend4[tchtotal]:&nbsp Capacity &nbsp
-LegendI[tchtotal]:&nbsp Utilization &nbsp
-LegendO[tchtotal]:&nbsp Capacity &nbsp
diff --git a/src/contrib/TTrafic/TTraffic.asp b/src/contrib/TTrafic/TTraffic.asp
deleted file mode 100644
index 623cf14..0000000
--- a/src/contrib/TTrafic/TTraffic.asp
+++ /dev/null
@@ -1,165 +0,0 @@
-<%
-'*******************************************************************************
-'* *
-'* TTraffic 1.0.0 (distributed under GNU GENERAL PUBLIC LICENSE) *
-'* by kamborio *
-'* *
-'* ------------------------------------------------------ *
-'* _ _ _ *
-'* | | __ __ _ _ __ ___ | |__ ___ _ __ (_) ___ *
-'* | |/ / / _` || '_ ` _ \ | '_ \ / _ \ | '__|| | / _ \ *
-'* | < | (_| || | | | | || |_) || (_) || | | || (_) | *
-'* |_|\_\ \__,_||_| |_| |_||_.__/ \___/ |_| |_| \___/ *
-'* ------------------------------------------------------ *
-'* http://www.kamborio.com/ *
-'* *
-'* Copyright (C) 2001 David A. Pérez (david@kamborio.com) *
-'* *
-'* This program is free software; you can redistribute it and/or modify it *
-'* under the terms of the GNU General Public License as published by the Free *
-'* Software Foundation; either version 2 of the License, or (at your option) *
-'* any later version. *
-'* *
-'* This program is distributed in the hope that it will be useful, but WITHOUT *
-'* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
-'* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-'* more details. *
-'* *
-'* You should have received a copy of the GNU General Public License along *
-'* with this program; if not, write to the: *
-'* *
-'* Free Software Foundation, Inc. *
-'* 59 Temple Place - Suite 330 *
-'* Boston, MA 02111-1307, USA *
-'* *
-'*******************************************************************************
-
-Const ForReading = 1, ForWriting = 2
-
-Dim LogsMode
-
-LogsMode = 1
-
-Dim Order, Period
-Dim fso, f, p, n, TheFile, LineNumber, TheLine, TheValues
-Dim ReadAt, LastRan, TotalBytesIn, TotalBytesOut
-Dim PeriodIn, PeriodOut, MonthIn, MonthOut
-
-Period = Request("Period")
-Order = Trim(CStr(Request("Order")))
-
-If Not IsNumeric(Period) Then
- Period = 30
-Else
- If Period < 1 Then
- Period = 30
- End If
-End If
-
-If Order = "" Then
- Order = "G"
-End If
-
-Set fso = CreateObject("Scripting.FileSystemObject")
-Set f = fso.GetFile(Request.ServerVariables("PATH_TRANSLATED"))
-
-If LogsMode = 1 Then
-
- ReDim p(0)
-
- p(0) = Replace(f.Name, ".asp", "") & ".log"
-
-Else
-
- p = Split(f.Path, "\")
-
- For n = 1 To (UBound(p) - 2)
- p(0) = p(0) & "\" & p(n)
- Next
-
- p(0) = p(0) & "\logs\" & p(n) & "\" & Replace(f.Name, ".asp", "") & ".log"
-
-End If
-
-Set TheFile = fso.OpenTextFile(p(0), ForReading)
-
-LineNumber = -1
-
-While Not TheFile.AtEndOfStream
-
- LineNumber = LineNumber + 1
-
- TheLine = TheFile.ReadLine
-
- TheValues = Split(TheLine)
-
- If LineNumber = 0 Then
- LastRan = UNIXToDay(TheValues(0))
- TotalBytesIn = CDbl(TheValues(1))
- TotalBytesOut = CDbl(TheValues(2))
- Else
- If DateDiff("d", UNIXToDay(TheValues(0)), Now) < CLng(Period) Then
- PeriodIn = PeriodIn + CDbl(TheValues(1) * (ReadAt - TheValues(0)))
- PeriodOut = PeriodOut + CDbl(TheValues(2) * (ReadAt - TheValues(0)))
- End If
-
- If Month(UNIXToDay(TheValues(0))) = Month(Now) And Year(UNIXToDay(TheValues(0))) = Year(Now) Then
- MonthIn = MonthIn + CDbl(TheValues(1) * (ReadAt - TheValues(0)))
- MonthOut = MonthOut + CDbl(TheValues(2) * (ReadAt - TheValues(0)))
- End If
-
- End If
-
- ReadAt = TheValues(0)
-
-Wend
-
-Set TheFile = Nothing
-set f = Nothing
-Set fso = Nothing
-
-Response.Write "<HR><BR>"
-Response.Write "<TABLE><TR><TD>Interface:</TD>"
-Response.Write "<TD>" & BytesTo(TotalBytesIn, Order) & " In and " & BytesTo(TotalBytesOut, Order) & " Out</B>, making a total of " & BytesTo((TotalBytesIn + TotalBytesOut), Order) & "</TD></TR>"
-Response.Write "<TR><TD>" & MonthName(Month(Now)) & ":</TD>"
-Response.Write "<TD>" & BytesTo(MonthIn, Order) & " In and " & BytesTo(MonthOut, Order) & " Out, making a total of " & BytesTo((MonthIn + MonthOut), Order) & "</TD></TR>"
-Response.Write "<TR><TD>Last " & Period & " days:</TD>"
-Response.Write "<TD>" & BytesTo(PeriodIn, Order) & " In and " & BytesTo(PeriodOut, Order) & " Out, making a total of " & BytesTo((PeriodIn + PeriodOut), Order) & "</TD></TR></TABLE>"
-
-
-
-Function UNIXToDay(Value)
-
- UNIXToDay = DateAdd("s", Value, "1/Jan/1970 0:00")
-
-End Function
-
-Function BytesTo(Value, Order)
-
- Dim NumericalOrder, OrderName
-
- Select Case UCase(Order)
- Case "K"
- NumericalOrder = "1"
- OrderName = "Kb"
- Case "M"
- NumericalOrder = "2"
- OrderName = "Mb"
- Case "G"
- NumericalOrder = "3"
- OrderName = "Gb"
- Case "T"
- NumericalOrder = "4"
- OrderName = "Tb"
- Case "P"
- NumericalOrder = "5"
- OrderName = "Pb"
- Case Else
- NumericalOrder = "0"
- OrderName = "Bytes"
- End Select
-
- BytesTo = Round((Value / 1024 ^ NumericalOrder), 2) & " " & OrderName
-
-End Function
-%> \ No newline at end of file
diff --git a/src/contrib/TTrafic/gpl.txt b/src/contrib/TTrafic/gpl.txt
deleted file mode 100644
index 42df5d7..0000000
--- a/src/contrib/TTrafic/gpl.txt
+++ /dev/null
@@ -1,133 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-
-a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
-
-c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
-The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-
-END OF TERMS AND CONDITIONS
-How to Apply These Terms to Your New Programs
-If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
-
-one line to give the program's name and an idea of what it does.
-Copyright (C) yyyy name of author
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
-
-Gnomovision version 69, Copyright (C) year name of author
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'. This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c'
-for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
-
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written
-by James Hacker.
-
-signature of Ty Coon, 1 April 1989
-Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. \ No newline at end of file
diff --git a/src/contrib/TTrafic/readme.txt b/src/contrib/TTrafic/readme.txt
deleted file mode 100644
index 4f57100..0000000
--- a/src/contrib/TTrafic/readme.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-'*******************************************************************************
-'* *
-'* TTraffic 1.0.0 (distributed under GNU GENERAL PUBLIC LICENSE) *
-'* by kamborio *
-'* *
-'* ------------------------------------------------------ *
-'* _ _ _ *
-'* | | __ __ _ _ __ ___ | |__ ___ _ __ (_) ___ *
-'* | |/ / / _` || '_ ` _ \ | '_ \ / _ \ | '__|| | / _ \ *
-'* | < | (_| || | | | | || |_) || (_) || | | || (_) | *
-'* |_|\_\ \__,_||_| |_| |_||_.__/ \___/ |_| |_| \___/ *
-'* ------------------------------------------------------ *
-'* http://www.kamborio.com/ *
-'* *
-'* Copyright (C) 2001 David A. Pérez (david@kamborio.com) *
-'* *
-'* This program is free software; you can redistribute it and/or modify it *
-'* under the terms of the GNU General Public License as published by the Free *
-'* Software Foundation; either version 2 of the License, or (at your option) *
-'* any later version. *
-'* *
-'* This program is distributed in the hope that it will be useful, but WITHOUT *
-'* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
-'* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-'* more details. *
-'* *
-'* You should have received a copy of the GNU General Public License along *
-'* with this program; if not, write to the: *
-'* *
-'* Free Software Foundation, Inc. *
-'* 59 Temple Place - Suite 330 *
-'* Boston, MA 02111-1307, USA *
-'* *
-'*******************************************************************************
-
-TTrafic is a small VBScript to analyse MRTG (http://www.mrtg.org/) log files. By
-using this script, you will be able to know which amount of traffic is going
-through your interfaces.
-
-
-
-INSTALLATION
-
-Copy the file TTrafic.asp to the directory where MRTG is generating the HTML
-pages.
-
-The files generated by MRTG have the extension HTML by default. You have to edit
-your MRTG config file and modify it to make MRTG generate the HTML pages with
-the extension ASP.
-
-You should add or edit this line to your config file:
-
-Extension[_]: asp
-
-Now, you only need to include the file on the generated pages. The best way to do
-this, is by editing the MRTG config file and adding this line,
-
-<!-- #Include File = "TTrafic.asp" -->
-
-to the PageTop option.
-
-For example:
-
-Target[core.router.4]: 4:public@core.router
-MaxBytes[core.router.4]: 1310720
-Title[core.router.4]: core.router: Ethernet0
-PageTop[core.router.4]: <H1>Traffic Analysis for core.router: Ethernet0
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>core.router in the office</TD></TR>
- <TR><TD>Maintainer:</TD><TD>Myself</TD></TR>
- <TR><TD>Interface:</TD><TD>Ethernet0 (4)</TD></TR>
- <TR><TD>IP:</TD><TD> (10.0.0.1)</TD></TR>
- <TR><TD>Max Speed:</TD><TD>2.0 MBits/s</TD></TR>
- </TABLE>
- <!-- #Include File = "TTrafic.asp" -->
-
-
-
-QUERYS
-
-If the generated page is "core.router.4.asp", you can try to query the page like
-this:
-
-http://server/MRTG/core.router.4.asp?Period=365&Order=M
-
-This will give you the traffic information for the last 365 days. You can enter
-any value here. The default is 30 days.
-
-Order can be any of these values: K, M, G, T or P.
-
-K stands for kbytes, M for Megabytes, G for Gigabytes, T for Terabytes and P for
-Petabytes. If you enter any other value, you will receive the information in
-Bytes. The default is Gigabytes. \ No newline at end of file
diff --git a/src/contrib/TotalControlModem/example.txt b/src/contrib/TotalControlModem/example.txt
deleted file mode 100644
index f3be4e3..0000000
--- a/src/contrib/TotalControlModem/example.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-From webmaster@hiway.com.br Fri Feb 16 23:24:20 2001
-From: Fernando Braghetto - Webmaster Hiway <webmaster@hiway.com.br>
-Date: Thu, 15 Feb 2001 09:51:27 -0300
-Subject: [Contribution] TCH Modem
-
-
- [ Part 1.1, Text/PLAIN 86 lines. ]
- [ Unable to print this part. ]
-
-Tobias,
- 
-    I want to contrib with the MRTG.
-    I do not have time for add this to indexmaker / cfgmaker. Sorry!
-   
-    Actually I'm found some very good Objects IDs for the Total Control
-Modem Racks (3Com).
- 
-    To make management for the number of users connected in a HyperARC
-card (with HyperDSP modem) or Netserver card (with Quad-Modens and
-DualPri card) use this cfg:
-    (sorry for my bad english)
- 
-
-# Example of configuration by
-# Fernando Braghetto/Brazil - braghetto@hiway.com.br
-# created in Feb/15 2001
- 
-# TotalControl Temperature
-# change the IP Address 10.0.0.1 with the IP of Hyper NMC card (Network
-Management Card)
-#
-Target[TCTemp]:
-1.3.6.1.4.1.429.1.2.2.5.0&1.3.6.1.4.1.429.1.2.2.5.0:public@10.0.0.1
-MaxBytes[TCTemp]: 36
-Title[TCTemp]: Temperature
-ShortLegend[TCTemp]: ºC
-Unscaled[TCTemp]: ymwd
-YLegend[TCTemp]: Temperature
-LegendI[TCTemp]: &nbsp;System Temp&nbsp;
-LegendO[TCTemp]: &nbsp;System Temp&nbsp;
-Options[TCTemp]: gauge
-PageTop[TCTemp]:
-      <font face="Verdana">
-      <H2>Temperatura do TotalControl E1</H2>
- 
- 
- 
-# TotalControl Connected Users in HyperARC (using HyperDSP E1 modens)
-# change the IP Address 10.0.0.2 with the IP of Hyper ARC card (Routing
-Card)
-#
-Target[TCHDSP]:
-1.3.6.1.4.1.429.4.2.1.10.0&1.3.6.1.4.1.429.4.2.1.10.0:public@10.0.0.2:
-MaxBytes[TCHDSP]: 420
-Title[TCHDSP]: Connected Users
-ShortLegend[TCHDSP]: Users
-YLegend[TCHDSP]: Users
-LegendI[TCHDSP]: &nbsp;Connected Users&nbsp;
-LegendO[TCHDSP]: &nbsp;Connected Users&nbsp;
-Options[TCHDSP]: gauge
-PageTop[TCHDSP]:
-      <font face="Verdana">
- <H2>Number of Connected Users</H2>
- 
- 
- 
-# TotalControl Connected Users in Netserver Card (using Quad modens and
-Dual Pri Card)
-# change the IP Address 10.0.0.3 with the IP of Netserver card (Routing
-Card)
-#
-Target[TCNetserver]: 1.3.6.1.2.1.2.1.0&1.3.6.1.2.1.2.1.0:public@10.0.0.3
-MaxBytes[TCNetserver]: 56
-Title[TCNetserver]: Connected Users
-ShortLegend[TCNetserver]: Users
-Unscaled[TCNetserver]: ymwd
-YLegend[TCNetserver]: Users
-Legend1[TCNetserver]: Users
-Legend2[TCNetserver]: Users
-Legend3[TCNetserver]: Users
-Legend4[TCNetserver]: Users
-LegendI[TCNetserver]: &nbsp;Digital Connections&nbsp;
-LegendO[TCNetserver]: &nbsp;Analog Connections&nbsp;
-Options[TCNetserver]: gauge
-PageTop[TCNetserver]:
-      <font face="Verdana">
- <H2>Number of Connected Users</H2>
- 
- 
-Sincerly,
-Fernando Braghetto
-IT Manager, Network Admin, Webmaster
-Hiway Internet Provider - Brazil
-[IMAGE] 
-
-
- [ Part 2, Image/GIF 7.6KB. ]
- [ Unable to print this part. ]
-
diff --git a/src/contrib/accesslistmon/INSTALL b/src/contrib/accesslistmon/INSTALL
deleted file mode 100644
index 1ba51c1..0000000
--- a/src/contrib/accesslistmon/INSTALL
+++ /dev/null
@@ -1,51 +0,0 @@
-INSTALL file for Access-list Monitoring via MRTG
-
-
-First there are a few pre-requisites required in order to get the scripts going :
-
-A. MRTG :), which can be downloaded from :-
-http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
-
-B. A Cisco Router.
-
-C. Rsh enabled on the Cisco Router, this is done as follows :
-
-ip rcmd rsh-enable <--- Enabled the 'rsh' command/feature.
-ip rcmd remote-host root x.x.x.x root enable <---- Allows the username of root from the
-host x.x.x.x to execute commands via rsh.
-
-Once these commands have been enabled on the router you will be able to start executing
-commands using 'rsh' from the shell of the machine you have allowed access from, I suggest as
-an example try the following :
-
-rsh x.x.x.x sh ru
-
-If successful it should return a copy of you current 'running config' to the screen
-If you get an error message like this 'Permission denied.' Please check the rsh enable feature
-on the router to make sure you allow access for that host/username.
-
-Copy the scripts (which I have included in this package) into an appropriate directory to run
-from, example I use the following :
-/usr/local/mrtg/configs/accesslist
-Its up to you what you use.
-
-Also make sure the scripts are executable 'chmod 755' should do the trick.
-
-I have also included a copy of the mrtg.cfg file required to run the scripts and feed them
-onto the graph, this has the filename mrtg.cfg included in this package.
-
-There is one slight problem which I havent worked out as yet (if someone could help, hint,
-hint) is that when MRTG doesnt receive an integer for 'out' in other words if the access-list
-has returned 0 matches it will display an error message, the graph will still plot. This can
-be very annoying if you are running it from cron, as you mailbox can get filled up with cron
-error message, in my case I filter them to /dev/null using procmail.
-
-Thats it!
-
-I can be contacted by the following means :
-
-Email : roddy@satlink.com.au
-ICQ : 1987890
-
-
-Enjoy!
diff --git a/src/contrib/accesslistmon/README b/src/contrib/accesslistmon/README
deleted file mode 100644
index d6701ff..0000000
--- a/src/contrib/accesslistmon/README
+++ /dev/null
@@ -1,21 +0,0 @@
-README file for Access-list Monitoring via MRTG
-
-MRTG can be found at : http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
-
-
-What this script does :
-
-Basically I wanted to monitor how many hits I had to a particular access-list for a Cisco
-router. Rather than having to login and type the necessary commands, I thought it would be
-easier to write a shell script to do it for me.
-As MRTG is a graphing program, you can do almost anything with it, it then came into the
-equation that it is possible to graph it by feeding it into MRTG.
-
-
-Please see the INSTALL file for further instructions.
-
-
-
-N.B Please note I take no responsibility for any damage that is caused (not that it would I
-dont think).
-Feel free to modify the script any which way you wish.
diff --git a/src/contrib/accesslistmon/examplescript b/src/contrib/accesslistmon/examplescript
deleted file mode 100755
index 23a0a46..0000000
--- a/src/contrib/accesslistmon/examplescript
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-rsh x.x.x.x sh access-list 102 | grep icmp | grep matches | grep x.x.x.x | awk ' { print $8 }' | sed s/\(//
-echo "0"
-
-#The first line will rsh into the router and display access-list number 102 (this will change
-depending on your config), it will grep the access-list entry type in this case 'icmp', it
-will also grep the ip of the machine in question, and output the relevant information.
-
-Eg:
-
-10
-0
-
-10 = the number of times the ACL has matched.
-
-Remember you can change this to whatever you want.
diff --git a/src/contrib/accesslistmon/mrtg.cfg b/src/contrib/accesslistmon/mrtg.cfg
deleted file mode 100644
index 8558247..0000000
--- a/src/contrib/accesslistmon/mrtg.cfg
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add a WorkDir: /some/path line to this file
-Refresh: 300
-WriteExpires: Yes
-
-Target[examplescript]: `/usr/local/mrtg/configs/accesslist/examplescript`
-Options[examplescript]: gauge
-MaxBytes[examplescript]: 1000
-Title[examplescript]: Number of Ping attempts on machinename
-YLegend[examplescript]: Ping Attempts
-ShortLegend[examplescript]: Ping
-LegendO[examplescript]:
-PageTop[examplescript]: <H1>Number of Ping attempts on machinename
- <BR></H1>
- <TABLE>
- <TR><TD>System:</TD><TD>machinename </TD></TR>
- <TR><TD>Maintainer:</TD><TD>whoever</TD></TR>
- <TR><TD>Interface:</TD><TD>Number of Ping attempts on machinename</TD></TR>
- <TR><TD>IP:</TD><TD>x.x.x.x</TD><TR>
- <TR><TD>Max Amount:</TD>
- <TD>1000 </TD></TR>
- </TABLE>
diff --git a/src/contrib/adm-mrtg/adm-mrtg b/src/contrib/adm-mrtg/adm-mrtg
deleted file mode 100755
index c2aeaf6..0000000
--- a/src/contrib/adm-mrtg/adm-mrtg
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/bin/ksh
-
-# This script organizes config files for MRTG
-# and restarts the MRTG processes cleanly.
-
-# Author: Scott Ripley, U.S. House of Representatives
-# Version: 1.0 (and all that a 1.0 release entails)
-# Contact: scott.ripley@mail.house.gov
-# Copyright: (C) 2001 Scott Ripley
-
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# See the GNU General Public License for more details.
-
-
-# Change these directores to match your configuration for MRTG
-MRTG=/usr/local/mrtg/bin
-# TARHOME is the location of the back-up files. It should be another volume
-TARHOME=/usr/local/mrtg/bin
-# Location of log files
-WEBHOME=/usr/local/apache/htdocs/mrtg_images
-
-cd $MRTG
-
-# Initialize the variables and temp files
-
-typeset -i CFGLINE
-typeset -i MAXLINE
-CFGLINE=1
-MAXLINE=1
-CFG="$MRTG"/mrtgcfgs.run
-CFGNUM="$MRTG"/cfgnum.run
-MCNAME=`uname -n`
-EXIT=N
-DATE=`date '+%m%d%y%H%M' `
-# TARHOME is the location of the back-up files. It should be another volume
-TARHOME=/usr/local/mrtg/bin
-WEBHOME=/usr/local/apache/htdocs/mrtg_images
-
-# Set tabs for display columns
-stty tabs
-tabs 10,30,40,45
-
-# Main loop
-while [ "$EXIT" = N ]
-do
- # reads the pid files and inputs them into a file
- ls -go *pid | sed 's/[ ][ ]/ /g' | cut -d"." -f1 > "$CFG"
-
- nl -bt -nrz -w2 "$CFG" > "$CFGNUM" # numbers the lines in the file
-
- # sets the number of configs loaded, for error testing
- MAXLINE=`wc -l "$CFG" | cut -d" " -f7 `
-
- clear
- printf "\n\nThe following MRTG configs are running on "$MCNAME":\n"
-
- printf "\n\tConfig name\t\tRunning Since\n"
- printf "\t-----------\t\t-------------\n"
-
-
- # prints out the appropriate fields on-screen
- nawk ' { print "\t" $1,$8".cfg \t\t" $5,$6,$7 } ' "$CFGNUM"
- printf "\n"
- printf " Which file would you like to reload? (b to back-up, q to quit) \c"
- read X
-
- case "$X" in
- [qQ] )
- EXIT=Y # I quit!
- ;;
-
- [bB] )
- printf "\n Backup *.cfg & *.log files? \c"
- read V
- case "$V" in
- 'y' | 'Y' )
-
- CNAME=MRTG_"$DATE".cfgs.tar
- tar cvf "$TARHOME"/"$CNAME" "$MRTG"/*.cfg
- chmod 0400 "$TARHOME"/"$CNAME"
- LNAME=MRTG_"$DATE".logs.tar
- find "$WEBHOME" | egrep -e "\.log$|\.old$" > mrtgtar.run
- tar cvf "$LNAME" -I mrtgtar.run
- chmod 0600 "$TARHOME"/"$CNAME"
- chmod 0600 "$TARHOME"/"$LNAME"
- # printf "\nGzipping files..."
- # gzip "$TARHOME"/"$CNAME"
- # gzip "$TARHOME"/"$LNAME"
- printf "\nConfig files backed up to `ls "$TARHOME"/MRTG_"$DATE".cfg*` "
- printf "\nLog files backed up to `ls "$TARHOME"/MRTG_"$DATE".log*` "
- printf "\nPress return to continue..."
- read U
- ;;
- * )
- printf "\nBackup aborted."
- sleep 3
- ;;
- esac
- ;;
-
- [0-9][0-9] ) # If the number entered is between 0 and 99...
-
- # and if the number is <= the no. of configs loaded
- if [ "$X" -le "$MAXLINE" ] #
- then
-
- FILE=`sed -n ''$X'p' "$CFGNUM" | cut -d" " -f11 ` # put filename into $FILE
-
- echo " Okay to restart "$FILE".cfg? \c"
- read Y
-
- case "$Y" in
- 'y' | 'Y' )
- FKILL=`cat "$MRTG""/""$FILE"".pid"` # Set the variable with the PID
- kill -9 $FKILL # Kill it
- rm $MRTG/$FILE".pid" # Remove the file
- $MRTG"/mrtg" $FILE".cfg" # Restart MRTG with the config file
- sleep 8 # Wait for new PID file to be created
- echo "New PID for "$FILE".cfg is `cat "$MRTG"/"$FILE".pid` "
- ;;
- *)
- echo "\nRestart aborted!"
- ;;
- esac
- else
- echo "Entry Invalid! Press return to continue..."
- read ZZ
- fi
- ;;
- *)
- echo "Entry Invalid! Press return to continue..."
- read ZZ
- ;;
- esac
-
-done
- # For security/housekeeping reasons, we clean out the temp files here.
- cat /dev/null > "$MRTG"/mrtgcfgs.run
- cat /dev/null > "$MRTG"/cfgnum.run
- cat /dev/null > "$MRTG"/cfgsed.run
- cat /dev/null > "$MRTG"/mrtgtar.run
-exit 0
diff --git a/src/contrib/adm-mrtg/adm-mrtg.README b/src/contrib/adm-mrtg/adm-mrtg.README
deleted file mode 100644
index 8152bb1..0000000
--- a/src/contrib/adm-mrtg/adm-mrtg.README
+++ /dev/null
@@ -1,66 +0,0 @@
-This script organizes config files for MRTG
-and restarts the MRTG processes cleanly.
-
-Author: Scott Ripley, U.S. House of Representatives
-Version: 1.0 (and all that a 1.0 release entails)
-Contact: scott.ripley@mail.house.gov
-Copyright: (C) 2001 Scott Ripley
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-1.0 Installing
-
-Since this is just a shell script, it can be installed anywhere.
-The standard location is the /usr/local/sbin directory. It creates
-temp files in the same directory as the MRTG binaries, which are
-cleared out at the end of the script.
-
-2.0 Configuration
-
-You will need to set your pathnames for MRTG, a back-up directory,
-and the location of your log files. That's it.
-
-Note: This script only works if you are running MRTG as a daemon.
-It relies on the presence of .pid files to identify your scripts.
-
-3.0 Using adm-mrtg
-
-The script reads mrtg's bin directory for pid files and displays
-the appropriate config name on-screen.
-
-If you make a change to a config file and want to reload it, type
-in the number of the config file name. It will kill the process,
-remove the .pid file and restart it. Once you go back to the home
-screen, you should see a new date for that config under the
-"Running" column.
-
-4.0 Backing up with adm-mrtg
-
-It is vitally important that you back up your config and log files
-from time to time. Adm-mrtg will do that for you with the simple
-press of the 'b' key.
-
-It puts all your config files into a tar file with the format
-"MRTG_<date>.cfgs.tar." It does the same with your .log and .old files.
-If you want to gzip the files, you can uncomment the gzip lines in the
-script.
-
-5.0 Technical notes
-
-The script was written in ksh on Solaris 7, but there's nothing
-particularly machine-specific in it. It should only require minor
-tweaking for other OS/shell combinations.
-
-If you have changes or additions you'd like to make, I would enjoy
-seeing a copy. Please e-mail your changes/comments/ideas to:
-scott.ripley@mail.house.gov, or nevada@mac.com.
-
-Thank you.
diff --git a/src/contrib/apc_ups/README b/src/contrib/apc_ups/README
deleted file mode 100644
index 5314705..0000000
--- a/src/contrib/apc_ups/README
+++ /dev/null
@@ -1,9 +0,0 @@
-From: Klaus_Klein@mckinsey.com
-Date: Thu, 3 May 2001 16:31:45 +0200
-
-Hi tobias,
-
-As suggested, I send you some of my configuration files: these ones are
-using a PERL script to extract the load % and remaining battery time from
-APC UPS systems.
-prerequisite: have PERL and an SNMP suite installed.
diff --git a/src/contrib/apc_ups/ups.cfg b/src/contrib/apc_ups/ups.cfg
deleted file mode 100644
index 1b1b828..0000000
--- a/src/contrib/apc_ups/ups.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-WorkDir: /home/mrtguser/data
-Title[^]: UPS load information
-PageTop[^]: <H1>Stats for
-PageTop[$]: <HR>
-
-
-#-----------------------------------------------------
-
-Title[eu-ups01]: EU-UPS01
-PageTop[eu-ups01]: EU-UPS01</H1>
-Background[eu-ups01]: #FFFFCC
-Target[eu-ups01]: `/home/mrtguser/upsdata01.pl`
-MaxBytes[eu-ups01]: 600
-Options[eu-ups01]: growright, gauge, nopercent
-WithPeak[eu-ups01]: wmy
-YLegend[eu-ups01]: value
-ShortLegend[eu-ups01]:  
-Legend1[eu-ups01]: remaining time
-Legend2[eu-ups01]: % utilization
-Legend3[eu-ups01]: Maximal remaining time
-Legend4[eu-ups01]: Maximal % utilization
-LegendI[eu-ups01]: &nbsp;time(minutes):
-LegendO[eu-ups01]: &nbsp;load(%):
diff --git a/src/contrib/apc_ups/upsdata01.pl b/src/contrib/apc_ups/upsdata01.pl
deleted file mode 100644
index d4ff78c..0000000
--- a/src/contrib/apc_ups/upsdata01.pl
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/perl
-#
-# Script to convert runtime MIB variable for UPS into minutes
-
-$a=`/usr/bin/snmpget <SERVERNAME> <COMMUNITY> .1.3.6.1.4.1.318.1.1.1.2.2.3.0`;
-chomp $a;
-@b=split(/ /,$a);
-@c=split(/:/,$b[4]);
-@d=split(/ /,`/usr/bin/snmpget <SERVERNAME> <COMMUNITY> .1.3.6.1.4.1.318.1.1.1.4.2.3.0`);
-chomp $d;
-print eval($c[0] * 60 + $c[1]),"\n";
-print $d[3]; \ No newline at end of file
diff --git a/src/contrib/ascendget/ascendget b/src/contrib/ascendget/ascendget
deleted file mode 100644
index 667a4c6..0000000
--- a/src/contrib/ascendget/ascendget
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/csh
-# You will need to use the included snmpwalk program, which has been
-# modified from the original version supplied with the SCOTTY Tcl
-# Extensions for Network Management:
-# (http://wwwsnmp.cs.utwente.nl/~schoenw/scotty)
-# If you don't already have TCL, you will need tcl 7.5 too.
-#
-# IF YOU DON'T ALREADY HAVE IT, you will also need to download the
-# ASCEND.MIB file from Ascend's FTP site (ftp.ascend.com) and
-# autoload it in your tnm-2.1.X/library/init.tcl library file.
-#
-# change bank1name to the domain name or IP address of your first Ascend
-# change bank2name to the domain name or IP address of your second Ascend
-# change bank1community to the SNMP community string of bank1
-# change bank2community to the SNMP community string of bank2
-
-set bank1name="bank1.domain.com"
-set bank2name="bank2.domain.com"
-set bank1community="bank1community"
-set bank2community="bank2community"
-
-set MODEMS1=`snmpwalk $bank1name $bank2name mdmLineState|grep -i
-connect|
-wc -l`
-set MODEMS2=`snmpwalk mso2 ism2MARS mdmLineState|grep -i
-connect|
-wc -l`
-set UPTIME=`/usr/local/bin/snmpwalk mso1 ism2MARS system.sysUpTime|cut -c
-20-80`
-set DESCRIP=`/usr/local/bin/snmpwalk mso1 ism2MARS system.sysDescr|cut -c
-20-80`
-
-set MODEMS=`calc $MODEMS1 + $MODEMS2`
-
-echo $MODEMS
-echo $MODEMS
-echo $UPTIME
-echo $DESCRIP
diff --git a/src/contrib/atmmaker/atmmaker b/src/contrib/atmmaker/atmmaker
deleted file mode 100644
index a3ef0b4..0000000
--- a/src/contrib/atmmaker/atmmaker
+++ /dev/null
@@ -1,431 +0,0 @@
-#!/opt/gnu/bin/perl
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Cloned form cfgmaker Mark Trettin <mkt@lucent.com>
-# Created by Tobias Oetiker <oetiker@ee.ethz.ch>
-# this produces a config file for one router, by bulling info
-# off the router via snmp
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: atmmaker,v 1.1.1.1 2002/02/26 10:16:31 oetiker Exp $
-#
-use SNMP_Session;
-use BER;
-use Socket;
-use strict;
-
-%snmpget::OIDS = ( 'sysDescr' => '1.3.6.1.2.1.1.1.0',
- 'sysContact' => '1.3.6.1.2.1.1.4.0',
- 'sysName' => '1.3.6.1.2.1.1.5.0',
- 'sysLocation' => '1.3.6.1.2.1.1.6.0',
- 'sysUptime' => '1.3.6.1.2.1.1.3.0',
- 'ifNumber' => '1.3.6.1.2.1.2.1.0',
- ###################################
- # add the ifNumber ....
- 'ifDescr' => '1.3.6.1.2.1.2.2.1.2',
- 'ifType' => '1.3.6.1.2.1.2.2.1.3',
- 'ifIndex' => '1.3.6.1.2.1.2.2.1.1',
- 'ifSpeed' => '1.3.6.1.2.1.2.2.1.5',
- 'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8',
- 'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7',
- # up 1, down 2, testing 3
- 'ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- # asx port group info
- 'asxPortAdmnStat' => '1.3.6.1.4.1.326.2.2.2.1.2.2.1.2',
- 'asxPortOperStat' => '1.3.6.1.4.1.326.2.2.2.1.2.2.1.3',
- 'asxPortRemoteIpAddress'=> '1.3.6.1.4.1.326.2.2.2.1.2.2.1.6',
- 'asxPortILMIRemoteIpAddress' => '1.3.6.1.4.1.326.2.2.2.1.2.2.1.22',
- 'asxPortMaxBandwidthIn' => '1.3.6.1.4.1.326.2.2.2.1.2.2.1.9',
- 'asxhwPortName' => '1.3.6.1.4.1.326.2.2.1.1.2.3.1.13',
- 'asxPortNumber' => '1.3.6.1.4.1.326.2.2.2.1.2.2.1.1',
- );
-
-
-
-
-sub main {
-
-
- my(%ifType_d)=('1'=>'Other',
- '2'=>'regular1822',
- '3'=>'hdh1822',
- '4'=>'ddnX25',
- '5'=>'rfc877x25',
- '6'=>'ethernetCsmacd',
- '7'=>'iso88023Csmacd',
- '8'=>'iso88024TokenBus',
- '9'=>'iso88025TokenRing',
- '10'=>'iso88026Man',
- '11'=>'starLan',
- '12'=>'proteon10Mbit',
- '13'=>'proteon80Mbit',
- '14'=>'hyperchannel',
- '15'=>'fddi',
- '16'=>'lapb',
- '17'=>'sdlc',
- '18'=>'ds1',
- '19'=>'e1',
- '20'=>'basicISDN',
- '21'=>'primaryISDN',
- '22'=>'propPointToPointSerial',
- '23'=>'ppp',
- '24'=>'softwareLoopback',
- '25'=>'eon',
- '26'=>'ethernet-3Mbit',
- '27'=>'nsip',
- '28'=>'slip',
- '29'=>'ultra',
- '30'=>'ds3',
- '31'=>'sip',
- '32'=>'frame-relay',
- '33'=>'rs232',
- '34'=>'para',
- '35'=>'arcnet',
- '36'=>'arcnetPlus',
- '37'=>'atm',
- '38'=>'miox25',
- '39'=>'sonet',
- '40'=>'x25ple',
- '41'=>'iso88022llc',
- '42'=>'localTalk',
- '43'=>'smdsDxi',
- '44'=>'frameRelayService',
- '45'=>'v35',
- '46'=>'hssi',
- '47'=>'hippi',
- '48'=>'modem',
- '49'=>'aal5',
- '50'=>'sonetPath',
- '51'=>'sonetVT',
- '52'=>'smdsIcip',
- '53'=>'propVirtual',
- '54'=>'propMultiplexor',
- '55'=>'100BaseVG'
- );
-
- my($community,$router) = split /\@/, $ARGV[0];
- die <<USAGE unless $community && $router;
-
-USAGE: cfgmaker 'community'\@'router'
-
-EXAMPLE: cfgmaker public\@ezwf7.ethz.ch >>mrtg.cfg
-
-USAGE
-
-
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) =
- snmpget($router,$community,
- 'sysDescr','sysContact','sysName', 'sysLocation', 'ifNumber',
- 'sysObjectID');
- $sysDescr =~ s/\r/<BR>/g; # Change returns to <BR>
- my($cisco_router_sysid) = '1\.3\.6\.1\.4\.1\.9';
- my($ciscobox) = ($sysObjectID =~ /^$cisco_router_sysid/);
- my($foreasx_switch_sysid) = '1\.3\.6\.1\.4\.1\.326';
- my($foreasx) = ($sysObjectID =~ /^$foreasx_switch_sysid/);
-
- print <<ECHO;
-
-
-######################################################################
-# Description: $sysDescr
-# Contact: $sysContact
-# System Name: $sysName
-# Location: $sysLocation
-#.....................................................................
-ECHO
-
- my @ipadent = snmpgettable($router,$community, 'ipAdEntAddr');
- my @ipadentif = snmpgettable($router,$community, 'ipAdEntIfIndex');
-
- my(%ipaddr, %iphost,$index);
- while (scalar @ipadentif){
- $index = shift @ipadentif;
- $ipaddr{$index} = shift @ipadent;
- $iphost{$index} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$index})), AF_INET);
- if ($iphost{$index} eq ''){
- $iphost{$index} = 'No hostname defined for IP address';
- }
- }
-
- my(@ifdescr) = snmpgettable($router,$community, 'ifDescr');
- my(@iftype) = snmpgettable($router,$community, 'ifType');
- my(@ifspeed) = snmpgettable($router,$community, 'ifSpeed');
- my(@ifadminstatus) = snmpgettable($router,$community, 'ifAdminStatus');
- my(@ifoperstatus) = snmpgettable($router,$community, 'ifOperStatus');
- my(@ifindex) = snmpgettable($router,$community, 'ifIndex');
-
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- my @ciscodescr;
- if ($ciscobox) {
- @ciscodescr = snmpgettable($router,$community, 'CiscolocIfDescr');
- }
-
-
- if ($foreasx) {
- # Get the FORE ATM Switch port configurations
- # if it's a ASX Switch
-
- my @asxipaddress;
- my @asxilmiaddress;
- my @asxifadminstatus;
- my @asxifoperstatus;
- my @asxifilmiaddress;
- my @asxifipaddress;
- my @asxmaxbandwidthin;
- my @asxhwportname;
- my @asxportnumber;
-
- @asxportnumber = snmpgettable($router,$community, 'asxPortNumber');
- @asxhwportname = snmpgettable($router,$community, 'asxhwPortName');
- @asxipaddress = snmpgettable($router,$community, 'asxPortRemoteIpAddress');
- @asxilmiaddress = snmpgettable($router,$community, 'asxPortILMIRemoteIpAddress');
- @asxmaxbandwidthin = snmpgettable($router,$community, 'asxPortMaxBandwidthIn');
- @asxifadminstatus = snmpgettable($router,$community, 'asxPortAdmnStat');
- @asxifoperstatus = snmpgettable($router,$community, 'asxPortOperStat');
-
-
- my(%ipaddr, %iphost,%ipiladdr, %ipilhost);
-
- my(%sportnumber, %sportname, %sifadminstatus, %sifoperstatus, %smaxbandwidth);
-
- while (scalar @asxportnumber) {
- $index = shift @asxportnumber;
- $sportnumber{$index} = $index;
- $sportname{$index} = shift @asxhwportname;
- $smaxbandwidth{$index} = shift @asxmaxbandwidthin;
- $sifadminstatus{$index} = shift @asxifadminstatus;
- $sifoperstatus{$index} = shift @asxifoperstatus;
- $ipaddr{$index} = shift @asxipaddress;
- $ipiladdr{$index} = shift @asxilmiaddress;
-
- $iphost{$index} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$index})), AF_INET);
- if ($iphost{$index} eq ''){
- $iphost{$index} = $ipaddr{$index};
- }
- $ipilhost{$index} =
- gethostbyaddr(pack('C4',split(/\./,$ipiladdr{$index})), AF_INET);
- if ($ipilhost{$index} eq ''){
- $ipilhost{$index} = $ipiladdr{$index};
- }
- }
-
- foreach $index (keys %sportnumber) {
- my $c;
- my $speed = int($smaxbandwidth{$index}*53); # cells to bytes
- my $speed_str=&fmi($speed);
- my $name="$router.$index";
-
- if (($sifoperstatus{$index} != 1)
- && ($sifadminstatus{$index} == 3)) {
- print <<ECHO;
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- } else {
- $c = '';
- }
-
- print <<ECHO;
-${c}
-${c}Target[$name]: CellsRcvd.$index&CellsTrans.$index:$community\@$router \* 53
-${c}MaxBytes[$name]: $speed
-${c}Options[$name]: growright
-${c}WithPeak[$name]: dwmy
-${c}Title[$name]: $sysName ($iphost{$index}): $sportname{$index}
-${c}PageTop[$name]: <H1>Traffic Analysis for $sportname{$index}
-${c} </H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sportname{$index} ($index)</TD></TR>
-ECHO
- print <<ECHO if $iphost{$index}!="255.255.255.255";
-${c} <TR><TD>Remote IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-ECHO
- print <<ECHO if $ipilhost{$index}!="255.255.255.255";
-${c} <TR><TD>Remote ILMI IP:</TD><TD>$ipilhost{$index} ($ipiladdr{$index})</TD></TR>
-ECHO
- print <<ECHO;
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>$speed_str (Sonet)</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-ECHO
- }
- }
- else {
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr);
- while (scalar @ifindex) {
- # as these arrays get filled from the bottom,
- # we need to empty them from the botom as well ...
- # fifo
- $index = shift @ifindex;
- $sifdesc{$index} = shift @ifdescr;
- $siftype{$index} = shift @iftype;
- print STDERR $siftype{$index};
- $sifspeed{$index} = shift @ifspeed;
- $sifadminstatus{$index} = shift @ifadminstatus;
- $sifoperstatus{$index} = shift @ifoperstatus;
- # especially since cisco does not return a if
- # descr for each interface it has ...
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-
- foreach $index (keys %sifdesc) {
- my $c;
- my $speed = int($sifspeed{$index} / 8); # bits to byte
- my $speed_str=&fmi($speed);
- my $name="$router.$index";
-
- if (($sifadminstatus{$index} != 1)
- || ($siftype{$index} == 24)
- || ($speed == 0 )
- || ($speed > 400 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($sifoperstatus{$index} == 3)) {
- print <<ECHO;
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- }else {
- $c = '';
- }
-
- print <<ECHO;
-${c}
-${c}Target[$name]: $index:$community\@$router
-${c}MaxBytes[$name]: $speed
-${c}Options[$name]: growright
-${c}WithPeak[$name]: dwmy
-${c}Title[$name]: $sysName ($iphost{$index}): $sifdesc{$index}
-${c}PageTop[$name]: <H1>Traffic Analysis for $sifdesc{$index}
-${c} $sciscodescr{$index}</H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sifdesc{$index} ($index)</TD></TR>
-${c} <TR><TD>IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>$speed_str ($ifType_d{$siftype{$index}})</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-ECHO
- }
- }
-}
-
-main;
-exit(0);
-
-sub snmpget{
- my($host,$community,@vars) = @_;
- my(@enoid, $var,$response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@retvals);
- foreach $var (@vars) {
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
- push @enoid, encode_oid((split /\./, $snmpget::OIDS{$var}));
- }
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- if ($session->get_request_response(@enoid)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- $session->close ();
- while ($bindings) {
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- my $tempo = pretty_print($value);
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
-
- push @retvals, $tempo;
- }
-
- return (@retvals);
- } else {
- die "No answer from $ARGV[0]. You may be using the wrong community\n";
- }
-}
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
- $tempo = pretty_print($value);
- #print "$var: '$tempo'\n";
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @table, $tempo;
-
- } else {
- die "No answer from $ARGV[0]\n";
- }
- $enoid=$next_oid;
- }
- $session->close ();
- return (@table);
-}
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
- @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s","TBytes/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 4) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
-
-
diff --git a/src/contrib/cfgmaker_ATM/README b/src/contrib/cfgmaker_ATM/README
deleted file mode 100644
index bcecd58..0000000
--- a/src/contrib/cfgmaker_ATM/README
+++ /dev/null
@@ -1,13 +0,0 @@
-From: Henry Steinhauer <H1STEINH@hewitt.com>
-Date: Tue, 15 Jun 1999 17:00:07 -0500
-
-This is gutted code from the other CFGmaker_ATM.pl code.
-
-This will pull the information from the Bay MIB for the SVC ATM setup and
-then create a target for each channel in the ATM that is defined.
-
-The Targets created can be sorted in the Indexmaker such that the Named ATM
-channel will have all the Subchannels grouped together.
-
-Enjoy.
-Henry Steinhauer
diff --git a/src/contrib/cfgmaker_ATM/cfgmaker_atm.pl b/src/contrib/cfgmaker_ATM/cfgmaker_atm.pl
deleted file mode 100644
index 258f178..0000000
--- a/src/contrib/cfgmaker_ATM/cfgmaker_atm.pl
+++ /dev/null
@@ -1,563 +0,0 @@
-#!/usr/drwho/local/bin/perl
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Created by Tobias Oetiker <oetiker@ee.ethz.ch>
-# this produces a config file for one router, by bulling info
-# off the router via snmp
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: cfgmaker_atm.pl,v 1.1.1.1 2002/02/26 10:16:31 oetiker Exp $
-#
-use SNMP_Session "0.56";
-use BER "0.54";
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-
-%snmpget::OIDS = ( 'sysDescr' => '1.3.6.1.2.1.1.1.0',
- 'sysContact' => '1.3.6.1.2.1.1.4.0',
- 'sysName' => '1.3.6.1.2.1.1.5.0',
- 'sysLocation' => '1.3.6.1.2.1.1.6.0',
- 'sysUptime' => '1.3.6.1.2.1.1.3.0',
- 'ifNumber' => '1.3.6.1.2.1.2.1.0',
- ###################################
- # add the ifNumber ....
- 'ifDescr' => '1.3.6.1.2.1.2.2.1.2',
- 'ifType' => '1.3.6.1.2.1.2.2.1.3',
- 'ifIndex' => '1.3.6.1.2.1.2.2.1.1',
- 'ifSpeed' => '1.3.6.1.2.1.2.2.1.5',
- 'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8',
- 'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7',
- # up 1, down 2, testing 3
- 'ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18',
- 'ifAtmLecConfigEntry' => '1.3.6.1.4.1.18.3.5.9.5.20.1.1.8',
- 'ifAtmLecConfigName' => '1.3.6.1.4.1.18.3.5.9.5.20.1.1.3',
- 'ifAtmVclConfEntry' => '1.3.6.1.4.1.18.3.4.23.1.5.1.22',
- 'ifAtmVclConf2' => '1.3.6.1.4.1.18.3.4.23.1.5.1.2',
- 'ifAtmVclConf3' => '1.3.6.1.4.1.18.3.4.23.1.5.1.4',
- 'ifAtmizerVclStatsEntry' => '1.3.6.1.4.1.18.3.4.23.3.4.1.7',
- 'ifAtmizerVclStatsEntr1' => '1.3.6.1.4.1.18.3.4.23.3.4.1.1',
- 'ifAtmizerVclStatsEntr2' => '1.3.6.1.4.1.18.3.4.23.3.4.1.3',
-
-
- );
-
-
-
-sub main {
-
-
- my(%ifType_d)=('1'=>'Other',
- '2'=>'regular1822',
- '3'=>'hdh1822',
- '4'=>'ddnX25',
- '5'=>'rfc877x25',
- '6'=>'ethernetCsmacd',
- '7'=>'iso88023Csmacd',
- '8'=>'iso88024TokenBus',
- '9'=>'iso88025TokenRing',
- '10'=>'iso88026Man',
- '11'=>'starLan',
- '12'=>'proteon10Mbit',
- '13'=>'proteon80Mbit',
- '14'=>'hyperchannel',
- '15'=>'fddi',
- '16'=>'lapb',
- '17'=>'sdlc',
- '18'=>'ds1',
- '19'=>'e1',
- '20'=>'basicISDN',
- '21'=>'primaryISDN',
- '22'=>'propPointToPointSerial',
- '23'=>'ppp',
- '24'=>'softwareLoopback',
- '25'=>'eon',
- '26'=>'ethernet-3Mbit',
- '27'=>'nsip',
- '28'=>'slip',
- '29'=>'ultra',
- '30'=>'ds3',
- '31'=>'sip',
- '32'=>'frame-relay',
- '33'=>'rs232',
- '34'=>'para',
- '35'=>'arcnet',
- '36'=>'arcnetPlus',
- '37'=>'atm',
- '38'=>'miox25',
- '39'=>'sonet',
- '40'=>'x25ple',
- '41'=>'iso88022llc',
- '42'=>'localTalk',
- '43'=>'smdsDxi',
- '44'=>'frameRelayService',
- '45'=>'v35',
- '46'=>'hssi',
- '47'=>'hippi',
- '48'=>'modem',
- '49'=>'aal5',
- '50'=>'sonetPath',
- '51'=>'sonetVT',
- '52'=>'smdsIcip',
- '53'=>'propVirtual',
- '54'=>'propMultiplexor',
- '55'=>'100BaseVG'
- );
-
- my($vendor)=0;
- if ($ARGV[0] eq '--vendor') {
- $vendor = 1; shift @ARGV};
-
- my($community,$router) = split /\@/, $ARGV[0];
- die <<USAGE unless $community && $router;
-
-USAGE: cfgmaker [--vendor] 'community'\@'router'
-
-use the --vendor option to try and wrestle some better information
-from willing livingston and cisco routers ... (may not work)
-
-EXAMPLE: cfgmaker public\@ezwf7.ethz.ch >>mrtg.cfg
-
-
-USAGE
-
-
-
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) =
- snmpget($router,$community,
- 'sysDescr','sysContact','sysName', 'sysLocation', 'ifNumber', 'sysObjectID');
-
- $sysDescr =~ s/\r/<BR>/g; # Change returns to <BR>
- my($cisco_router_sysid) = '1\.3\.6\.1\.4\.1\.9';
- my($livingston_router_sysid) = '1\.3\.6\.1\.4\.1\.307';
- my($ciscobox) = ($sysObjectID =~ /^$cisco_router_sysid/);
- my($portmaster) = ($sysObjectID =~ /^$livingston_router_sysid/);
-
- print <<ECHO;
-
-WorkDir: d:\\mrtg\\pub\\www\\stats\\mrtg
-
-######################################################################
-# Description: $sysDescr
-# Contact: $sysContact
-# System Name: $sysName
-# Location: $sysLocation
-#.....................................................................
-ECHO
-
- my @ipadent = snmpgettable($router,$community, 'ipAdEntAddr');
- print "Got Addresses\n" if $DEBUG;
- my @ipadentif = snmpgettable($router,$community, 'ipAdEntIfIndex');
- print "Got IfTable\n" if $DEBUG;
- my @ifatmlec = snmpgettable($router,$community, 'ifAtmLecConfigEntry');
- print "Got ifAtmLecConfigEntry\n" if $DEBUG;
- my @ifatmlecName = snmpgettable($router,$community, 'ifAtmLecConfigName');
- print "Got ifatmlecName\n" if $DEBUG;
- my @ifatmvcl = snmpgettable($router,$community, 'ifAtmVclConfEntry');
- print "Got ifAtmVclConfEntry\n" if $DEBUG;
- my @ifatmpvc = snmpgettable($router,$community, 'ifAtmizerVclStatsEntry');
- print "Got ifAtmizerVclStatsEntry\n" if $DEBUG;
- my @ifatmVclConf2 = snmpgettable($router,$community, 'ifAtmVclConf2');
- print "Got ifAtmVclConf2\n" if $DEBUG;
- my @ifatmVclConf3 = snmpgettable($router,$community, 'ifAtmVclConf3');
- print "Got ifAtmVclConf3\n" if $DEBUG;
-my @ifatmpvc1 = snmpgettable($router,$community, 'ifAtmizerVclStatsEntr1');
- print "Got ifatmpvc1\n" if $DEBUG;
-my @ifatmpvc2 = snmpgettable($router,$community, 'ifAtmizerVclStatsEntr2');
- print "Got ifatmpvc2\n" if $DEBUG;
-
-
-# get circuit name 'ifAtmVclConf2'
-# get atm Interface number 'ifAtmVclConf3'
-# get atm interface -> atm_name 'ifAtmVclConfEntry'
-
-
-
- my(%ipaddr, %iphost,$index);
-
- while (scalar @ipadentif){
- $index = shift @ipadentif;
- $ipaddr{$index} = shift @ipadent;
- # $iphost{$index} =
- # gethostbyaddr(pack('C4',split(/\./,$ipaddr{$index})), AF_INET);
- # if ($iphost{$index} eq ''){
- $iphost{$index} = ' ';
- # }
- }
-
- my(@ifdescr) = snmpgettable($router,$community, 'ifDescr');
- print "Got IfDescr\n" if $DEBUG;
- my(@iftype) = snmpgettable($router,$community, 'ifType');
- print "Got IfType\n" if $DEBUG;
- my(@ifspeed) = snmpgettable($router,$community, 'ifSpeed');
- print "Got IfSpeed\n" if $DEBUG;
- my(@ifadminstatus) = snmpgettable($router,$community, 'ifAdminStatus');
- print "Got IfAdminStatus\n" if $DEBUG;
- my(@ifoperstatus) = snmpgettable($router,$community, 'ifOperStatus');
- print "Got IfOperStatus\n" if $DEBUG;
- my(@ifindex) = snmpgettable($router,$community, 'ifIndex');
- print "Got IfIndex\n" if $DEBUG;
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr);
-
- ### May need the cisco IOS version number so we know which oid to use
- ### to get the cisco description.
- ###
- ### - mjd 2/5/98 (Mike Diehn) (mdiehn@mindspring.net)
- ###
- my ($cisco_ver, $cisco_descr_oid, @ciscodescr);
- my (%atmindex, %atmindex2, %atmCir, %atmindex5, $atmindex2);
-
- if ( $ciscobox ) {
- ($cisco_ver) = ($sysDescr =~ m/Version\s+([\d.]+)\(\d+\)\w*?,/o);
- $cisco_descr_oid = ($cisco_ver ge "11.2") ? "ifAlias" : "CiscolocIfDescr";
- }
-print "Print from ifatmlecname \n" if $DEBUG;
-
- while (scalar @ifatmlecName) {
- $index = shift @ifatmlecName;
- $sifdesc{$index} = shift @ifatmlec;
- $siftype{$index} = '';
- $sifspeed{$index} = '';
- $sifadminstatus{$index} = '';
- $sifoperstatus{$index} = '';
- my $atm_Index = $index;
- my $name = "$router.$index";
- my $name2 = "$router.$sifdesc{$index}";
-
-print "$sifdesc{$index}: '$sifdesc{$index}'\n" if $DEBUG;
-print "$index: $atm_Index: $name: $name2: $sifdesc{$index}\n" if $DEBUG;
-
- }
- my $jet2;
-
-
- print " sifdesc \n" if $DEBUG;
-foreach $jet2 (%sifdesc) {
- print "$jet2 \n" if $DEBUG;
- }
-
-
-print "Print from ifatmpvc1 \n" if $DEBUG;
-
- while (scalar @ifatmpvc2) {
- $index = shift @ifatmpvc2;
- $atmindex{$index} = $index;
- $atmCir{$index} = shift @ifatmpvc1;
- my $atm_Index_Base = $index;
- my $atm_Index = $atmindex{$index};
- my $name = $atmCir{$index};
- my $atm_index2 = $atmindex2{$index};
-print "$index: $atm_Index_Base: $atm_Index: $name: $atm_index2\n" if $DEBUG;
-
-
-print "$index: '$index'\n" if $DEBUG;
-print "$atmindex{$index}: '$atmindex{$index}'\n" if $DEBUG;
-print "$atmCir{$index}: '$atmCir{$index}'\n" if $DEBUG;
-print "$atmindex2{$index}: '$atmindex2{$index}'\n" if $DEBUG;
-}
-
- while (scalar @ifatmVclConf3) {
- $index = shift @ifatmVclConf3;
- $atmindex2{$index} = shift @ifatmvcl;
-}
- print " atmindex \n" if $DEBUG;
-
- foreach $jet2 (%atmindex) {
- print "$jet2 \n" if $DEBUG;
- }
-
-
- print " atmCir \n" if $DEBUG;
-foreach $jet2 (%atmCir) {
- print "$jet2 \n" if $DEBUG;
- }
-
- print " atmindex2 \n" if $DEBUG;
-foreach $jet2 (%atmindex2) {
- print "$jet2 \n" if $DEBUG;
- }
-
-
-print "Print from ifatmVclconf3 \n" if $DEBUG;
-
-
-
- while (scalar @ifindex) {
-
- # as these arrays get filled from the bottom,
- # we need to empty them from the botom as well ...
- # fifo
-
- $index = shift @ifindex;
- $sifdesc{$index} = shift @ifdescr;
- $siftype{$index} = shift @iftype;
- $sifspeed{$index} = shift @ifspeed;
- $sifadminstatus{$index} = shift @ifadminstatus;
- $sifoperstatus{$index} = shift @ifoperstatus;
-
- if ($portmaster && $vendor) {
-
- # We can only approximate speeds
- #
- # so we think that ppp can do 76800 bit/s, and slip 38400.
- # (actualy, slip is a bit faster, but usualy users with newer modems
- # use ppp). Alternatively, you can set async speed to 115200 or
- # 230400 (the maximum speed supported by portmaster).
- #
- # But if the interface is ptpW (sync), max speed is 128000
- # change it to your needs. On various Portmasters there are
- # various numbers of sync interfaces, so modify it.
- #
- # The most commonly used PM-2ER has only one sync.
- #
- # Paul Makeev (mac@redline.ru)
- #
-
- if ($siftype{$index} eq '23') {
- if ($sifdesc{$index} eq 'ptpW1') {
- $sifspeed{$index} = 128000;
- } else {
- $sifspeed{$index} = 76800;
- }
- } elsif ($siftype{$index} eq '28') {
- $sifspeed{$index} = 38400;
- } elsif ($siftype{$index} eq '6') {
- $sifspeed{$index} = 10000000;
- }
- }
-
- ### Move this section south so we know what type of
- ### circuit we're looking at before we retrieve
- ### the cisco interface alias.
- ###
- ### This whole cicso thing should be re-written, but since
- ### this script doesn't need to run quickly...
- ###
- ### - mjd 2/5/98
- ###
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- #
- if ($ciscobox && $vendor) {
-
- my ($enoid, @descr);
-
- $enoid = $snmpget::OIDS{"$cisco_descr_oid"} . "." . $index;
-
- if ( $cisco_ver ge "11.2" or $siftype{$index} != '32' ) {
-
- ### This is either not a frame-relay sub-interface or
- ### this router is running IOS 11.2+ and interface
- ### type won't matter. In either of these cases, it's
- ### ok to try getting the ifAlias or ciscoLocIfDesc.
- ###
- @descr = snmpget($router,$community, $enoid);
-
- } else {
-
- ### This is a frame-relay sub-interface *and* the router
- ### is running an IOS older than 11.2. Therefore, we can
- ### get neither ifAlias nor ciscoLocIfDesc. Do something
- ### useful.
- ###
- @descr = ("Cisco PVCs descriptions require IOS 11.2+.");
-
- } # end if else
-
- ### Put whatever I got into the array we'll use later to append the result
- ### of this operation onto the results from the ifDescr fetch.
- ###
- push @ciscodescr, shift @descr;
-
- } # end if ($cisco_box && $vendor)
-
- # especially since cisco does not return a if
- # descr for each interface it has ...
- ## JB 2/8/97 - sometimes IOS inserts E1 controllers in the standard-MIB
- ## interface table, but not in the local interface table. This puts the
- ## local interface description table out-of-sync. the following
- ## modification skips over E1 cards as interfaces.
- #
- ### I suspect that the mod I made above, to use the ifAlias
- ### oid if possible, may cause problems here. If it seems
- ### that your descriptions are out of sync, try commenting
- ### out the "if ( condition )" and it's closing right brace
- ### so that the "shift @ciscodescr" get executed for *all*
- ### iterations of this loop.
- ###
- ### - mjd 2/5/95
- ###
- if ($ciscobox && $siftype{$index} != 18) {
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-}
-
- my $jet;
- print " atmindex2 \n" if $DEBUG;
-
- foreach $jet (%atmindex2) {
- print "$jet \n" if $DEBUG;
- }
-
- print " sifdesc \n" if $DEBUG;
-foreach $jet (%sifdesc) {
- print "$jet \n" if $DEBUG;
- }
-
- print " atmCir \n" if $DEBUG;
-foreach $jet (%atmCir) {
- print "$jet \n" if $DEBUG;
- }
-
- print " atmindex \n" if $DEBUG;
-foreach $jet (%atmindex) {
- print "$jet \n" if $DEBUG;
- }
-
-print " Possible Targets \n" if $DEBUG;
-
- foreach $index ( sort { $atmindex2{$a} <=> $atmindex2{$b} } keys %atmindex2) {
- my $c;
- my $index2 = $atmindex2{$index};
-# my $name = "$router.$sifdesc{$index2}.$atmindex2{$index}.$index";
- my $name = "$router.$index2.$index";
- my $target1 = "1.3.6.1.4.1.18.3.4.23.3.4.1.7.$atmCir{$index}.0.$index";
- my $target2 = "1.3.6.1.4.1.18.3.4.23.3.4.1.21.$atmCir{$index}.0.$index";
-
- print "$index: $index2: $name: $target1: $target2: \n" if $DEBUG;
-
- $c = '';
-
- print <<ECHO;
-${c}
-${c}Target[$name]: $target1&$target2:$community\@$router * 53
-${c}MaxBytes[$name]: 19400000
-${c}Title[$name]: $sysName ($iphost{$index}): $index2 <- $index $sifdesc{$index2}
-${c}PageTop[$name]: <H1>Traffic Analysis for $index2 <- $index $sifdesc{$index2}
-${c} $sciscodescr{$index}</H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sifdesc{$index} ($index)</TD></TR>
-${c} <TR><TD>IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>19.4MB ($ifType_d{$siftype{$index}})</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-ECHO
- }
-}
-
-main;
-exit(0);
-
-sub snmpget{
- my($host,$community,@vars) = @_;
- my(@enoid, $var,$response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@retvals);
- my($hackcisco);
- foreach $var (@vars) {
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var} || $var =~ /^\d+[\.\d+]*\.\d+$/;
- if ($var =~ /^\d+[\.\d+]*\.\d+/) {
- push @enoid, encode_oid((split /\./, $var));
- $hackcisco = 1;
- } else {
- push @enoid, encode_oid((split /\./, $snmpget::OIDS{$var}));
- $hackcisco = 0;
- }
- }
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- if ($session->get_request_response(@enoid)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- $session->close ();
- while ($bindings) {
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- my $tempo = pretty_print($value);
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
-
- push @retvals, $tempo;
- }
-
- return (@retvals);
- } else {
- if ($hackcisco) {
- return ("");
- } else {
- die "No answer from $ARGV[0]. You may be using the wrong community\n";
- }
- }
-}
-
-sub snmpgettable{
- my($host,$community,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = encode_oid(split /\./, $snmpget::OIDS{$var});
- $enoid=$orig_oid;
- srand();
- my $session = SNMP_Session->open ($host ,
- $community,
- 161);
- for(;;) {
- if ($session->getnext_request_response(($enoid))) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- ($binding,$bindings) = decode_sequence ($bindings);
- ($next_oid,$value) = decode_by_template ($binding, "%O%@");
- # quit once we are outside the table
- last unless BER::encoded_oid_prefix_p($orig_oid,$next_oid);
- $tempo = pretty_print($value);
- print "$var: '$tempo'\n" if $DEBUG;
-
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @table, $tempo;
-
- } else {
- warn "No sensible answer from $ARGV[0] for $var ... results may be wrong!\n";
- last;
- }
- $enoid=$next_oid;
- }
- $session->close ();
- return (@table);
-}
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
- @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 4) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
-
-
diff --git a/src/contrib/cfgmaker_cisco/README b/src/contrib/cfgmaker_cisco/README
deleted file mode 100644
index 51b2463..0000000
--- a/src/contrib/cfgmaker_cisco/README
+++ /dev/null
@@ -1,23 +0,0 @@
-Folks,
- Jon Snyder here at Portland State University, made some
-modifications to the CFGMAKER file which instead of just returning
-an incrimenting port number on the graps, actually makes the following
-type of lable:
-Port 4/3, Vlan 128 , multi mode fiber fast ethernet
-
- This version also grabs and shows all non-VLAN1 VLANS in a
-different color, plus provides aggregate VLAN traffic stastics as well by
-finding out what ports are in the VLAN, then adding those ports together.
-This means of course that a port will be "hit" however many times it is in
-a VLAN.
- Anyhow, as it is such a small file, I included it as an
-attachment. We don't exacily have the time to provide support for this
-CFGMAKER modification, but if you have questions or comments, please
-direct them to JON@PDX.EDU.
-Michael P. Burton
-________________________________________________________________________
-Michael P. Burton "Love is like racing across the frozen tundra
-Network Engineer, DCII on a snowmobile which flips over,
-Portland State University trapping you underneath.
- At night, the ice-weasels come." - Nietchze
-------------------------------------------------------------------------
diff --git a/src/contrib/cfgmaker_cisco/cfgmaker.cisco b/src/contrib/cfgmaker_cisco/cfgmaker.cisco
deleted file mode 100644
index 89bf7f0..0000000
--- a/src/contrib/cfgmaker_cisco/cfgmaker.cisco
+++ /dev/null
@@ -1,561 +0,0 @@
-#! /pkg/gnu/bin/perl
-# -*- mode: Perl -*-
-##################################################################
-# MRTG 2.7.2 -- Config file creator
-##################################################################
-# Created by Tobias Oetiker <oetiker@ee.ethz.ch>
-# this produces a config file for one router, by bulling info
-# off the router via snmp
-#################################################################
-#
-# Distributed under the GNU copyleft
-
-use BER "0.57";
-use SNMP_Session "0.59";
-use SNMP_util "0.57";
-
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-
-my ($session, %ipaddr, %iphost);
-
-sub main {
-
- snmpmapOID('ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18');
-
- my(%ifType_d)=('1'=>'Other',
- '2'=>'regular1822',
- '3'=>'hdh1822',
- '4'=>'ddnX25',
- '5'=>'rfc877x25',
- '6'=>'ethernetCsmacd',
- '7'=>'iso88023Csmacd',
- '8'=>'iso88024TokenBus',
- '9'=>'iso88025TokenRing',
- '10'=>'iso88026Man',
- '11'=>'starLan',
- '12'=>'proteon10Mbit',
- '13'=>'proteon80Mbit',
- '14'=>'hyperchannel',
- '15'=>'fddi',
- '16'=>'lapb',
- '17'=>'sdlc',
- '18'=>'ds1',
- '19'=>'e1',
- '20'=>'basicISDN',
- '21'=>'primaryISDN',
- '22'=>'propPointToPointSerial',
- '23'=>'ppp',
- '24'=>'softwareLoopback',
- '25'=>'eon',
- '26'=>'ethernet-3Mbit',
- '27'=>'nsip',
- '28'=>'slip',
- '29'=>'ultra',
- '30'=>'ds3',
- '31'=>'sip',
- '32'=>'frame-relay',
- '33'=>'rs232',
- '34'=>'para',
- '35'=>'arcnet',
- '36'=>'arcnetPlus',
- '37'=>'atm',
- '38'=>'miox25',
- '39'=>'sonet',
- '40'=>'x25ple',
- '41'=>'iso88022llc',
- '42'=>'localTalk',
- '43'=>'smdsDxi',
- '44'=>'frameRelayService',
- '45'=>'v35',
- '46'=>'hssi',
- '47'=>'hippi',
- '48'=>'modem',
- '49'=>'aal5',
- '50'=>'sonetPath',
- '51'=>'sonetVT',
- '52'=>'smdsIcip',
- '53'=>'propVirtual',
- '54'=>'propMultiplexor',
- '55'=>'100BaseVG',
- #### New IF Types added 9/24/98 by Russ Carleton (roccor@livenetworking.com)
- #### based on the IANA file updated at ftp://ftp.isi.edu/mib/ianaiftype.mib
- '56'=>'Fibre Channel',
- '57'=>'HIPPI Interface',
- '58'=>'Obsolete for FrameRelay',
- '59'=>'ATM Emulation of 802.3 LAN',
- '60'=>'ATM Emulation of 802.5 LAN',
- '61'=>'ATM Emulation of a Circuit',
- '62'=>'FastEthernet (100BaseT)',
- '63'=>'ISDN & X.25',
- '64'=>'CCITT V.11/X.21',
- '65'=>'CCITT V.36',
- '66'=>'CCITT G703 at 64Kbps',
- '67'=>'Obsolete G702 see DS1-MIB',
- '68'=>'SNA QLLC',
- '69'=>'Full Duplex Fast Ethernet (100BaseFX)',
- '70'=>'Channel',
- '71'=>'Radio Spread Spectrum (802.11)',
- '72'=>'IBM System 360/370 OEMI Channel',
- '73'=>'IBM Enterprise Systems Connection',
- '74'=>'Data Link Switching',
- '75'=>'ISDN S/T Interface',
- '76'=>'ISDN U Interface',
- '77'=>'Link Access Protocol D (LAPD)',
- '78'=>'IP Switching Opjects',
- '79'=>'Remote Source Route Bridging',
- '80'=>'ATM Logical Port',
- '81'=>'AT&T DS0 Point (64 Kbps)',
- '82'=>'AT&T Group of DS0 on a single DS1',
- '83'=>'BiSync Protocol (BSC)',
- '84'=>'Asynchronous Protocol',
- '85'=>'Combat Net Radio',
- '86'=>'ISO 802.5r DTR',
- '87'=>'Ext Pos Loc Report Sys',
- '88'=>'Apple Talk Remote Access Protocol',
- '89'=>'Proprietary Connectionless Protocol',
- '90'=>'CCITT-ITU X.29 PAD Protocol',
- '91'=>'CCITT-ITU X.3 PAD Facility',
- '92'=>'MultiProtocol Connection over Frame/Relay',
- '93'=>'CCITT-ITU X213',
- '94'=>'Asymetric Digitial Subscriber Loop (ADSL)',
- '95'=>'Rate-Adapt Digital Subscriber Loop (RDSL)',
- '96'=>'Symetric Digitial Subscriber Loop (SDSL)',
- '97'=>'Very High Speed Digitial Subscriber Loop (HDSL)',
- '98'=>'ISO 802.5 CRFP',
- '99'=>'Myricom Myrinet',
- '100'=>'Voice recEive and transMit (voiceEM)',
- '101'=>'Voice Foreign eXchange Office (voiceFXO)',
- '102'=>'Voice Foreign eXchange Station (voiceFXS)',
- '103'=>'Voice Encapulation',
- '104'=>'Voice Over IP Encapulation',
- '105'=>'ATM DXI',
- '106'=>'ATM FUNI',
- '107'=>'ATM IMA',
- '108'=>'PPP Multilink Bundle',
- '109'=>'IBM IP over CDLC',
- '110'=>'IBM Common Link Access to Workstation',
- '111'=>'IBM Stack to Stack',
- '112'=>'IBM Virtual IP Address (VIPA)',
- '113'=>'IBM Multi-Protocol Channel Support',
- '114'=>'IBM IP over ATM',
- '115'=>'ISO 802.5j Fiber Token Ring',
- '116'=>'IBM Twinaxial Data Link Control (TDLC)',
- '117'=>'Gigabit Ethernet',
- '118'=>'Higher Data Link Control (HDLC)',
- '119'=>'Link Access Protocol F (LAPF)',
- '120'=>'CCITT V.37',
- '121'=>'CCITT X.25 Multi-Link Protocol',
- '122'=>'CCITT X.25 Hunt Group',
- '123'=>'Transp HDLC',
- '124'=>'Interleave Channel',
- '125'=>'Fast Channel',
- '126'=>'IP (for APPN HPR in IP Networks)',
- '127'=>'CATV MAC Layer',
- '128'=>'CATV Downstream Interface',
- '129'=>'CATV Upstream Interface',
- '130'=>'Avalon Parallel Processor',
- '131'=>'Encapsulation Interface',
- '132'=>'Coffee Pot',
- '133'=>'Circuit Emulation Service',
- '134'=>'ATM Sub Interface',
- '135'=>'Layer 2 Virtual LAN using 802.1Q',
- '136'=>'Layer 3 Virtual LAN using IP',
- '137'=>'Layer 3 Virtual LAN using IPX',
- '138'=>'IP Over Power Lines',
- '139'=>'Multi-Media Mail over IP',
- '140'=>'Dynamic synchronous Transfer Mode (DTM)',
- '141'=>'Data Communications Network',
- '142'=>'IP Forwarding Interface'
- );
-
- my($vendor)=0;
- if ($ARGV[0] eq '--vendor') {
- $vendor = 1; shift @ARGV};
-
- my($community,$router) = ($1,$2) if $ARGV[0] =~ /(.*)\@(.*)/;
- die <<USAGE unless $community && $router;
-
-USAGE: cfgmaker [--vendor] 'community'\@'router'
-
-use the --vendor option to try and wrestle some better information
-from willing livingston and cisco routers ... (may not work)
-
-EXAMPLE: cfgmaker public\@ezwf7.ethz.ch >>mrtg.cfg
-
-
-USAGE
- print "# Add a WorkDir: /some/path line to this file\n\n";
-
- $session = SNMP_Session->open ($router, $community, 161)
- || die "Error opening SNMP session to $router";
-
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) =
- snmpget("$community\@$router",
- 'sysDescr','sysContact','sysName', 'sysLocation', 'ifNumber', 'sysObjectID');
-
- $sysDescr =~ s/\r\n?/<BR>/g; # Change returns to <BR>
- my($cisco_router_sysid) = '1\.3\.6\.1\.4\.1\.9';
- my($livingston_router_sysid) = '1\.3\.6\.1\.4\.1\.307';
- my($ciscobox) = ($sysObjectID =~ /^$cisco_router_sysid/);
- my($portmaster) = ($sysObjectID =~ /^$livingston_router_sysid/);
-
- print <<ECHO;
-
-WorkDir: /pkg/mon/www/mrtg/
-Refresh: 300
-Interval: 5
-WriteExpires: yes
-
-#Global Modifications:
-Unscaled[_]: ymwd
-Options[_]: bits,growright
-YLegend[_]: Bits Per Second
-ShortLegend[_]: b/s
-LegendI[_]: &nbsp;Bits/s:
-LegendO[_]: &nbsp;Bits/s:
-
-#################################################################
-# Location: $sysLocation
-# Contact: $sysContact
-# System Name: $sysName
-#
-# System Description including Software and Hardware Versions.
-#
-# $sysDescr
-#################################################################
-# Modified Mrtg cfgmaker Configuration file for SMNP Equipment
-# Last edited - 1999, Mar 31th, revision 2.0
-# Edited By - mpburton (mpburton\@europa.com)
-# Time - 11:10 pm
-# Created By - Jlatimer (J.Latimer\@sussex.ac.uk)
-#################################################################
-#---------------------------------------------------------------
-ECHO
-
- $session->map_table ([[1,3,6,1,2,1,4,20,1,1], # ipAdEntAddr
- [1,3,6,1,2,1,4,20,1,2]], # ipAdEntIf
- sub ($@) {
- my ($index, $ipadentaddr, $ipadentif) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($ipadentif, $ipadentaddr));
- $ipaddr{$ipadentif} = $ipadentaddr;
- $iphost{$ipadentif} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$ipadentif})), AF_INET);
- if (!defined $iphost{$ipadentif} || ($iphost{$ipadentif} eq '')){
- $iphost{$ipadentif} = 'No hostname defined for IP address';
- }
- });
-
- print STDERR "Got Addresses\n" if $DEBUG;
- print STDERR "Got IfTable\n" if $DEBUG;
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr,%sifrawdesc);
-
- ### May need the cisco IOS version number so we know which oid to use
- ### to get the cisco description.
- ###
- ### - mjd 2/5/98 (Mike Diehn) (mdiehn@mindspring.net)
- ###
- my ($cisco_ver, $cisco_descr_oid, @ciscodescr);
- if ( $ciscobox ) {
- ($cisco_ver) = ($sysDescr =~ m/Version\s+([\d\.]+)\(\d/o);
- $cisco_descr_oid = ($cisco_ver ge "11.2") ? "ifAlias" : "CiscolocIfDescr";
- }
-
-
-#mod by jon: create a hash table to map ifIndex integers to module/port names:
-my $cat5500 = 0;
-if ( $sysDescr =~ /WS-C55.*/i ) {
- $cat5500 = 1;
-}
-
-my (%iftomp, %iftovlan);
-if ($cat5500) {
-
-$session->map_table ([[1,3,6,1,4,1,9,5,1,4,1,1,11]], #5500 port group
-
-sub ($@) {
- my ($rowindex, $index) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($index));
-
-# $rowindex =~ s/\./\//g;
- $iftomp{$index} = $rowindex;
-# print "row:$rowindex; idx:$index";
-# print "\n\n";
-});
-
-#foreach my $key (sort(keys %iftomp)) {
-# print $key, '=', $iftomp{$key}, "\n";
-#}
-
-
-$session->map_table ([[1,3,6,1,4,1,9,5,1,9,3,1,3]],
-
-sub ($@) {
- my ($rowindex, $vlan_no) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($vlan_no));
-
- my $ifindex;
- foreach my $key (keys %iftomp) {
- if ($iftomp{$key} eq $rowindex) {
- $ifindex = $key;
- }
- }
- $iftovlan{$ifindex} = $vlan_no;
-
-});
-
-#foreach my $key (sort(keys %iftovlan)) {
-# print $key, '=', $iftovlan{$key}, "\n";
-#}
-} #end if cat5500
-
-$session->map_table ([[1,3,6,1,2,1,2,2,1,1], # ifIndex
- [1,3,6,1,2,1,2,2,1,2], # ifDescr
- [1,3,6,1,2,1,2,2,1,3], # ifType
- [1,3,6,1,2,1,2,2,1,5], # ifSpeed
- [1,3,6,1,2,1,2,2,1,7], # ifAdminStatus
- [1,3,6,1,2,1,2,2,1,8]], # ifOperStatus
-sub ($@) {
- my ($rowindex,$index,$ifdescr,$iftype,$ifspeed,$ifadminstatus,$ifoperstatus) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($index,$ifdescr,$iftype,$ifspeed,$ifadminstatus,$ifoperstatus));
-
- if ($cat5500) {
- my ($intname, $tmp_vlan_no) = split (' ',$ifdescr);
- if ( ($intname eq "sc0") || ($intname eq "sl0") ) {
- return;
- }
- if ($intname eq "VLAN") {
- if ($tmp_vlan_no >= 1000) {
- return;
- }
-#The Catalyst software version 4.5 seems to return '0' as the ifSpeed for a
-#VLAN. We set it to 100Mb because we want to watch aggregate VLAN traffic.
- if ($ifspeed == 0) {
- $ifspeed = 100 * 10**6;
- }
- }
- my ($port_num, $vlan_desc);
- $port_num = $iftomp{$index};
- $port_num =~ s/\./\//g;
- if ($iftovlan{$index} != 1) {
- $vlan_desc = "<font color=\"#8C1717\"> Vlan $iftovlan{$index} </font>";
- }
- else {
- $vlan_desc = "Vlan $iftovlan{$index}";
- }
- if ($iftype != 53) {
- $sifdesc{$index} = "Port $port_num, $vlan_desc, $ifdescr";
- }
- else {
- $sifdesc{$index} = "<font color=\"#6B238E\"> <B> Aggregate Traffic: $ifdescr </B> </font>";
- $sifrawdesc{$index} = $ifdescr;
- }
- }
- else {
- $sifdesc{$index} = $ifdescr;
- }
- $siftype{$index} = $iftype;
- $sifspeed{$index} = $ifspeed;
- $sifadminstatus{$index} = $ifadminstatus;
- $sifoperstatus{$index} = $ifoperstatus;
- if ($portmaster && $vendor) {
-
- # We can only approximate speeds
- #
- # so we think that ppp can do 76800 bit/s, and slip 38400.
- # (actualy, slip is a bit faster, but usualy users with newer modems
- # use ppp). Alternatively, you can set async speed to 115200 or
- # 230400 (the maximum speed supported by portmaster).
- #
- # But if the interface is ptpW (sync), max speed is 128000
- # change it to your needs. On various Portmasters there are
- # various numbers of sync interfaces, so modify it.
- #
- # The most commonly used PM-2ER has only one sync.
- #
- # Paul Makeev (mac@redline.ru)
- #
-
- if ($siftype{$index} eq '23') {
- if ($sifdesc{$index} eq 'ptpW1') {
- $sifspeed{$index} = 128000;
- } else {
- $sifspeed{$index} = 76800;
- }
- } elsif ($siftype{$index} eq '28') {
- $sifspeed{$index} = 38400;
- } elsif ($siftype{$index} eq '6') {
- $sifspeed{$index} = 10000000;
- }
- }
-
- ### Move this section south so we know what type of
- ### circuit we're looking at before we retrieve
- ### the cisco interface alias.
- ###
- ### This whole cicso thing should be re-written, but since
- ### this script doesn't need to run quickly...
- ###
- ### - mjd 2/5/98
- ###
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- #
- if ($ciscobox && $vendor) {
-
- my ($enoid, @descr);
-
- $enoid = $cisco_descr_oid . "." . $index;
-
- if ( $cisco_ver ge "11.2" or $siftype{$index} != '32' ) {
-
- ### This is either not a frame-relay sub-interface or
- ### this router is running IOS 11.2+ and interface
- ### type won't matter. In either of these cases, it's
- ### ok to try getting the ifAlias or ciscoLocIfDesc.
- ###
- @descr = snmpget("$community\@$router", $enoid);
-
- } else {
-
- ### This is a frame-relay sub-interface *and* the router
- ### is running an IOS older than 11.2. Therefore, we can
- ### get neither ifAlias nor ciscoLocIfDesc. Do something
- ### useful.
- ###
- @descr = ("Cisco PVCs descriptions require IOS 11.2+.");
-
- } # end if else
-
- ### Put whatever I got into the array we'll use later to append the result
- ### of this operation onto the results from the ifDescr fetch.
- ###
- push @ciscodescr, shift @descr;
-
- } # end if ($cisco_box && $vendor)
-
- # especially since cisco does not return a if
- # descr for each interface it has ...
- ## JB 2/8/97 - sometimes IOS inserts E1 controllers in the standard-MIB
- ## interface table, but not in the local interface table. This puts the
- ## local interface description table out-of-sync. the following
- ## modification skips over E1 cards as interfaces.
- #
- ### I suspect that the mod I made above, to use the ifAlias
- ### oid if possible, may cause problems here. If it seems
- ### that your descriptions are out of sync, try commenting
- ### out the "if ( condition )" and it's closing right brace
- ### so that the "shift @ciscodescr" get executed for *all*
- ### iterations of this loop.
- ###
- ### - mjd 2/5/95
- ###
- if ($ciscobox && $siftype{$index} != 18) {
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-});
- my $index;
- foreach $index ( sort { $a <=> $b } keys %sifdesc) {
- my $c;
- my $speed = int($sifspeed{$index} / 8); # bits to byte
- my $speed_str=&fmi($speed);
- my $name="$iphost{$index}";
- $name = "$router.$index" if not $name or $name =~ /\s/;
-
-
-
- if (($sifadminstatus{$index} != 1)
-# this check added by Josh - don't query E1-stack controllers
- || ($siftype{$index} == 18)
- || ($siftype{$index} == 24)
- || ($speed == 0 )
- || ($speed > 400 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($sifoperstatus{$index} == 3)) {
- print <<ECHO;
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- }else {
- $c = '';
- }
-
- print <<ECHO;
-${c}
-ECHO
-
-if ( ($cat5500) && ($siftype{$index} == 53) ) {
-# print "\n\nhere!! desc:$sifrawdesc{$index}\n\n";
- my $agg_vlan_no = $sifrawdesc{$index};
- $agg_vlan_no =~ s/\D//g;
- my $ctr = 0;
- foreach my $key (sort(keys %iftovlan)) {
-# print "key:$key;agg:$agg_vlan_no;index:$index\n\n\n\n";
- if ($iftovlan{$key} == $agg_vlan_no) {
-# print "\n\na hit!!\n\n";
- if ($ctr == 0) {
- print "${c}Target[$name]: $key:$community\@$router";
- }
- else {
- print " + $key:$community\@$router";
- }
- $ctr++;
- }
- }
-}
-else {
- print "${c}Target[$name]: $index:$community\@$router";
-}
-
-print <<ECHO;
-${c}
-${c}Directory[$name]:$sysName
-${c}MaxBytes[$name]: $speed
-${c}Title[$name]: $sysName ($iphost{$index}): $sifdesc{$index}
-${c}PageTop[$name]: <H1>Traffic Analysis for $sifdesc{$index}
-${c} $sciscodescr{$index}</H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sifdesc{$index} ($index)</TD></TR>
-${c} <TR><TD>IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>$speed_str ($ifType_d{$siftype{$index}})</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-ECHO
- }
-}
-
-main;
-exit(0);
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
- @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 4) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
-
diff --git a/src/contrib/cfgmaker_dlci/cfgmaker_dlci b/src/contrib/cfgmaker_dlci/cfgmaker_dlci
deleted file mode 100644
index 336b4fc..0000000
--- a/src/contrib/cfgmaker_dlci/cfgmaker_dlci
+++ /dev/null
@@ -1,618 +0,0 @@
-#! /usr/bin/perl
-# -*- mode: Perl -*-
-##################################################################
-# New MRTG 2.8.12 Based -- Config file creator
-##################################################################
-# this produces a config file for one router, by pulling info
-# off the router via snmp
-# Modified by Graziano Sommariva <Graziano.Sommariva@elsag.it>
-# to monitor DLCI's and to include some code from newer release(2.9.12).
-# NOTE: IPONLY has been disabled.
-# Added --ip option
-#################################################################
-#
-# Distributed under the GNU copyleft
-
-require 5.004;
-use strict;
-
-BEGIN {
- # Automatic OS detection ... do NOT touch
- if ( $^O =~ /^(?:(ms)?(dos|win(32|nt)?))/i ) {
- $main::OS = 'NT';
- $main::SL = '\\';
- $main::PS = ';';
- } elsif ( $^O =~ /^VMS$/i ) {
- $main::OS = 'VMS';
- $main::SL = '.';
- $main::PS = ':';
- } else {
- $main::OS = 'UNIX';
- $main::SL = '/';
- $main::PS = ':';
- }
-}
-
-use FindBin;
-use lib "${FindBin::Bin}";
-use lib "${FindBin::Bin}${main::SL}..${main::SL}lib${main::SL}mrtg2";
-
-use BER "0.57";
-use SNMP_Session "0.59";
-use SNMP_util "0.57";
-
-use Getopt::Long;
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-
-my (%optctl) = ();
-my ($session, %ipaddr, %iphost);
-
-sub main {
-
- snmpmapOID('ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18');
-
- my(%ifType_d)=('1'=>'Other',
- '2'=>'regular1822',
- '3'=>'hdh1822',
- '4'=>'ddnX25',
- '5'=>'rfc877x25',
- '6'=>'ethernetCsmacd',
- '7'=>'iso88023Csmacd',
- '8'=>'iso88024TokenBus',
- '9'=>'iso88025TokenRing',
- '10'=>'iso88026Man',
- '11'=>'starLan',
- '12'=>'proteon10Mbit',
- '13'=>'proteon80Mbit',
- '14'=>'hyperchannel',
- '15'=>'fddi',
- '16'=>'lapb',
- '17'=>'sdlc',
- '18'=>'ds1',
- '19'=>'e1',
- '20'=>'basicISDN',
- '21'=>'primaryISDN',
- '22'=>'propPointToPointSerial',
- '23'=>'ppp',
- '24'=>'softwareLoopback',
- '25'=>'eon',
- '26'=>'ethernet-3Mbit',
- '27'=>'nsip',
- '28'=>'slip',
- '29'=>'ultra',
- '30'=>'ds3',
- '31'=>'sip',
- '32'=>'frame-relay',
- '33'=>'rs232',
- '34'=>'para',
- '35'=>'arcnet',
- '36'=>'arcnetPlus',
- '37'=>'atm',
- '38'=>'miox25',
- '39'=>'sonet',
- '40'=>'x25ple',
- '41'=>'iso88022llc',
- '42'=>'localTalk',
- '43'=>'smdsDxi',
- '44'=>'frameRelayService',
- '45'=>'v35',
- '46'=>'hssi',
- '47'=>'hippi',
- '48'=>'modem',
- '49'=>'aal5',
- '50'=>'sonetPath',
- '51'=>'sonetVT',
- '52'=>'smdsIcip',
- '53'=>'propVirtual',
- '54'=>'propMultiplexor',
- '55'=>'100BaseVG',
- '56'=>'Fibre Channel',
- '57'=>'HIPPI Interface',
- '58'=>'Obsolete for FrameRelay',
- '59'=>'ATM Emulation of 802.3 LAN',
- '60'=>'ATM Emulation of 802.5 LAN',
- '61'=>'ATM Emulation of a Circuit',
- '62'=>'FastEthernet (100BaseT)',
- '63'=>'ISDN & X.25',
- '64'=>'CCITT V.11/X.21',
- '65'=>'CCITT V.36',
- '66'=>'CCITT G703 at 64Kbps',
- '67'=>'Obsolete G702 see DS1-MIB',
- '68'=>'SNA QLLC',
- '69'=>'Full Duplex Fast Ethernet (100BaseFX)',
- '70'=>'Channel',
- '71'=>'Radio Spread Spectrum (802.11)',
- '72'=>'IBM System 360/370 OEMI Channel',
- '73'=>'IBM Enterprise Systems Connection',
- '74'=>'Data Link Switching',
- '75'=>'ISDN S/T Interface',
- '76'=>'ISDN U Interface',
- '77'=>'Link Access Protocol D (LAPD)',
- '78'=>'IP Switching Opjects',
- '79'=>'Remote Source Route Bridging',
- '80'=>'ATM Logical Port',
- '81'=>'AT&T DS0 Point (64 Kbps)',
- '82'=>'AT&T Group of DS0 on a single DS1',
- '83'=>'BiSync Protocol (BSC)',
- '84'=>'Asynchronous Protocol',
- '85'=>'Combat Net Radio',
- '86'=>'ISO 802.5r DTR',
- '87'=>'Ext Pos Loc Report Sys',
- '88'=>'Apple Talk Remote Access Protocol',
- '89'=>'Proprietary Connectionless Protocol',
- '90'=>'CCITT-ITU X.29 PAD Protocol',
- '91'=>'CCITT-ITU X.3 PAD Facility',
- '92'=>'MultiProtocol Connection over Frame/Relay',
- '93'=>'CCITT-ITU X213',
- '94'=>'Asymetric Digitial Subscriber Loop (ADSL)',
- '95'=>'Rate-Adapt Digital Subscriber Loop (RDSL)',
- '96'=>'Symetric Digitial Subscriber Loop (SDSL)',
- '97'=>'Very High Speed Digitial Subscriber Loop (HDSL)',
- '98'=>'ISO 802.5 CRFP',
- '99'=>'Myricom Myrinet',
- '100'=>'Voice recEive and transMit (voiceEM)',
- '101'=>'Voice Foreign eXchange Office (voiceFXO)',
- '102'=>'Voice Foreign eXchange Station (voiceFXS)',
- '103'=>'Voice Encapulation',
- '104'=>'Voice Over IP Encapulation',
- '105'=>'ATM DXI',
- '106'=>'ATM FUNI',
- '107'=>'ATM IMA',
- '108'=>'PPP Multilink Bundle',
- '109'=>'IBM IP over CDLC',
- '110'=>'IBM Common Link Access to Workstation',
- '111'=>'IBM Stack to Stack',
- '112'=>'IBM Virtual IP Address (VIPA)',
- '113'=>'IBM Multi-Protocol Channel Support',
- '114'=>'IBM IP over ATM',
- '115'=>'ISO 802.5j Fiber Token Ring',
- '116'=>'IBM Twinaxial Data Link Control (TDLC)',
- '117'=>'Gigabit Ethernet',
- '118'=>'Higher Data Link Control (HDLC)',
- '119'=>'Link Access Protocol F (LAPF)',
- '120'=>'CCITT V.37',
- '121'=>'CCITT X.25 Multi-Link Protocol',
- '122'=>'CCITT X.25 Hunt Group',
- '123'=>'Transp HDLC',
- '124'=>'Interleave Channel',
- '125'=>'Fast Channel',
- '126'=>'IP (for APPN HPR in IP Networks)',
- '127'=>'CATV MAC Layer',
- '128'=>'CATV Downstream Interface',
- '129'=>'CATV Upstream Interface',
- '130'=>'Avalon Parallel Processor',
- '131'=>'Encapsulation Interface',
- '132'=>'Coffee Pot',
- '133'=>'Circuit Emulation Service',
- '134'=>'ATM Sub Interface',
- '135'=>'Layer 2 Virtual LAN using 802.1Q',
- '136'=>'Layer 3 Virtual LAN using IP',
- '137'=>'Layer 3 Virtual LAN using IPX',
- '138'=>'IP Over Power Lines',
- '139'=>'Multi-Media Mail over IP',
- '140'=>'Dynamic synchronous Transfer Mode (DTM)',
- '141'=>'Data Communications Network',
- '142'=>'IP Forwarding Interface',
- '162'=>'Cisco Express Forwarding Interface'
- );
-
- my($vendor)=0;
-# my($iponly)=0;
- my($workdir)=0;
- my($ip)=0;
- my($community,$router,%defaults);
- my($res);
-
- # Just need to make sure that all perl installations have the GetOpt module
- # - fwo@obsidian.co.za
- #
-# $res = GetOptions(\%optctl,"vendor","iponly","workdir=s","options=s","ip=s");
- $res = GetOptions(\%optctl,"vendor","workdir=s","options=s","ip=s");
- if($res == 0 ) {
- print "\nError in arguments. Please run cfgmaker with no arguments for help!\n\n";
- exit 1;
- }
-
- if($optctl{"vendor"}) { $vendor = 1; }
-# if($optctl{"iponly"}) { $iponly = 1; }
- if($optctl{"workdir"}) { $workdir = $optctl{"workdir"}; }
- if($optctl{"ip"}) { $ip = $optctl{"ip"}; }
- if($optctl{"options"}) {
- foreach $res(split(',',$optctl{"options"})) {
- chomp($res);
- next if($res eq "growright");
- next if($res eq "bits");
- next if($res eq "perminute");
- next if($res eq "perhour");
- next if($res eq "noinfo");
- next if($res eq "nopercent");
- next if($res eq "transparent");
- next if($res eq "integer");
- next if($res eq "dorelpercent");
- next if($res eq "gauge");
- next if($res eq "absolute");
- next if($res eq "unknaszero");
- print "\nERROR:$res is not a valid option for --options, exiting!\n";
- exit 1;
- }
- }
- $res = 0;
-#TODO: check for conflicting info in options - l->r and r->l
-# print STDERR "iponly=$iponly\n" if $DEBUG;
- print STDERR "vendor=$vendor\n" if $DEBUG;
- print STDERR "workdir=$workdir\n" if $DEBUG;
-
- ($community,$router) = ($1,$2) if $ARGV[0] =~ /(.*)\@(.*)/;
- if(!($community) && !($router)) {
- print <<USAGE;
-
-USAGE: cfgmaker [--vendor] [other options] 'community'\@'router'
-
-use the --vendor option to try and wrestle some better information
- from willing livingston and cisco routers ... (may not work)
-
-[other options] can be one of the following:
-
-#use the --iponly option to force the targets to the ip adress of the router
-# being queried. Also note that the 'router' option must be the ip address
-# and not the symbolic name.
-
-use the --workdir '/some/path' option to add the WorkDir option to the cfg file
- being generated.
-
-use the --ip 'IP Address' to use in SNMP requests
-
-use the --options 'defaults' to set default options for each target. defaults
- is a comma seperated list and can contain the following :
- growright bits perminute perhour noinfo nopercent transparent
- integer dorelpercent gauge absolute unknaszero
-
- See the mrtg.cfg doccumentation for descriptions of the above options.
- NOTE: no checking for conflicting options are done at the moment.
-
-EXAMPLE: cfgmaker public\@ezwf7.ethz.ch >>mrtg.cfg
-
-USAGE
- exit 1;
- }
-# if($iponly) {
-# # We only want to work with ip numbers and not names
-# # Check to see whether the name is a valid ip address
-# # If not bail - we do not want to deal with reverse dns
-# # issues - fwo@obsidian.co.za 2000/01/17
-# chomp($router);
-# if(!($router =~ /^[0-9]{1,3}.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/)){
-# print "\nERROR: when specifying --iponly, please use a valid\n";
-# print "ip address for the router. Do not use a symbolic name.\n\n";
-# exit 1;
-# }
-# }
- print "IconDir: /mrtgicons/\n\n";
- if($workdir) {
- print "WorkDir: $workdir\n\n";
- } else {
- print "# Add a WorkDir: /html line to this file\n\n";
- }
-
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID);
- my($sysDescr_orig,$cisco_router_sysid,$livingston_router_sysid,$ciscobox,$portmaster);
-
- if($optctl{"ip"}) {
- $session = SNMP_Session->open ($ip, $community, 161)
- || die "Error opening SNMP session to $ip";
-
- ($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) = snmpget("$community\@$ip",'sysDescr','sysContact','sysName','sysLocation','ifNumber', 'sysObjectID');
-
- $sysDescr_orig=$sysDescr;
- $sysDescr_orig =~ s/[\r\n ]+/ /g;
- $sysDescr =~ s/[\r\n]+/<BR>/g; # Change returns to <BR>
- $cisco_router_sysid = '1\.3\.6\.1\.4\.1\.9';
- $livingston_router_sysid = '1\.3\.6\.1\.4\.1\.307';
- $ciscobox = ($sysObjectID =~ /^$cisco_router_sysid/);
- $portmaster = ($sysObjectID =~ /^$livingston_router_sysid/);
- } else {
- $session = SNMP_Session->open ($router, $community, 161)
- || die "Error opening SNMP session to $router";
- ($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) = snmpget("$community\@$router",'sysDescr','sysContact','sysName','sysLocation','ifNumber', 'sysObjectID');
- $sysDescr_orig=$sysDescr;
- $sysDescr_orig =~ s/[\r\n ]+/ /g;
- $sysDescr =~ s/[\r\n]+/<BR>/g; # Change returns to <BR>
- $cisco_router_sysid = '1\.3\.6\.1\.4\.1\.9';
- $livingston_router_sysid = '1\.3\.6\.1\.4\.1\.307';
- $ciscobox = ($sysObjectID =~ /^$cisco_router_sysid/);
- $portmaster = ($sysObjectID =~ /^$livingston_router_sysid/);
- }
- print <<ECHO;
-
-
-######################################################################
-# Description: $sysDescr_orig
-# Contact: $sysContact
-# System Name: $sysName
-# Location: $sysLocation
-#.....................................................................
-ECHO
-
- $session->map_table ([[1,3,6,1,2,1,4,20,1,1], # ipAdEntAddr
- [1,3,6,1,2,1,4,20,1,2]], # ipAdEntIf
- sub ($@) {
- my ($index, $ipadentaddr, $ipadentif) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($ipadentif, $ipadentaddr));
- $ipaddr{$ipadentif} = $ipadentaddr;
- $iphost{$ipadentif} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$ipadentif})), AF_INET);
- if (!defined $iphost{$ipadentif} || ($iphost{$ipadentif} eq '')){
- $iphost{$ipadentif} = 'No hostname defined for IP address';
- }
- });
-
- print STDERR "Got Addresses\n" if $DEBUG;
- print STDERR "Got IfTable\n" if $DEBUG;
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr);
-
- ### May need the cisco IOS version number so we know which oid to use
- ### to get the cisco description.
- ###
- ### - mjd 2/5/98 (Mike Diehn) (mdiehn@mindspring.net)
- ###
- my ($cisco_ver, $cisco_descr_oid, @ciscodescr);
- if ( $ciscobox ) {
- ($cisco_ver) = ($sysDescr =~ m/Version\s+([\d\.]+)\(\d/o);
- $cisco_descr_oid = ($cisco_ver ge "11.2") ? "ifAlias" : "CiscolocIfDescr";
- }
-
-$session->map_table ([[1,3,6,1,2,1,2,2,1,1], # ifIndex
- [1,3,6,1,2,1,2,2,1,2], # ifDescr
- [1,3,6,1,2,1,2,2,1,3], # ifType
- [1,3,6,1,2,1,2,2,1,5], # ifSpeed
- [1,3,6,1,2,1,2,2,1,7], # ifAdminStatus
- [1,3,6,1,2,1,2,2,1,8]], # ifOperStatus
-sub ($@) {
- my ($rowindex,$index,$ifdescr,$iftype,$ifspeed,$ifadminstatus,$ifoperstatus) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($index,$ifdescr,$iftype,$ifspeed,$ifadminstatus,$ifoperstatus));
- $sifdesc{$index} = $ifdescr;
- $siftype{$index} = $iftype;
- $sifspeed{$index} = $ifspeed;
- $sifadminstatus{$index} = $ifadminstatus;
- $sifoperstatus{$index} = $ifoperstatus;
- if ($portmaster && $vendor) {
-
- # We can only approximate speeds
- #
- # so we think that ppp can do 76800 bit/s, and slip 38400.
- # (actualy, slip is a bit faster, but usualy users with newer modems
- # use ppp). Alternatively, you can set async speed to 115200 or
- # 230400 (the maximum speed supported by portmaster).
- #
- # But if the interface is ptpW (sync), max speed is 128000
- # change it to your needs. On various Portmasters there are
- # various numbers of sync interfaces, so modify it.
- #
- # The most commonly used PM-2ER has only one sync.
- #
- # Paul Makeev (mac@redline.ru)
- #
-
- if ($siftype{$index} eq '23') {
- if ($sifdesc{$index} eq 'ptpW1') {
- $sifspeed{$index} = 128000;
- } else {
- $sifspeed{$index} = 76800;
- }
- } elsif ($siftype{$index} eq '28') {
- $sifspeed{$index} = 38400;
- } elsif ($siftype{$index} eq '6') {
- $sifspeed{$index} = 10000000;
- }
- }
-
- ### Move this section south so we know what type of
- ### circuit we're looking at before we retrieve
- ### the cisco interface alias.
- ###
- ### This whole cicso thing should be re-written, but since
- ### this script doesn't need to run quickly...
- ###
- ### - mjd 2/5/98
- ###
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- #
- my($cisco_descr_oid);
- if ($ciscobox && $vendor) {
-
- my ($enoid, @descr);
-
- $enoid = $cisco_descr_oid . "." . $index;
-
- if ( $cisco_ver ge "11.2" or $siftype{$index} != '32' ) {
-
- ### This is either not a frame-relay sub-interface or
- ### this router is running IOS 11.2+ and interface
- ### type won't matter. In either of these cases, it's
- ### ok to try getting the ifAlias or ciscoLocIfDesc.
- ###
- @descr = snmpget("$community\@$router", $enoid);
-
- } else {
-
- ### This is a frame-relay sub-interface *and* the router
- ### is running an IOS older than 11.2. Therefore, we can
- ### get neither ifAlias nor ciscoLocIfDesc. Do something
- ### useful.
- ###
- @descr = ("Cisco PVCs descriptions require IOS 11.2+.");
-
- } # end if else
-
- ### Put whatever I got into the array we'll use later to append the result
- ### of this operation onto the results from the ifDescr fetch.
- ###
- push @ciscodescr, shift @descr;
-
- } # end if ($cisco_box && $vendor)
-
- # especially since cisco does not return a if
- # descr for each interface it has ...
- ## JB 2/8/97 - sometimes IOS inserts E1 controllers in the standard-MIB
- ## interface table, but not in the local interface table. This puts the
- ## local interface description table out-of-sync. the following
- ## modification skips over E1 cards as interfaces.
- #
- ### I suspect that the mod I made above, to use the ifAlias
- ### oid if possible, may cause problems here. If it seems
- ### that your descriptions are out of sync, try commenting
- ### out the "if ( condition )" and it's closing right brace
- ### so that the "shift @ciscodescr" get executed for *all*
- ### iterations of this loop.
- ###
- ### - mjd 2/5/95
- ###
- if ($ciscobox && $siftype{$index} != 18) {
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-});
- my $index;
- foreach $index ( sort { $a <=> $b } keys %sifdesc) {
- my $c;
- my $speed = int($sifspeed{$index} / 8); # bits to byte
- my $speed_str=&fmi($speed);
- my $name="$iphost{$index}";
-
-# $name = "$router.int.$index" if not $name or $name =~ /\s/ or $iponly;
- $name = "$router.int.$index";
-
- my $err_msg;
-
- $err_msg .= "######## - administratively not UP\n" if ($sifadminstatus{$index} != 1);
-# this check added by Josh - don't query E1-stack controllers
- $err_msg .= "######## - DS1 type\n"
- if ($siftype{$index} == 18);
-# i might be mistaken on this one - fwo@obsidian.co.za
- $err_msg .= "######## - E1 type\n"
- if ($siftype{$index} == 19);
- $err_msg .= "######## - it is a softwareLoopback interface\n"
- if ($siftype{$index} == 24);
- $err_msg .= "######## - it is a a DS3 contorller\n"
- if ($siftype{$index} == 30);
- $err_msg .= "######## - it is a ISDN S/T Interface\n"
- if ($siftype{$index} == 75);
- $err_msg .= "######## - it is a AT&T DS0 Point (64 Kbps)\n"
- if ($siftype{$index} == 81);
- $err_msg .= "######## - it is a CEF Sub-interface\n"
- if ($siftype{$index} == 162);
- $err_msg .= "######## - has an unrealistic speed setting\n"
- if (($speed == 0 ) || ($speed > 400 * 10**6));
- $err_msg .= "######## - administratively not UP\n"
- if ($sifoperstatus{$index} == 3) ;
- if($err_msg ne "") {
- print <<ECHO;
-########
-######## This Interface not configured :
-$err_msg######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- }else {
- $c = '';
- }
-
- print <<ECHO;
-${c}
-ECHO
-if($optctl{"ip"}) {
- print "${c}Target[$name]: $index:$community\@$ip\n";
-} else {
- print "${c}Target[$name]: $index:$community\@$router\n";
-}
-print <<ECHO;
-#${c}MaxBytes[$name]: $speed
-${c}MaxBytes[$name]: 1250000
-${c}YSize[$name]: 300
-${c}XSize[$name]: 600
-${c}Suppress[$name]: y
-${c}Title[$name]: $sysName ($iphost{$index}): $sifdesc{$index}
-${c}Options[$name]: bits, growright, nopercent
-ECHO
-#if($optctl{"options"}) {
-# print "${c}Options[$name]: $optctl{'options'}\n";
-#}
-print <<ECHO;
-${c}PageTop[$name]: <H1>Traffic Analysis for $sifdesc{$index}
-${c} $sciscodescr{$index}</H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sifdesc{$index} ($index)</TD></TR>
-${c} <TR><TD>IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>$speed_str ($ifType_d{$siftype{$index}})</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-ECHO
- }
-#
-# Frame-Relay
-#
-
- my(%circuits);
-
- $session->map_table ([[1,3,6,1,2,1,10,32,2,1,1], # Ifindex
- [1,3,6,1,2,1,10,32,2,1,2]],# DLCI
- sub ($@) {
- my ($rwindex,$crindex,$dlci) = @_;
- grep (defined $_ && ($_=pretty_print $_),
- ($rwindex,$crindex,$dlci) );
- my($tmpindex);
- $tmpindex = $crindex.".".$dlci;
- $circuits{$tmpindex} = $tmpindex;
- });
-
- foreach $index ( sort { $a <=> $b } keys %circuits) {
- my ($tmpname) = $router.".dlci.".$index;
- printf "\n\n";
- printf "Options[%s]: bits, noinfo, growright, nopercent\n",$tmpname;
- printf "YSize[%s]: 300\n",$tmpname;
- printf "XSize[%s]: 600\n",$tmpname;
- printf "YLegend[%s]: Bits per Second\n",$tmpname;
- printf "Suppress[%s]: y\n",$tmpname;
- if($optctl{"ip"}) {
- printf "Target[%s]: .1.3.6.1.2.1.10.32.2.1.9.%s\&.1.3.6.1.2.1.10.32.2.1.7.%s:%s\@%s\n",$tmpname,$index,$index,$community,$ip;
- } else {
- printf "Target[%s]: .1.3.6.1.2.1.10.32.2.1.9.%s\&.1.3.6.1.2.1.10.32.2.1.7.%s:%s\@%s\n",$tmpname,$index,$index,$community,$router;
- }
- printf "MaxBytes[%s]: 1250000\n",$tmpname;
- printf "Title[%s]: Traffic Analysis for DLCI %s\n",$tmpname,$index;
- printf "PageTop[%s]: <H1>Traffic Analysis for DLCI %s</H1>\n",$tmpname,$index;
- printf " <TABLE>";
- printf " <TR><TD>System:</TD><TD>%s in %s</TD></TR>",$sysName,$sysLocation;
- printf " <TR><TD>Maintainer:</TD><TD>%s</TD></TR>",$sysContact;
- printf " <TR><TD>InterfaceID.DLCI:</TD><TD>%s</TD></TR>",$tmpname;
- printf " </TABLE>";
- }
-}
-
-main;
-exit(0);
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
- @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 4) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
diff --git a/src/contrib/cisco_BPX_MGX/howto.html b/src/contrib/cisco_BPX_MGX/howto.html
deleted file mode 100644
index 0414497..0000000
--- a/src/contrib/cisco_BPX_MGX/howto.html
+++ /dev/null
@@ -1,730 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w=
-"urn:schemas-microsoft-com:office:word" xmlns=
-"http://www.w3.org/TR/xhtml1/strict">
-<head>
-<meta http-equiv="Content-Type" content=
-"text/html; charset=windows-1252" />
-<meta name="ProgId" content="Word.Document" />
-<meta name="Generator" content="Microsoft Word 9" />
-<meta name="Originator" content="Microsoft Word 9" />
-<link rel="File-List" href="./howto_files/filelist.xml" />
-<title>Monitoring Cisco BPX ATM Switches with MRTG:</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Author>Daniel Newman</o:Author>
- <o:Template>Normal</o:Template>
- <o:LastAuthor>oetiker</o:LastAuthor>
- <o:Revision>2</o:Revision>
- <o:TotalTime>61</o:TotalTime>
- <o:Created>2001-05-27T18:25:00Z</o:Created>
- <o:LastSaved>2001-05-27T18:25:00Z</o:LastSaved>
- <o:Pages>3</o:Pages>
- <o:Words>728</o:Words>
- <o:Characters>4155</o:Characters>
- <o:Company>TELERGYINC</o:Company>
- <o:Lines>34</o:Lines>
- <o:Paragraphs>8</o:Paragraphs>
- <o:CharactersWithSpaces>5102</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
- <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
- <w:UseMarginsForDrawingGridOrigin/>
- <w:Compatibility>
- <w:FootnoteLayoutLikeWW8/>
- <w:ShapeLayoutLikeWW8/>
- <w:AlignTablesRowByRow/>
- <w:ForgetLastTabAlignment/>
- <w:LayoutRawTableWidth/>
- <w:LayoutTableRowsApart/>
- </w:Compatibility>
- </w:WordDocument>
-</xml><![endif]-->
-<style type="text/css">
-<!--
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0cm;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";
- mso-ansi-language:EN-US;}
-h1
- {mso-style-next:Normal;
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:14.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:Arial;
- mso-bidi-font-family:"Times New Roman";
- mso-font-kerning:14.0pt;
- mso-ansi-language:EN-US;
- mso-bidi-font-weight:normal;}
-h2
- {mso-style-next:Normal;
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:2;
- font-size:12.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:Arial;
- mso-bidi-font-family:"Times New Roman";
- mso-ansi-language:EN-US;
- mso-bidi-font-weight:normal;
- font-style:italic;
- mso-bidi-font-style:normal;}
-h3
- {mso-style-next:Normal;
- margin-top:12.0pt;
- margin-right:0cm;
- margin-bottom:3.0pt;
- margin-left:0cm;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:12.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:Arial;
- mso-bidi-font-family:"Times New Roman";
- mso-ansi-language:EN-US;
- font-weight:normal;}
-p.Preformatted, li.Preformatted, div.Preformatted
- {mso-style-name:Preformatted;
- margin:0cm;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:0cm 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt 479.5pt;
- font-size:10.0pt;
- font-family:"Courier New";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-ansi-language:EN-US;
- layout-grid-mode:line;}
-@page Section1
- {size:612.0pt 792.0pt;
- margin:72.0pt 72.0pt 72.0pt 72.0pt;
- mso-header-margin:72.0pt;
- mso-footer-margin:72.0pt;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-<body lang="EN-GB" style='tab-interval:36.0pt'>
-<div class="Section1">
-<h1><span lang="EN-US">Monitoring Cisco BPX ATM Switches with
-MRTG:</span></h1>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<h3><b style='mso-bidi-font-weight:normal'><span lang="EN-US">These
-OIDs work for monitoring total cells transmitted and received
-on<span style="mso-spacerun: yes">&nbsp;</span> a trunk on the
-Cisco BPX Switch.</span></b></h3>
-
-<p class="MsoNormal"><span lang="EN-US">X=slot number
-Y=1<sup>st</sup> digit of port number Z=2<sup>nd</sup> digit of
-port number(If single digit number ie.8, Z=0)</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-.1.3.6.1.4.1.351.100.4.2.4.4.1.25.X0YZ000</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-atmTrkStatsTotalCellsTxtoLns</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">OBJECT-TYPE -- FROM <span
-style='mso-tab-count: 1'>&nbsp;&nbsp;</span> <span style=
-'mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-STRATACOM-MIB</span></p>
-
-<p class="MsoNormal" style='text-indent:36.0pt'><span lang="EN-US">
-SYNTAX <span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="MsoNormal" style='text-indent:36.0pt'><span lang="EN-US">
-MAX-ACCESS <span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="MsoNormal" style='text-indent:36.0pt'><span lang="EN-US">
-STATUS <span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="MsoNormal" style='text-indent:36.0pt'><span lang="EN-US">
-DESCRIPTION <span style='mso-tab-count:1'>&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-"The number of total cells transmitted to the line."</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">::= { iso(1) org(3) dod(6)
-internet(1) private(4) enterprises(1) stratacom(351)
-snmpAgents(100) strmSwitchMIB(4) switchServiceObjects(2)
-trunkServiceObjects(4) atmTrunkStatsTable(4) atmTrkStatsEntry(1)
-atmTrkStatsTotalCellsTxtoLns(25)</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-.1.3.6.1.4.1.351.100.4.2.4.4.1.26.X0YZ000</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-atmTrkStatsTotalCellsRxFromPorts</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">OBJECT-TYPE-- FROM<span
-style='mso-tab-count:
-1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-STRATACOM-MIB</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><span style=
-'mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-SYNTAX<span style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><span style=
-'mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-MAX-ACCESS<span style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><span style=
-'mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-STATUS<span style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><span style=
-'mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-DESCRIPTION<span style="mso-spacerun: yes">&nbsp;&nbsp;</span>
-<span style='mso-tab-count:1'></span> "The number of total cells
-received from the port."</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">::= { iso(1) org(3) dod(6)
-internet(1) private(4) enterprises(1) stratacom(351)
-snmpAgents(100) strmSwitchMIB(4) switchServiceObjects(2)
-trunkServiceObjects(4) atmTrunkStatsTable(4) atmTrkStatsEntry(1)
-atmTrkStatsTotalCellsRxFromPorts(26)</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">example MRTG.cfg
-entry:</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><span style="mso-spacerun:
-yes">&nbsp;</span>
-Target[Switchname_2.1]:.1.3.6.1.4.1.351.100.4.2.4.4.1.25.X0YZ000&amp;.1.3.6.1.4.1.351.100.4.2.4.4.1.26.X0YZ000:community@x.x.x.x*53</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#multiply above by 53(53
-bytes in a cell)</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Options[Switchname_2.1]:bits</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">PageTop[
-Switchname_2.1]:&lt;H1&gt;Traffic for switchname, FDR trunk 2.1 to
-switchname(MGX)&lt;/H1&gt;</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-AbsMax[Switchname_2.1]:149759768</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-MaxBytes[Switchname_2.1]:149759768</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Directory[Switchname_2.1]:xxxxx</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Ylegend[Switchname_2.1]:Bits per second</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-ShortLegend[Switchname_2.1]:bps</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Title[Switchname_2.1]:Traffic for Switchname, FDR trunk 2.1 to
-switchname(MGX)</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<h3><b style='mso-bidi-font-weight:normal'><span lang="EN-US">These
-OIDs work for monitoring total cells transmitted and received on a
-port on the Cisco BPX Switch.</span></b></h3>
-
-<p class="MsoNormal"><span lang="EN-US">X=slot number Y=port
-number</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">.1.3.6.1.4.1.351.100.4.2.2.3.1.8.X.Y</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">atmPortStatCellsRxs OBJECT-TYPE</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> -- FROM<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-STRATACOM-MIB</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> SYNTAX<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> MAX-ACCESS<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> STATUS<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> DESCRIPTION<span
-style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</span> "Total numbers
-of cells received."</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">::= { iso(1) org(3) dod(6) internet(1) private(4)
-enterprises(1) stratacom(351) snmpAgents(100) strmSwitchMIB(4)
-switchServiceObjects(2) atmServiceObjects(2) atmPortStatTable(3)
-atmPortStatEntry(1) 8 }</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">.1.3.6.1.4.1.351.100.4.2.2.3.1.12.X.Y</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">atmPortStatCellsTxs OBJECT-TYPE</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> -- FROM<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-STRATACOM-MIB</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> SYNTAX<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> MAX-ACCESS<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> STATUS<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> DESCRIPTION<span
-style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</span> "Total numbers
-of cells transmitted."</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">::= { iso(1) org(3) dod(6) internet(1) private(4)
-enterprises(1) stratacom(351) snmpAgents(100) strmSwitchMIB(4)
-switchServiceObjects(2) atmServiceObjects(2) atmPortStatTable(3)
-atmPortStatEntry(1) 12 }</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">Example MRTG.cfg entry:</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Target[SYRTGB01_6.10]:.1.3.6.1.4.1.351.100.4.2.2.3.1.8.6.10&amp;.1.3.6.1.4.1.351.100.4.2.2.3.1.12.6.10:public@10.1.1.34*53</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#multiply cells by 53 to
-convert to bytes</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Options[Switchname_6.10]:bits</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-PageTop[Switchname_6.10]:&lt;H1&gt;Port Bandwidth
-DS-3&lt;/H1&gt;</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-MaxBytes[Switchname_6.10]:4608000</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Directory[Switchname_6.10]:xxxxxx</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Ylegend[Switchname_6.10]:Bits per second</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-ShortLegend[Switchname_6.10]:bps</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">Title[Switchname_6.10]:Port
-Bandwidth<span style="mso-spacerun: yes">&nbsp;</span>
-DS-3</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<h1><span lang="EN-US">Monitoring Cisco MGX Frame Relay connections
-with MRTG:</span></h1>
-
-<h3><b style='mso-bidi-font-weight:normal'><span lang="EN-US">These
-OIDs work for monitoring total cells transmitted and received on a
-port on the Cisco BPX Switch.</span></b></h3>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">.1.3.6.1.4.1.351.110.2.5.1.1.4.1</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">xmtCells OBJECT-TYPE</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> -- FROM<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-AXIPOP-MIB</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> SYNTAX<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> MAX-ACCESS<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> STATUS<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> DESCRIPTION<span
-style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</span> "The number of
-cells transmitted on this channel."</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">::= { iso(1) org(3) dod(6) internet(1) private(4)
-enterprises(1) stratacom(351) basis(110) cardGeneric(2)
-sarChannelCounter(5) sarChannelCounterTable(1)
-sarChannelCounterEntry(1) xmtCells(4) 1 }</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">.1.3.6.1.4.1.351.110.2.5.1.1.12.1</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">rcvCells OBJECT-TYPE</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> -- FROM<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-AXIPOP-MIB</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> SYNTAX<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Counter</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> MAX-ACCESS<span
-style=
-'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-read-only</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> STATUS<span
-style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
-style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-Mandatory</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><span style='mso-tab-count:1'>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> DESCRIPTION<span
-style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</span> "The number of
-cells that were received on this channel."</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US">::= { iso(1) org(3) dod(6) internet(1) private(4)
-enterprises(1) stratacom(351) basis(110) cardGeneric(2)
-sarChannelCounter(5) sarChannelCounterTable(1)
-sarChannelCounterEntry(1) rcvCells(12) 1 }</span></p>
-
-<p class="Preformatted" style='tab-stops:0cm 47.95pt 95.9pt
-143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt'><span
-lang="EN-US"><[!if !supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-######enterprises.351.110.2.5.1.1.4.1.x.yy =Transmit Cells from
-SAR</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-######enterprises.351.110.2.5.1.1.12.1.x.yy =Recieve Cells from
-SAR</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-######x=slotnumber</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">######yy=channel
-number</span></p>
-
-<p class="MsoNormal"><span lang="EN-US"><[!if
-!supportEmptyParas]>&nbsp;<[!endif]></span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Target[Switchname_11_142]:enterprises.351.110.2.5.1.1.4.1.x.yy&amp;enterprises.351.110.2.5.1.1.12.1.x.yy:POPEYE\@SM_11@10.1.1.35*53</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#\@ the \breaks out of Perl
-so the @ is not processedthanks Tobi.</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#POPEYE is always the
-community name of the switch, SM_11 means service module 11, if you
-need stats from #the active PXM the community is
-POPEYE@PXM_ACTIVE</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">Options[Switchname_11_142]:
-bits</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-PageTop[Switchname_11_142]:&lt;H1&gt;xxxx Frame
-Statistics&lt;/H1&gt;</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-AbsMax[Switchname_11_142]:1536000</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#Port Speed</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-MaxBytes[Switchname_11_142]:1536000</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">#MaxBytes=CIR</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Directory[Switchname_11_142]:xxxx</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-Ylegend[Switchname_11_142]:Bits per second</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">
-ShortLegend[Switchname_11_142]:bps</span></p>
-
-<p class="MsoNormal"><span lang="EN-US">Title[Switchname_11_142]:
-11.19.0.17 DLCI 17</span></p>
-</div>
-</body>
-</html>
-
diff --git a/src/contrib/cisco_ipaccounting/CHANGELOG b/src/contrib/cisco_ipaccounting/CHANGELOG
deleted file mode 100644
index 8241b47..0000000
--- a/src/contrib/cisco_ipaccounting/CHANGELOG
+++ /dev/null
@@ -1,3 +0,0 @@
-CHANGELOG cisco_ip_acc_collect.pl
-
-- V0.9 20-Sep-1999 Initial Public Release
diff --git a/src/contrib/cisco_ipaccounting/README b/src/contrib/cisco_ipaccounting/README
deleted file mode 100644
index f6cec3e..0000000
--- a/src/contrib/cisco_ipaccounting/README
+++ /dev/null
@@ -1,70 +0,0 @@
-README - cisco_ip_acc_collect.pl
-
-This is cisco_ip_acc_collect.pl V0.9
-
-This Script gets IP-accounting data from a Cisco Router and generates output
-that can be fed into MRTG.
-
-Configzration:
---------------
-
-First of all, I sugest you make a backup of your router config, before
-you configure IP accounting and run this script... If something happens,
-I've told you ...
-
-In the networks you can enter the networks you like to analyse in the
-following form:
-
-xxx.xxx.xxx.xxx/CDIR Name
-
-xxx.xxx.xxx.xxx is the IP Adress of the Network
-
-CDIR is the CDIR Bitmask
- /32 = 255.255.255.255
- /24 = 255.255.255.0
- /16 = 255.255.0.0 etc.
-
-Name Is the name of the network.
- This name can apear more than once.
- The traffic of all networks that have same
- name will be added into one output.
-
-In the .pl file you have to change some variables. See the .pl file for more
-informations.
-
-In the mrtg config file you can enter something like this:
-
-Target[tagretname]: `cat /usr/local/mrtg/cisco_ipaccounting/log_test`
-
-Running this script:
---------------------
-
-I start this script with cron, yost before mrtg like this:
-
-*/5 * * * * cramer /usr/local/mrtg/cisco_ipaccounting/collect.pl ; /usr/local/mrtg/mrtg /usr/local/mrtg/accounting.conf
-
-Where to get updates:
----------------------
-
-You can download new versions from ftp://ftp.dolphins.ch/pub/Dolphins/mrtg
-
-
-Copyrigth & Warranty:
----------------------
-
-This script is
- (c) 1999 by Dolphins Network Systems, Matthias Cramer
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc., 675
- Mass Ave, Cambridge, MA 02139, USA.
diff --git a/src/contrib/cisco_ipaccounting/TODO b/src/contrib/cisco_ipaccounting/TODO
deleted file mode 100644
index 8cc9e82..0000000
--- a/src/contrib/cisco_ipaccounting/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-TODO - cisco_ip_acc_collect.pl
-
-* Make the script multi router capable
diff --git a/src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl b/src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl
deleted file mode 100755
index 5890e15..0000000
--- a/src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/perl
-
-##############################################################################
-#
-# cisco_ip_acc_collect.pl
-# (c) 1999 by Dolphins Network Systems, Matthias Cramer <cramer@dolphins.ch>
-#
-# Licence: LGPL
-#
-##############################################################################
-#
-# This Script is very loosly based on whodo from Tony Farr
-#
-# This Script gets IP-accounting data from a Cisco Router
-# In the network file you can define networks which you like to analyse.
-#
-# Special modules : Net::Netmask, SNMP_util
-#
-##############################################################################
-#
-# Version History
-# V0.9 First Public Release
-#
-##############################################################################
-
-
-use Getopt::Std;
-use File::Basename;
-use Net::Netmask;
-use strict;
-use Socket;
-
-# Adjust this path to where you MRTG resides, so that SNMP_util
-# can be found.
-
-use lib "/usr/local/mrtg";
-use SNMP_util;
-
-#
-# Some variables to adjust.
-#
-
-# The write community of your router
-my $HOST= 'writecommunity@router';
-
-# Where is your network file
-my $NETWORK = "/usr/local/mrtg/cisco_ipaccounting/networks";
-
-# Where to write the accounting info
-my $OUTDIR = "/usr/local/mrtg/cisco_ipaccounting/";
-
-
-# Below here you should have to be changed
-
-my %network;
-my %in;
-my %out;
-
-open (NET, $NETWORK);
-my $line;
-my $block;
-
-while ($line = <NET>) {
- $line =~ /(.+?)[\s]+(.+)/;
- my $name = $2;
- $block=new Net::Netmask($1);
- $block->storeNetblock();
- $in{$block->base()}=0;
- $out{$block->base()}=0;
- $network{$name} .= $block->base() . ":";
-}
-
-&checkpoint_stats($HOST);
-&get_stats($HOST);
-
-# print "Base \tIn\tOut\n";
-# print "$base\t$in{$base}\t$out{$base}\n";
-
-foreach my $k_network (keys %network) {
- my @base = split(/:/, $network{$k_network});
- my $base_in = 0;
- my $base_out = 0;
- foreach my $i_base (@base) {
- $base_in += $in{$i_base};
- $base_out += $out{$i_base};
- }
-
- open(OUT, ">$OUTDIR"."log_"."$k_network");
-
- print OUT "$base_in\n";
- print OUT "$base_out\n";
- print OUT "\n";
- print OUT "$k_network\n";
-
- close (OUT);
-}
-
-sub checkpoint_stats {
-# Take a checkpoint on IP accounting on the given router & return the duration
-# The checkpoint is done by doing a get then a set on actCheckPoint
- my ($age);
-
- # Find how long since the last checkpoint
- ($age) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.8.0');
- warn "No actAge returned.\n" unless $age;
-
- # Check to see if we've lost any data
- ($_) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.6.0');
- warn "Accounting table overflow - $_ bytes lost.\n" if $_ > 0;
-
- # Do a new checkpoint
- ($_) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.11.0');
- die "No actCheckPoint returned.\n" unless defined;
- snmpset ($_[0], '1.3.6.1.4.1.9.2.4.11.0', 'integer', $_);
- $age;
-}
-
-
-sub get_stats {
-# Summarise the checkpoint by destination network (not host).
-# Summary is placed into %traffictab - a hash of hashes indexed by
-# source device & destination network.
-
- my($src, $dst,$traffic);
- my @response = snmpwalk ($_[0], '1.3.6.1.4.1.9.2.4.9.1.4' );
-
- foreach $_ (@response) {
- /(\d+\.\d+\.\d+\.\d+)\.(\d+\.\d+\.\d+\.\d+):(\d+)/ ||
- die "Cannot parse response from walk.\n";
- $dst=$2;
- $src=$1;
- $traffic=$3;
- $block = findNetblock($src);
- if ($block) {
- $out{$block->base()} += $traffic;
- }
- $block = findNetblock($dst);
- if ($block) {
- $in{$block->base()} += $traffic;
- }
- }
-}
-
-
diff --git a/src/contrib/cisco_ipaccounting/networks b/src/contrib/cisco_ipaccounting/networks
deleted file mode 100644
index 7f35141..0000000
--- a/src/contrib/cisco_ipaccounting/networks
+++ /dev/null
@@ -1,4 +0,0 @@
-192.168.3.0/28 Dummy
-192.168.2.12/32 Dummy
-10.10.1.0/27 Sample
-172.1.0.1/32 Test
diff --git a/src/contrib/cisco_tftp/scarfconf.pl b/src/contrib/cisco_tftp/scarfconf.pl
deleted file mode 100644
index f6de534..0000000
--- a/src/contrib/cisco_tftp/scarfconf.pl
+++ /dev/null
@@ -1,187 +0,0 @@
-#!/usr/local/bin/perl
-#
-###############################################################
-# Copyright 1999 Frontier GlobalCenter/Global Crossing
-# Copy/Use/Modification is fine please mention us in any mods and
-# send them to us. Also thanks to the perl snmp people!
-###############################################################
-#
-# who to blame: pee@gblx.net Paul E. Erkkila
-#
-# A perl script to have a cisco router dump it's configs
-# to a tftp host
-#
-# To use this script I recommend defining a view on the router
-# that does NOT have full write such as
-#
-# snmp-server view configView system included
-# snmp-server view configView ciscoConfigCopyMIB included
-# snmp-server community [community name] view configView RW
-#
-# It needs to be RW so it can set table entries
-#
-# the CISCO-CONFIG-COPY mib is 12.x only as far as I
-# can tell
-#
-# $Author: oetiker $
-# $Id: scarfconf.pl,v 1.1.1.1 2002/02/26 10:16:32 oetiker Exp $
-# $Revision: 1.1.1.1 $
-#
-#
-
-require 5.003;
-use strict;
-
-## snmp perl
-use SNMP_Session;
-use SNMP_util "0.71";
-use BER;
-
-
-my $host = $ARGV[0] || die "useage: $0 target community toHost ID";
-my $community = $ARGV[1] || die "useage: $0 target community toHost ID";
-my $toHost = $ARGV[2] || die "useage: $0 target community toHost ID";
-my $randomid = $ARGV[3] || die "useage: $0 target community toHost ID";
-
-
-&snmpmapOID("cicsoMgmt", "1.3.6.1.4.1.9.9.96");
-&snmpmapOID("ccCopySourceFileType", "1.3.6.1.4.1.9.9.96.1.1.1.1.3");
-&snmpmapOID("ccCopyDestFileType", "1.3.6.1.4.1.9.9.96.1.1.1.1.4");
-&snmpmapOID("ccCopyServerAddress", "1.3.6.1.4.1.9.9.96.1.1.1.1.5");
-&snmpmapOID("ccCopyFileName", "1.3.6.1.4.1.9.9.96.1.1.1.1.6");
-&snmpmapOID("ccCopyEntryRowStatus", "1.3.6.1.4.1.9.9.96.1.1.1.1.14");
-&snmpmapOID("ccCopyState", "1.3.6.1.4.1.9.9.96.1.1.1.1.10");
-
-
-my ($oid,$response);
-
-#
-# First a simple SNMP Get
-#
-my $hostopt = $community . "@" . $host;
-
-
-# get system uptime to see if it's actually working :)
-$oid = "sysUptime";
-# print "Getting $oid from $host\n";
-($response) = &snmpget($hostopt, $oid);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "$host did not respond to SNMP query\n";
- exit;
-}
-
-# build the table row
-# print "Sending Row Build (Create and Wait) ";
-$oid = "ccCopyEntryRowStatus." . $randomid;
-($response) = &snmpset($hostopt,$oid,'int',5);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "Failure setgging $oid on $host\n";
- exit;
-}
-
-# 4 is running-config
-# print "Setting source file type ";
-$oid = "ccCopySourceFileType." . $randomid;
-($response) = &snmpset($hostopt,$oid,'int',4);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "Failure setting $oid on $host\n";
- exit;
-}
-
-# 1 is netfile
-#print "Setting destination file type ";
-$oid = "ccCopyDestFileType." . $randomid;
-($response) = &snmpset($hostopt,$oid,'int',1);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "Failure setting $oid on $host\n";
- exit;
-}
-
-# send it to this host
-#print "Setting destination ip address ";
-$oid = "ccCopyServerAddress." . $randomid;
-($response) = &snmpset($hostopt,$oid,'ipaddr',$toHost);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "Failure setting $oid on $host\n";
- exit;
-}
-
-# name to use
-# print "Setting config file name ";
-$oid = "ccCopyFileName." . $randomid;
-my $filename = $host . "." . $randomid;
-($response) = &snmpset($hostopt,$oid,'string',$filename);
-if ($response) {
-# print "$oid : $response\n";
-} else {
- print "Failure setting $oid on $host\n";
- exit;
-}
-
-# GO GO GO
-print "Sending request to start copy operation ";
-$oid = "ccCopyEntryRowStatus." . $randomid;
-($response) = &snmpset($hostopt,$oid,'int',1);
-if ($response) {
- print "$oid : $response\n";
-} else {
- exit;
-}
-
-
-my $pollagain = 1;
-while ($pollagain) {
-my $pstatus = &waitForCompletion($hostopt);
-if ($pstatus eq 1) {
- print "Waiting\n";
-}
-if ($pstatus eq 2) {
- print "Running\n";
-}
-if ($pstatus eq 3) {
- print "Successful\n";
- $pollagain = 0;
-}
-if ($pstatus eq 4) {
- print "Copy Failed\n";
- $pollagain = 0;
-}
-sleep(1);
-}
-
-
-exit;
-#### EOP ###
-#############
-
-
-
-sub waitForCompletion {
-my ($hostopt) = @_;
-
-my $oid = "ccCopyState." . $randomid;
-my $response;
-($response) = &snmpget($hostopt, $oid);
-if ($response) {
- return $response;
-} else {
- print "$host did not respond to SNMP query\n";
- exit;
-}
-
-
-}
-
-
-
-
diff --git a/src/contrib/ciscoindex/README b/src/contrib/ciscoindex/README
deleted file mode 100644
index b2c888d..0000000
--- a/src/contrib/ciscoindex/README
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# ciscoindex.pl
-#
-# Written 1/20/99 by Tim Cimarusti
-#
-# This PERL script will read in the a Cisco router config file
-# created by the "write network" command and create a HTML index
-# for it's interfaces that corresponds with MRTG.
-# It sorts the output by interface type and adds descriptions,
-# IP addresses, DLCI numbers, and bandwidth to the HTML.
-#
-# usage : ciscoindex.pl <config-file-name>
-#
-# Note: The HTML document will be named <hostname>.html
-# where <hostname> is whatever is in the router config.
-#
-# Feedback : cimarust@mercernet.com
-#
diff --git a/src/contrib/ciscoindex/ciscoindex.pl b/src/contrib/ciscoindex/ciscoindex.pl
deleted file mode 100644
index e532eb1..0000000
--- a/src/contrib/ciscoindex/ciscoindex.pl
+++ /dev/null
@@ -1,135 +0,0 @@
-# ciscoindex.pl
-###############################################################################
-# Written 6/14/1999 by Tim Cimarusti tim@cimware.com
-#
-# This PERL script will read in the MRTG config file and a Cisco router
-# config file (created by the "write network" command) and create a HTML
-# index for the interfaces that corresponds with MRTG.
-# It sorts the output by interface type and adds descriptions,
-# IP addresses, DLCI numbers, and bandwidth to the HTML.
-#
-###############################################################################
-# usage : ciscoindex.pl <mrtg-config-file-name> <cisco-config-file-name>
-#
-# Note: The HTML document will be named <hostname>.html
-# where <hostname> is whatever is in the router config.
-#
-###############################################################################
-#
-# Revised 2/5/2001 - Now works with version 2.9.7 of MRTG
-#
-###############################################################################
-
-$MRTGCFG = $ARGV[0];
-$CiscoCFG = $ARGV[1];
-&ProcessMRTGFile;
-&ProcessCiscoFile;
-&PrintHTML;
-exit(0);
-
-#
-# Read the MRTG config file to find out the interfaces.
-#
-sub ProcessMRTGFile {
- open (MRTGFile, $MRTGCFG ) || die "Can't find MRTG config file. $!\n";
- while(<MRTGFile>) {
- chomp;
- if ($_ =~ /SetEnv/) {
- @a=split " ", $_;
- if ($a[0] eq "#") { next; } # Skip commented interfaces
- $intf[$x]=substr($a[2],16,-1); # Find the Interface name
- @c=split "]", substr($a[0],7); # Find the name of the mrtg html page
- $num[$x]=$c[0];
- $x++;
- }
- }
- close MRTGFile;
-}
-
-#
-# Read down the Cisco Router config file to find out info about each interface.
-#
-sub ProcessCiscoFile {
- open (CiscoFile, $CiscoCFG ) || die "Can't find Cisco config file. $!\n";
- while(<CiscoFile>) {
- chomp;
- if ($_ =~ /hostname /) { $hostname = substr(lc,9); next;}
- if ($_ eq "no ip address") { next; }
- if ($_ eq "!") { $found="n"; }
- if ($_ =~ /interface /) {
- @x=split " ", $_;
- for ($i=0; $i <= $#num; $i++) {
- if ($x[1] eq $intf[$i]) { $found = "y"; last;}
- }
- }
-
- if ($found eq "y") {
- if ($_ =~ /description/) { $description[$i] = substr($_,13); }
- if ($_ =~ /bandwidth/) { @x=split " ", $_; $bandwidth[$i] = $x[1]; }
- if ($_ =~ /interface-dlci/) { @x=split " ", $_; $dlci[$i] = $x[2]; }
- if ($_ =~ /ip address/) { @x=split " ", $_; $ipaddress[$i] = $x[2]; }
- }
- }
- close CiscoFile;
-}
-
-#
-# Create a HTML document.
-#
-sub PrintHTML {
- # Change this to whatever directory you use for serving up the files
- $mrtgdir="/mrtg/$hostname/";
-
- $HTMLOut = $hostname.".html";
- open (HTMLFile, ">$HTMLOut") || die "Couldn't create HTMLOUT file. $!\n";
-
- # use binmode on UNIX servers
- binmode HTMLFile;
-
- print HTMLFile "<html>\n";
- print HTMLFile "<!-- Created by ciscoindex.pl : Visit www.cimware.com --->\n";
- print HTMLFile "<head><title>".$hostname.": Summary of today's activity</title>\n";
- print HTMLFile "<meta name='keywords' content='$hostname, MRTG'></head>\n";
- print HTMLFile "<body bgcolor=ffffff>\n";
- print HTMLFile "<h1>".$hostname."</h1>\n";
- print HTMLFile "<hr>\n\n";
-# print HTMLFile "<a href=".$mrtgdir.$hostname.".cpu.html><b>CPU</b></a><br>\n";
-# print HTMLFile " <blockquote><font size=-1><i>\n";
-# print HTMLFile " <a href=".$mrtgdir.$hostname.".cpu.html><img border=0 src=".$mrtgdir.$hostname.".cpu-day.png></a>\n";
-# print HTMLFile "</i></font></blockquote><hr>\n\n";
- print HTMLFile "\n";
-
- # I like to sort my interfaces.
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,4) eq "Fddi") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,12) eq "FastEthernet") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,8) eq "Ethernet") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,9) eq "TokenRing") { &PrintRecord; } }
-
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial0") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial1") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial2") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial3") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial4") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial5") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial6") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial7") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial8") { &PrintRecord; } }
- for ($i=0; $i <= $#num; $i++) { if (substr($intf[$i],0,7) eq "Serial9") { &PrintRecord; } }
-
- print HTMLFile "</body>\n";
- print HTMLFile "</html>\n";
- close (HTMLOut);
-}
-
-# Print section for each record.
-sub PrintRecord {
- print HTMLFile "<a href=".$mrtgdir.$num[$i].".html><b>".$intf[$i]."</b></a><br>\n";
- print HTMLFile " <blockquote><font size=-1><i>\n";
- if ($description[$i] ne "") { print HTMLFile " Description : ".$description[$i]."<br>\n"; }
- if ($ipaddress[$i] ne "") { print HTMLFile " IP Address : ".$ipaddress[$i]."<br>\n"; }
- if ($bandwidth[$i] ne "") { print HTMLFile " Bandwidth : ".$bandwidth[$i]."<br>\n"; }
- if ($dlci[$i] ne "") { print HTMLFile " DLCI : ".$dlci[$i]."<br>\n"; }
- print HTMLFile " <a href=".$mrtgdir.$num[$i].".html><img border=0 src=".$mrtgdir.$num[$i]."-day.png></a>\n";
- print HTMLFile "</i></font></blockquote><p>\n\n";
- print HTMLFile "\n";
-}
diff --git a/src/contrib/cpuinfo/README b/src/contrib/cpuinfo/README
deleted file mode 100644
index caae515..0000000
--- a/src/contrib/cpuinfo/README
+++ /dev/null
@@ -1,17 +0,0 @@
-This script allows mrtg to monitor cpu usage for both system and user on linux
-and sun solaris.
-
-All of the information you need to set it up, including a sample cfg file
-is documented in the header of the script itself. If you have any questions,
-you can email me at schu@schu.net and I'll try to get back to you.
-
-Hope it works for you as well as it does for me :)
-
-schu
-
-PLEASE NOTE THAT I NO LONGER WORK FOR 7X. DO *NOT* SEND EMAIL TO SCHU@7X.COM.
-THAT ADDRESS IS NOW ALIASED TO THE 7X GENERAL MANAGER. ANY MAIL SENT THERE WILL
-GO TO THE WRONG PERSON. Apparently 7x is to lame to remove my old address and let
-the server bounce it.
-
-Matthew Schumacher <schu@schu.net>
diff --git a/src/contrib/cpuinfo/cpuinfo.pl b/src/contrib/cpuinfo/cpuinfo.pl
deleted file mode 100755
index 2297de0..0000000
--- a/src/contrib/cpuinfo/cpuinfo.pl
+++ /dev/null
@@ -1,195 +0,0 @@
-#!/usr/bin/perl
-
-# ============================================================================
-# CPU Usage script for mrtg
-#
-# File: cpuinfo.pl
-# Author: Matthew Schumacher | schu@schu.net
-# Version: 1.3
-#
-# Date: 8/17/2000
-# Purpose: This script reports CPU usage for user
-# and system to mrtg, along with uptime
-# and the machine's hostname.
-#
-# Usage: ./cpuinfo.pl [machine] [os]
-#
-# For now [os] can only be "sun" or "linux"
-#
-#
-# Info: Designed on RedHat linux 6.2 with perl
-# version 5.005_03. The script itself has
-# only been tested on Linux, however, it
-# has been tested to connect to, and graph
-# CPU usage on sun and linux.
-#
-# This script requires both sar and rsh to
-# be installed and working. Because linux
-# does not come with sar (mine didn't) it
-# may be necessary to download and install
-# it. Get sar here:
-#
-# ftp://metalab.unc.edu/pub/Linux/system/status/sysstat-3.2.4.tar.gz
-#
-# How it works:
-#
-# The script uses rsh (or ssh) to run sar on the the
-# remote machine. Sar samples the cpu time
-# for both user and system once per second
-# for 10 seconds. It then reports an average
-# to the script, which parses out the information
-# and formats it in a way mrtg can understand.
-# The script also runs uptime to get the machine's
-# uptime and passes it to mrtg.
-#
-#
-# [History]
-#
-# 1/4/2000 - Added support for different rsh programs.
-# I also made the default rsh program ssh for security
-# reasons.
-#
-# 3/9/2000 - Removed the default os because it seemed
-# redundant. Added code to support localhost as a machine
-# name.
-#
-# 8/17/2000 - Updated sar regex for sar command. Sorry
-# for not keeping up with the email, I had some email
-# issues then finnaly I got my own domain and changed it
-# to schu@schu.net.
-#
-# ============================================================================
-# Sample cfg:
-#
-# WorkDir: /home/httpd/html/mrtg
-# Target[machine]: `/home/mrtg/run/cpuinfo.pl localhost linux`
-# MaxBytes[machine]: 100
-# Options[machine]: gauge, nopercent
-# Unscaled[machine]: dwym
-# YLegend[machine]: % of CPU used
-# ShortLegend[machine]: %
-# LegendO[machine]: &nbsp;CPU System:
-# LegendI[machine]: &nbsp;CPU User:
-# Title[machine]: Machine name
-# PageTop[machine]: <H1>CPU usage for machine (schu's workstation)
-# </H1>
-# <TABLE>
-# <TR><TD>System:</TD><TD>Machine</TD></TR>
-# </TABLE>
-#
-# ============================================================================
-# setup local vars
-my($machine, $os);
-
-# ============================================================================
-# == Enter your rsh program here here ==
-
-$rsh = "/usr/local/bin/ssh -x"; # Enter your rsh command here
-
-# == You shouldn't need to edit anything below this line ==
-#========================================================
-
-# This checks for options passed cpuinfo.pl from the cmd line
-if (scalar(@ARGV) < 2)
- {
- print("USAGE: cpuinfo.pl {machine} {os}\n");
- exit(-1);
- }
-
-if ($ARGV[0] ne '' && $ARGV[0] ne '#')
- {
- $machine = $ARGV[0];
- }
-
-if ($ARGV[1] ne '' && $ARGV[1] ne '#')
- {
- $os = $ARGV[1];
- }
-
-# Validate the os
-SWITCH:
-{
- if ($os =~ /^sun$/){last SWITCH;}
- if ($os =~ /^linux$/){last SWITCH;}
-
- # DEFAULT: Die if we can't figure out what the os is
- die "Can't figure out which OS the machine is.\n";
-}
-
-# Execute the appropriate subroutine based on the os
-&$os;
-
-exit(0);
-
-#=======================================================
-# Subroutines: names of subroutines are supported OSs.
-#========================================================
-sub sun
- {
-
- # Run commands
- if ($machine =~ 'localhost')
- {
- $getcpu = `sar -u 1 10 | grep Average`;
- $getuptime = `uptime`;
- }
- else
- {
- $getcpu = `$rsh $machine "sar -u 1 10" | grep Average`;
- $getuptime = `$rsh $machine "uptime"`;
- }
-
- # Parse though getcpu and get data
- $getcpu =~ /^Average\s+(\d+)\s+(\d+)\s+/;
- $outputusr = $1;
- $outputsys = $2;
-
- # Print getcpu data for mrtg
- print $outputusr."\n";
- print $outputsys."\n";
-
- # Parse though getuptime and get data
- $getuptime =~ /^\s+\d{1,2}:\d{2}..\s+up\s+(\d+)\s+(......),/;
-
- # Print getuptime data for mrtg
- print $1." ".$2."\n";
-
- # Print machine name for mrtg
- print $machine."\n";
-
- }
-
-sub linux
- {
- # Run commands
- if ($machine =~ 'localhost')
- {
- $getcpu = `/usr/local/bin/sar -u 1 10 | grep Average`;
- $getuptime = `/usr/bin/uptime`;
- }
- else
- {
- $getcpu = `$rsh $machine "/usr/local/bin/sar -u 1 10 | grep Average"`;
- $getuptime = `$rsh $machine "/usr/bin/uptime"`;
- }
-
- # Parse though getcpu and get data
- $getcpu =~ /^Average:\s+all\s+(\d+)\.\d+\s+\d+\.\d+\s+(\d+)\.\d+\s+\d+\.\d+/;
- $getcpuusr = $1;
- $getcpusys = $2;
-
- # Print getcpu data for mrtg
- print $getcpuusr."\n";
- print $getcpusys."\n";
-
- # Parse though getuptime and get data
- $getuptime =~ /^\s+\d{1,2}:\d{2}..\s+up\s+(\d+)\s+(\w+),/;
-
- # Print getuptime data for mrtg
- print $1." ".$2."\n";
-
- # Print machine name for mrtg
- print $machine."\n";
-
- }
-exit(0);
diff --git a/src/contrib/cpuinfo/sample.cfg b/src/contrib/cpuinfo/sample.cfg
deleted file mode 100644
index e4db1bd..0000000
--- a/src/contrib/cpuinfo/sample.cfg
+++ /dev/null
@@ -1,15 +0,0 @@
-Target[machine]: `./cpuinfo.pl machine os`
-MaxBytes[machine]: 100
-Options[machine]: gauge, nopercent
-Unscaled[machine]: dwym
-YLegend[machine]: % of CPU used
-ShortLegend[machine]: %
-LegendO[machine]: &nbsp;CPU System:
-LegendI[machine]: &nbsp;CPU User:
-Title[machine]: Machine name
-PageTop[machine]: <H1>CPU usage for Machine name
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>Machine name</TD></TR>
- </TABLE>
-
diff --git a/src/contrib/cpumon/README b/src/contrib/cpumon/README
deleted file mode 100644
index ed84d99..0000000
--- a/src/contrib/cpumon/README
+++ /dev/null
@@ -1,31 +0,0 @@
-cpumon.pl
-
- I use this script to monitor cpu usage on any process that
- maintains a pid file. Usage is very simple:
-
- cpumon.pl <pidfile>
-
- To install, first edit the "ps" and "psargs" variables as
- needed. I found it easier to have these defined rather than
- hardcoded due to differences between ucb-based and SysV-based
- ps functions.
-
- cpumon.pl will return the cpu usage of the pid in the pidfile
- you specify in the appropriate format for MRTG. For monitoring
- processes on remote machines that are not snmpable, I run this
- program out of inetd (so I can tcp_wrap it) on a high port.
- See http://www.blackened.com/ircstats/ for cpu monitoring
- examples.
-
- To run this from mrtg, the syntax would be like:
-
-Target[cpu]: `path/to/cpumon.pl /path/to/pidfile`
-
- Direct questions or suggestions to me.
-
- Have fun!
-
- -mjr <mjr@blackened.com>
-
-
-
diff --git a/src/contrib/cpumon/cpumon.pl b/src/contrib/cpumon/cpumon.pl
deleted file mode 100644
index e3a4d65..0000000
--- a/src/contrib/cpumon/cpumon.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/local/bin/perl
-
-# This was taken from a PERL script Chris Behrens wrote to monitor
-# resource usage for his IRC servers and was trimmed down to
-# report only cpu usage. This has been tweaked to work well with
-# MRTG (Multi Router Traffic Grapher) and will work fine with
-# anything that has a pid file (ie: named)
-#
-# Matthew Ramsey <mjr@blackened.com>
-# Last Modified 31 OCT 1997
-
-$DEBUG = 0;
-
-# Which ps do you want to use ? If you use a non-berkeley based ps,
-# you will need to change the args used in the findcpu function.
-# Uncomment the line you want or modify one to suit your needs.
-
-#$ps = "/usr/ucb/ps"; # Solaris with UCB
-$ps = "/bin/ps"; # most systems
-
-# The ps arguments. For a UCB-based (BSD) ps, -aux will probably
-# work just fine for you. For SysV-based ps, -eaf works best for
-# me.
-
-$psargs = "-aux"; # UCB-based
-#$psargs = "-eaf"; # sysV-based
-
-if ($ARGV[0]) {
- $pidfile = $ARGV[0] ;
-} else {
- print STDERR "Usage: $0 <pidfile>\n" ;
- exit 1 ;
-}
-
-open(PID, "< $pidfile");
-chomp($pid = <PID>);
-close(PID);
-
-$cpu = findcpu($pid);
-
-print "$cpu\n";
-print "$cpu\n";
-print "$time\n";
-print "";
-
-exit; # We're done!
-
-sub findcpu
-{
- local($pid) = @_;
-
- local($cpu, $psline, @ps);
- open(PS, "$ps $psargs |") || die "Couldn't run a ps: $!";
- chomp(@ps = <PS>);
- close(PS);
- foreach $psline (@ps)
- {
- @blah = split(' ', $psline);
- print "$pid $blah[1]\n" if ($DEBUG);
- return $blah[2] if ($blah[1] == $pid);
- }
- return -1;
-}
diff --git a/src/contrib/diskmon/README b/src/contrib/diskmon/README
deleted file mode 100644
index bb428bd..0000000
--- a/src/contrib/diskmon/README
+++ /dev/null
@@ -1,112 +0,0 @@
-======================================
- DiskMon (getdisk.pl and showdisk.pl)
-======================================
-by Steven Micallef <smic@wire.net.au>
-
----------------
-What they do
----------------
-
-getdisk.pl and showdisk.pl work on the client/server principal.
-
-showdisk.pl - runs off the 'server' displaying disk partition % used.
-getdisk.pl - runs off the 'client' and connects to the 'server' to get disk
- info off showdisk.pl.
-
-
--------------------
-Before you begin
--------------------
-
-Before you Install, you need the following:
-
-- Perl
-- Net::Telnet Perl Module.
-
-You can get this straight from:
-
-ftp.oleane.net/pub/CPAN/mirrors/modules/by-module/Net/Net-Telnet-3.01.tar.gz
-
-
--------------
-Installation
--------------
-
-The following steps apply to EACH MACHINE YOU WANT TO MONITOR...
-
-1. Copy the showdisk.pl script to the host you wish to monitor.
-
-2. In your /etc/inetd.conf, insert the line:
-
-df stream tcp nowait root <path of your TCP wrapper> <path of showdisk.pl>
-
-Of course, the TCP wrapper isn't mandatory, but if you want to restrict access
-to the viewing of free disk space, I really recommend you install it.
-
-3. In your /etc/services file, put in the following line:
-
-df 9047/tcp
-
-The port you choose is up to you, but if you do change it from 9047, be sure
-to update getdisk.pl too (the port number is specified in the first few lines
-of the script).
-
-4. kill -HUP your inetd
-
-5. Test it by telnetting to the host at port 9047. You should get the
-following:
-
-bash~# telnet hostname 9047
-< usual connect messages >
-30
-40
-10
-20
-.
-.
-etc..
-
-Of course, the output depends on
-a) how many disks are on the machine, and
-b) how much space in % is used on each disk.
-
-If you didn't get any output, go back and make sure you did everything
-properly.
-
-
---------------------------------
-Setting up getdisk.pl with MRTG
---------------------------------
-
-The getdisk.pl script runs like so:
-
-./getdisk.pl <hostname> <disk number>
-
-For example, doing a ./getdisk sparky 1 will show how much % of the first
-partition (usually the root partition) on sparky is used.
-
-So how do you map a number to a partition?
-On the host you installed showdisk.pl on, do the following:
-
-bash~# df -k
-Filesystem 1024-blocks Used Available Capacity Mounted on
-/dev/hda1 202222 78786 112993 41% /
-/dev/hdc3 2486311 1247138 1110635 53% /usr
-/dev/hdc1 1486150 375570 1033782 27% /backup
- ^
-The first disk is 1, the second 2, and so on.. |
-Example: |
- bash~# ./getdisk.pl hostname 3 |
- 27 <-------------------------------------'
-
-Please look at sample.cfg to see how to setup getdisk.pl with MRTG.
-
-
----
-I hope this is as useful to you as it has been to me. If you have any
-problems/bug reports/advice/complaints, email me.
-
-Enjoy.
-
-Steven Micallef
-<smic@wire.net.au> \ No newline at end of file
diff --git a/src/contrib/diskmon/getdisk.pl b/src/contrib/diskmon/getdisk.pl
deleted file mode 100644
index 6c5f124..0000000
--- a/src/contrib/diskmon/getdisk.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-# This script is used to establish a TCP connection with a host to get the
-# disk info provided by showdisk.pl.
-#
-# use: ./getdisk.pl <hostname> <disk number>
-#
-# By Steven Micallef <smic@wire.net.au> on the 24/4/1999.
-# Externale bug fixed by Alon Goldberg <pyro@elapsed.net> 27/2/2000.
-
-use Net::Telnet;
-
-$hostname = $ARGV[0];
-$disk_no = $ARGV[1];
-
-# If you've changed the port showdisk.pl runs on, change it here too.
-$port = 9047;
-
-$i = 0;
-
-if (!defined($disk_no)) { print "Usage: $0 <hostname> <disk number>\n"; exit }
-
-$t = new Net::Telnet ( Host => $hostname, Port => $port);
-$t->open("$hostname");
-
-while ($i ne $disk_no) {
- $data = $t->getline(Timeout => 40);
- $i++;
- print $data, 0, "\n" if $i eq $disk_no;
-}
-
diff --git a/src/contrib/diskmon/sample.cfg b/src/contrib/diskmon/sample.cfg
deleted file mode 100644
index 8dda588..0000000
--- a/src/contrib/diskmon/sample.cfg
+++ /dev/null
@@ -1,25 +0,0 @@
-Target[hostAdisk]: `/mrtg/getdisk.pl hostA 1`
-Title[hostAdisk]: HostA's Root partition % used
-MaxBytes[hostAdisk]: 100
-PageTop[hostAdisk]: <H1> HostA's Root partition % used </H1>
-Suppress[hostAdisk]: y
-LegendI[hostAdisk]: % used
-LegendO[hostAdisk]:
-Legend1[hostAdisk]: % used
-Legend2[hostAdisk]:
-YLegend[hostAdisk]: percent used
-ShortLegend[hostAdisk]: used
-Options[hostAdisk]: gauge
-
-Target[hostBdisk]: `/mrtg/getdisk.pl hostB 1`
-Title[hostBdisk]: HostB's Root partition % used
-MaxBytes[hostBdisk]: 100
-PageTop[hostBdisk]: <H1> HostB's Root partition % used </H1>
-Suppress[hostBdisk]: y
-LegendI[hostBdisk]: % used
-LegendO[hostBdisk]:
-Legend1[hostBdisk]: % used
-Legend2[hostBdisk]:
-YLegend[hostBdisk]: percent used
-ShortLegend[hostBdisk]: used
-Options[hostBdisk]: gauge
diff --git a/src/contrib/diskmon/showdisk.pl b/src/contrib/diskmon/showdisk.pl
deleted file mode 100644
index e8f95bf..0000000
--- a/src/contrib/diskmon/showdisk.pl
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/perl
-# Displays disk info to the hosts that connect to it.
-#
-# No command line options, just put it in /etc/inetd.conf as shown in
-# the README file.
-#
-# By Steven Micallef <smic@wire.net.au> on the 24/4/1999.
-
-foreach $_ (`df -k | grep -v "Filesystem"`)
-{
- ($device, $size, $used, $free, $percent, $mount) = split(/\s+/);
- chop($percent);
- print "$percent\n";
-}
diff --git a/src/contrib/distrib/distrib.c b/src/contrib/distrib/distrib.c
deleted file mode 100644
index 021a602..0000000
--- a/src/contrib/distrib/distrib.c
+++ /dev/null
@@ -1,655 +0,0 @@
-/****************************************************************/
-/* */
-/* distrib.c (see readme.html for program explanation) */
-/* */
-/* author : Philippe Simonet, Philippe.Simonet@swiisstelecom.com*/
-/* */
-/* change log : */
-/* */
-/* v. 1.00 : initial update (SIP) (23.06.97) */
-/* */
-/* */
-/* */
-
-
-/************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <time.h>
-#include "gd.h"
-#include "gdfonts.h"
-
-#define FALSE 0
-#define TRUE 1
-
-#define TEXT 1
-#define RECT 2
-#define POLY 3
-#define COLOR 4
-#define COLORDEF 5
-#define LINK 6
-#define COMPOUND 7
-#define ENDCOMPOUND 8
-#define GIFAREA 9
-#define URL 10
-#define IN 11
-#define OUT 12
-#define INOUT 13
-#define UNKNOWN 99
-
-
-#ifndef max
- #define max(a,b) ((a)>(b))?(a):(b)
-#endif
-
-#ifndef min
- #define min(a,b) ((a)<(b))?(a):(b)
-#endif
-
-int distcount;
-int xsize, ysize, rounds, rate;
-int dist[1000][2];
-
-/************************************************************************/
-/* analyze command-line options */
-static int optind = 0; /* Global argv index. */
-static char *scan = NULL; /* Private scan pointer. */
-static int scale = 15;
-
-int getopt1( int argc, char *argv[], char *optstring, char ** optarg )
-{
- int c; /* return value */
- char *place;
- char *index();
-
- *optarg = NULL;
-
- /* check argument validity */
- if (scan == NULL || *scan == '\0') {
- if (optind == 0) optind++;
- if (optind >= argc) return EOF;
- place = argv[optind];
- if (place[0] != '-' || place[1] == '\0') return EOF;
- optind++;
- if (place[1] == '-' && place[2] == '\0') return EOF;
- scan = place+1;
- }
-
- c = *scan++; /* get option character */
- place = strchr(optstring, c);
- if (place == NULL || c == ':') return '?';
-
-
- /* set optarg if needed */
- if (*++place == ':') {
- if (*scan != '\0') {
- *optarg = scan; scan = NULL;
- } else {
- *optarg = argv[optind], optind++;
- }
- }
- return c;
-}
-
-/************************************************************************/
-void computes_distrib ( FILE * fi, int length, int nb, unsigned int maxbytes ) {
- int i,j;
- unsigned long time, in, out, maxin, maxout;
-
- for ( i = 0; i < length; i ++ ) {
- in = 0; out = 0;
-
- /* compute mean on 'nb' items */
- for (j = 0; j < nb; j ++ ) {
- unsigned long wi, wo;
-
- if (fscanf(fi,"%lu %lu %lu %lu %lu\n",&time,&wi,&wo,&maxin, &maxout) != 5) {
- printf ( "config file error !!!\n" );
- } else {
- in += wi; out += wo;
- }
- }
-
- in /= nb; out /= nb;
-
- if ( in >= maxbytes ) in = maxbytes-1;
- if ( out >= maxbytes ) out = maxbytes-1;
-
- dist[(( in*distcount)/maxbytes)][0] ++;
- dist[((out*distcount)/maxbytes)][1] ++;
- }
-
-};
-
-/************************************************************************/
-/* in case of trouble ... */
-void print_error ( void )
-{
- fprintf ( stderr, "Read mrtg log files and build distribution graphs.\n" );
- fprintf ( stderr, "Version 1.1, 27.06.97.\n" );
- fprintf ( stderr, "Use : case 1 : (1 distr. log file)\n" );
- fprintf ( stderr, " distrib -i logfile -o gfile -w width -h height -t type -r rate -d count\n" );
- fprintf ( stderr, " ifile : input log file name,\n" );
- fprintf ( stderr, " gfile : output gif file (will be overwritten),\n" );
- fprintf ( stderr, " count : histogram count,\n" );
- fprintf ( stderr, " rate : line rate,\n" );
- fprintf ( stderr, " type : length of measurement (d/w/m/y).\n" );
- fprintf ( stderr, "Use : case 2 : (distr. from distrib. file)\n" );
- fprintf ( stderr, " distrib -i distrib -o gfile -w width -h height -t x -r top -d count\n" );
- fprintf ( stderr, " ifile : input distribution summary file name,\n" );
- fprintf ( stderr, " gfile : output gif file (will be overwritten),\n" );
- fprintf ( stderr, " top : how may top n,\n" );
- fprintf ( stderr, " count : histogram count,\n" );
- fprintf ( stderr, " type : 'x'.\n" );
-}
-
-/************************************************************************/
-#define r(color) ((color&0x0000ff)>>0)
-#define g(color) ((color&0x00ff00)>>8)
-#define b(color) ((color&0xff0000)>>16)
-#define rgb(color) ((color&0x0000ff)>>0),((color&0x00ff00)>>8),((color&0xff0000)>>16)
-
-/************************************************************************/
-/* build a color or find the nearest color in the color table */
-int find_color ( gdImagePtr graph, int color ) {
- int i_col;
-
- if ( (i_col = gdImageColorExact(graph,r(color), g(color), b(color))) == -1 ) {
- if ( (i_col = gdImageColorAllocate(graph,r(color), g(color), b(color))) == -1 ) {
- i_col = gdImageColorClosest(graph,r(color), g(color), b(color));
- }
- }
- return (i_col);
-}
-
-
-/************************************************************************/
-/* draw the gif file */
-void draw_distrib_gif ( FILE * score, FILE * gif )
-{
- #define c_blank 245,245,245 /* base colors */
- #define c_light 194,194,194
- #define c_dark 100,100,100
- #define c_black 0,0,0
- #define c_white 255,255,0
- #define c_blue 0,0,255
- #define c_red 255,0,0
- #define c_green 0,255,0
-
- gdImagePtr graph;
- int i_light,i_dark,i_blank, i_black, i_white, i_blue, i_red, i_green;
- int color[4000][2];
-
- graph = gdImageCreate(xsize, ysize);
-
- /* the first color allocated will be the background color. */
-
- i_blank = gdImageColorAllocate(graph,c_blank);
- i_light = gdImageColorAllocate(graph,c_light);
- i_dark = gdImageColorAllocate(graph,c_dark);
-
- gdImageInterlace(graph, 1);
-
- i_black = gdImageColorAllocate(graph,c_black);
- i_white = gdImageColorAllocate(graph,c_white);
- i_red = gdImageColorAllocate(graph,c_red);
- i_green = gdImageColorAllocate(graph,c_green);
- i_blue = gdImageColorAllocate(graph,c_blue);
-
-
- {
- int i;
- for (i = 0; i <= distcount; i++ ) {
- color[distcount - i - 1][0] = gdImageColorAllocate(graph, (255*i)/distcount, 255, (255*i)/distcount);
- }
- for (i = 0; i <= distcount; i++ ) {
- color[distcount - i - 1][1] = gdImageColorAllocate(graph, (255*i)/distcount, (255*i)/distcount, 255);
- }
- }
-
-
- /* draw the image border */
- gdImageLine(graph,0,0,xsize-1,0,i_light);
- gdImageLine(graph,1,1,xsize-2,1,i_light);
- gdImageLine(graph,0,0,0,ysize-1,i_light);
- gdImageLine(graph,1,1,1,ysize-2,i_light);
- gdImageLine(graph,xsize-1,0,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,0,ysize-1,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,xsize-2,1,xsize-2,ysize-2,i_dark);
- gdImageLine(graph,1,ysize-2,xsize-2,ysize-2,i_dark);
-
- { /* date the graph */
- struct tm *newtime;
- time_t aclock;
- time( &aclock ); /* Get time in seconds */
- newtime = localtime( &aclock ); /* Convert time to struct */
- /* tm form */
-
- gdImageString(graph, gdFontSmall,gdFontSmall->w,3,asctime( newtime ),i_dark);
- };
-
-
- /*i_col = find_color(graph, colortable[pcurrententry->color]);
- gdImageFilledRectangle(graph,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->coords[2],
- pcurrententry->coords[3],i_col2);
- }
- gdImageString(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
- gdImageStringUp(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
-
-
- gdImagePtr brush_2pix;
- brush_2pix = gdImageCreate(2,2);
- gdImageColorAllocate(
- brush_2pix,
- r(colortable[colorratetable[pcurrententry->rate]]),
- g(colortable[colorratetable[pcurrententry->rate]]),
- b(colortable[colorratetable[pcurrententry->rate]]) );
- gdImageSetBrush(graph, brush_2pix);
- i_col = gdBrushed;
- gdImageLine(graph, x, y, x2, y2,i_col);
- gdImageDestroy(brush_2pix);*/
-
- /* draw axes and graphs */
- {
- int w = gdFontSmall->w, h = gdFontSmall->h, i, j, k, incrx, incry;
- char str[4000];
- int nbaxesx = (rate + 1);
- int nbaxesy = 6;
- int textx = 7;
- int texty = 15;
-
- incry = (ysize-(h*2)-(w*texty))/(nbaxesy-1);
- incrx = (xsize-(w*(textx+2)))/(nbaxesx-1);
- j = 100;
- for ( i = h*2; i <= ((h*2) + (incry * (nbaxesy-1))) ; i+= incry ) {
- gdImageLine(graph,w*textx,i,w*textx + (incrx*(nbaxesx-1)),i,i_black); /* horizontal */
- sprintf ( str, "%3u%%", j ); j-= 100/(nbaxesy-1);
- gdImageString(graph, gdFontSmall,w,i-h/2,str,i_black );
- }
- j = 0;
- for ( i = w*7; i <= ((w*7) + (incrx * (nbaxesx-1))) ; i+= incrx ) {
- /*gdImageLine(graph,i,h*2,i,h*2 + (incry*(AXESY-1)),i_black);*/ /* vertical */
- /*sprintf ( str, "%3u%%", j ); j+= (100/(AXESX-1));
- gdImageStringUp(graph, gdFontSmall, i - w/2, ysize - h, str, i_black );*/
- }
-
-
- for ( i = 0; i < rate; i ++ ) {
- char *name,*ptr;
- int tin=0, tout=0;
- int x1, x2, y1, y2, mrgx;
-
- if ( fscanf ( score, "%s", str ) == EOF ) break;
- /*printf ( "%s\n", str );*/
- name = str;
-
- if ((ptr = strtok( str, ":")) == NULL) continue;
- /*printf ( "%s:", name );*/
-
- for ( j = 0; j < distcount; j++ ) {
-
- dist[j][0] = dist[j][0] = 0;
-
- if ((ptr = strtok( NULL, "/,")) == NULL) continue;
- dist[j][0] = atoi(ptr); tin += dist[j][0];
-
- if ((ptr = strtok( NULL, "/,")) == NULL) continue;
- dist[j][1] = atoi(ptr); tout += dist[j][1];
-
- /*printf ( "%u/%u,",dist[j][0],dist[j][1] );*/
- }
-
- /*printf ( "\n" );*/
-
- /* draw label and graphs */
- mrgx = incrx/5;
- x1 = (w*textx) + (i*incrx) + (incrx/2) - (h/2);
- y1 = ysize-h;
- gdImageStringUp( graph, gdFontSmall, x1, y1, str, i_black );
- for (k = 0; k < 2; k ++ ) {
- y1 = ysize-((texty-4) * w);
- if ( k == 0 ) {
- x1 = (w*textx) + (i*incrx) + mrgx;
- x2 = x1 + (incrx/3);
- gdImageStringUp( graph, gdFontSmall, x1, y1, "in", i_black );
- } else {
- x2 = (w*textx) + ((i+1)*incrx) - mrgx;
- x1 = x2 - (incrx/3);
- gdImageStringUp( graph, gdFontSmall, x1, y1, "out", i_black );
- }
-
- y2 = h*2 + (incry*(nbaxesy-1));
- for ( j = distcount-1; j >=0 ; j-- ) {
- y1 = y2 - (((ysize-(h*2)-(w*texty) - 2) * dist[j][k]) / tin);
- if (j == 0) { /* 'correct' cumulative error */
- y1 = h*2;
- }
- gdImageFilledRectangle(graph, x1, y1, x2, y2,color[j][k]);
- gdImageRectangle(graph, x1, y1, x2, y2,i_black);
- y2 = y1;
- }
- }
-
- /*
-
- int x1, x2, y1, y2, mrgx;
- mrgx = incrx/5;
-
- x1 = (w*7) + (i*incrx) + mrgx;
- x2 = x1 + (incrx/3);
- y2 = h*2 + (incry*(AXESY-1)) - 2;
- y1 = y2 - (((ysize-(h*2)-(w*7) - 2) * dist[i][0]) / rounds);
- gdImageFilledRectangle(graph, x1, y1, x2, y2,i_green);
- gdImageRectangle(graph, x1, y1, x2, y2,i_dark);
-
- x2 = (w*7) + ((i+1)*incrx) - mrgx;
- x1 = x2 - (incrx/3);
- y2 = h*2 + (incry*(AXESY-1)) - 2;
- y1 = y2 - (((ysize-(h*2)-(w*7) - 2) * dist[i][1]) / rounds);
- gdImageFilledRectangle(graph, x1, y1, x2, y2,i_blue);
- gdImageRectangle(graph, x1, y1, x2, y2,i_dark);
- */
- }
- }
-
-
- gdImageGif(graph, gif);
-
- gdImageDestroy(graph);
-}
-
-
-/************************************************************************/
-/* draw the gif file, based on the tentry desciption */
-void draw_gif ( FILE * gif )
-{
- #define c_blank 245,245,245 /* base colors */
- #define c_light 194,194,194
- #define c_dark 100,100,100
- #define c_black 0,0,0
- #define c_white 255,255,0
- #define c_blue 0,0,255
- #define c_red 255,0,0
- #define c_green 0,255,0
-
- gdImagePtr graph;
- int i_light,i_dark,i_blank, i_black, i_white, i_blue, i_red, i_green;
-
- graph = gdImageCreate(xsize, ysize);
-
- /* the first color allocated will be the background color. */
- i_blank = gdImageColorAllocate(graph,c_blank);
- i_light = gdImageColorAllocate(graph,c_light);
- i_dark = gdImageColorAllocate(graph,c_dark);
-
- gdImageInterlace(graph, 1);
-
- i_black = gdImageColorAllocate(graph,c_black);
- i_white = gdImageColorAllocate(graph,c_white);
- i_red = gdImageColorAllocate(graph,c_red);
- i_green = gdImageColorAllocate(graph,c_green);
- i_blue = gdImageColorAllocate(graph,c_blue);
-
- /* draw the image border */
- gdImageLine(graph,0,0,xsize-1,0,i_light);
- gdImageLine(graph,1,1,xsize-2,1,i_light);
- gdImageLine(graph,0,0,0,ysize-1,i_light);
- gdImageLine(graph,1,1,1,ysize-2,i_light);
- gdImageLine(graph,xsize-1,0,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,0,ysize-1,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,xsize-2,1,xsize-2,ysize-2,i_dark);
- gdImageLine(graph,1,ysize-2,xsize-2,ysize-2,i_dark);
-
- { /* date the graph */
- struct tm *newtime;
- time_t aclock;
- time( &aclock ); /* Get time in seconds */
- newtime = localtime( &aclock ); /* Convert time to struct */
- /* tm form */
-
- gdImageString(graph, gdFontSmall,gdFontSmall->w,3,asctime( newtime ),i_dark);
- };
-
-
- /*i_col = find_color(graph, colortable[pcurrententry->color]);
- gdImageFilledRectangle(graph,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->coords[2],
- pcurrententry->coords[3],i_col2);
- }
- gdImageString(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
- gdImageStringUp(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
-
-
- gdImagePtr brush_2pix;
- brush_2pix = gdImageCreate(2,2);
- gdImageColorAllocate(
- brush_2pix,
- r(colortable[colorratetable[pcurrententry->rate]]),
- g(colortable[colorratetable[pcurrententry->rate]]),
- b(colortable[colorratetable[pcurrententry->rate]]) );
- gdImageSetBrush(graph, brush_2pix);
- i_col = gdBrushed;
- gdImageLine(graph, x, y, x2, y2,i_col);
- gdImageDestroy(brush_2pix);*/
-
- /* draw axes and graphs */
- {
- int w = gdFontSmall->w, h = gdFontSmall->h, i, j, incrx, incry, maxio;
- char str[20];
- #define AXESX (distcount + 1)
- #define AXESY 6
-
- maxio = 0;
- for ( i = 0; i < distcount; i ++ ) {
- if (maxio < dist[i][0]) maxio = dist[i][0];
- if (maxio < dist[i][1]) maxio = dist[i][1];
- }
-
- incry = (ysize-(h*2)-(w*7))/(AXESY-1); incrx = (xsize-(w*9))/(AXESX-1);
- j = 100;
- for ( i = h*2; i <= ((h*2) + (incry * (AXESY-1))) ; i+= incry ) {
- gdImageLine(graph,w*7,i,w*7 + (incrx*(AXESX-1)),i,i_black); /* horizontal */
- sprintf ( str, "%3u%%", j ); j-= 100/(AXESY-1);
- gdImageString(graph, gdFontSmall,w,i-h/2,str,i_black );
- }
- j = 0;
- for ( i = w*7; i <= ((w*7) + (incrx * (AXESX-1))) ; i+= incrx ) {
- gdImageLine(graph,i,h*2,i,h*2 + (incry*(AXESY-1)),i_black); /* vertical */
- sprintf ( str, "%3u%%", j ); j+= (100/(AXESX-1));
- gdImageStringUp(graph, gdFontSmall, i - w/2, ysize - h, str, i_black );
- }
-
-
- for ( i = 0; i < distcount; i ++ ) {
- int x1, x2, y1, y2, mrgx;
- mrgx = incrx/5;
-
- x1 = (w*7) + (i*incrx) + mrgx;
- x2 = x1 + (incrx/3);
- y2 = h*2 + (incry*(AXESY-1)) - 2;
- y1 = y2 - (((ysize-(h*2)-(w*7) - 2) * dist[i][0]) / rounds);
- /* printf ( "x1 %u, y1 %u, x2 %u, y2 %u.\n", x1, y1, x2, y2 );*/
- gdImageFilledRectangle(graph, x1, y1, x2, y2,i_green);
- gdImageRectangle(graph, x1, y1, x2, y2,i_dark);
-
- x2 = (w*7) + ((i+1)*incrx) - mrgx;
- x1 = x2 - (incrx/3);
- y2 = h*2 + (incry*(AXESY-1)) - 2;
- y1 = y2 - (((ysize-(h*2)-(w*7) - 2) * dist[i][1]) / rounds);
- /* printf ( "x1 %u, y1 %u, x2 %u, y2 %u.\n", x1, y1, x2, y2 );*/
- gdImageFilledRectangle(graph, x1, y1, x2, y2,i_blue);
- gdImageRectangle(graph, x1, y1, x2, y2,i_dark);
- }
- }
-
- gdImageGif(graph, gif);
-
- gdImageDestroy(graph);
-}
-
-
-
-
-
-/************************************************************************/
-void main ( int argc, char * argv[] )
-{
- FILE *config = NULL, *gif = NULL;
- char *sconfig = NULL, *sgif = NULL;
- char *optarg;
- char type;
- int i;
-
- /* globals */
- xsize = 400, ysize = 150; type = 'd'; rate = 1250000; distcount = 10;
-
- do {
- /***************************************************************/
- /* 0 : read program arguments */
- while ( ( i = getopt1( argc, argv, "o:i:t:w:h:r:d:", &optarg ) ) != EOF ) {
- switch ( i ) {
- case 'i':
- sconfig = optarg;
- break;
- case 'o':
- sgif = optarg;
- break;
- case 'w':
- if ( optarg != NULL ) {
- xsize = atoi (optarg);
- }
- break;
- case 'r':
- if ( optarg != NULL ) {
- rate = atoi (optarg);
- }
- break;
- case 'd':
- if ( optarg != NULL ) {
- distcount = atoi (optarg);
- }
- break;
- case 'h':
- if ( optarg != NULL ) {
- ysize = atoi (optarg);
- }
- break;
- case 't':
- if ( optarg != NULL ) type = optarg[0];
-
- if (type != 'd' && type != 'm' && type != 'w' && type != 'y' && type != 'x' ) {
- print_error();
- exit (0);
- }
- break;
- case '?':
- print_error();
- exit (0);
- break;
- default:
- break;
- }
- }
-
-
- if ( sgif == NULL || sconfig == NULL ) {
- print_error();
- break;
- }
-
-
- /***************************************************************/
- /* 1 : OPEN FILES */
- gif = fopen ( sgif, "wb" );
- if ( gif == NULL ) {
- fprintf ( stderr, "Error opening %s.\n", sgif );
- fclose ( config );
- break;
- }
-
- config = fopen ( sconfig, "r" );
- if ( config == NULL ) {
- fprintf ( stderr, "Error opening %s.\n", sconfig );
- break;
- }
-
- if ( type != 'x' ) {
-
- /***************************************************************/
- for ( i = 0; i < distcount; i ++ ) {
- dist[i][0] = 0; dist[i][1] = 0;
- }
- { /* read first line ... */
- unsigned long time, in, out;
- fscanf ( config, "%lu %lu %lu\n", &time, &in, &out ); /* read first line */
- }
- switch ( type ) {
- case 'd':
- computes_distrib ( config, 288, 1, rate );
- rounds = 288; /* 288 * 5' = 24 hours */
- break;
- case 'w':
- computes_distrib ( config, 100, 6, rate ); /* 600 * 5', with mean on 6 (30')*/
- computes_distrib ( config, 236, 1, rate );
- rounds = 336; /* 336 * 30' = 7 days */
- break;
- case 'm':
- computes_distrib ( config, 25, 24, rate ); /* 600 * 5', with mean on 24 (2hours) */
- computes_distrib ( config, 150, 4, rate ); /* 600 *30', with mean on 4 */
- computes_distrib ( config, 185, 1, rate );
- rounds = 360; /* 260 * 2 hours = 30 days */
- break;
- case 'y':
- computes_distrib ( config, 2,300, rate ); /* 600 * 5', with mean on 300 ~= 1 day */
- computes_distrib ( config, 12, 50, rate ); /* 600 *30', with mean on 50 ~= 1 day */
- computes_distrib ( config, 50, 12, rate ); /* 600 * 2h, with mean on 12 */
- computes_distrib ( config, 300, 1, rate );
- rounds = 364;
- break;
- }
-
- for ( i = 0; i < distcount; i ++ ) {
- printf ( "%u:%u,%u.\n", i, dist[i][0],dist[i][1] );
- }
-
- /***************************************************************/
- draw_gif ( gif );
- /***************************************************************/
- fclose ( gif );
- fclose ( config );
-
- break;
- } else {
- draw_distrib_gif ( config, gif );
- fclose ( config );
- fclose ( gif );
- break;
- }
-
- } while ( TRUE );
-
-}
-
diff --git a/src/contrib/distrib/distrib.pl b/src/contrib/distrib/distrib.pl
deleted file mode 100755
index bc4d366..0000000
--- a/src/contrib/distrib/distrib.pl
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/usr/local/bin/perl
-# version 1.1, 27.06.97, philippe.simonet@swisstelecom.com
-
-$outFile = 'distrib.html';
-$mode = 'd';
-$title = 'Mrtg Trafic Distribution';
-$width = 300; $height = 160;
-$count = 8;
-$period = 'day';
-
-$refreshInt=120; $refreshSeconds = $refreshInt * 60;
-$theDate=localtime(time);
-
-###########################################################
-# read config files
-$i = 0;
-open(CFG, "mrtg.cfg") || die "Couldn't read mrtg.cfg";
-while (<CFG>) {
- $_ =~ tr/A-Z/a-z/;
-
- if (/^maxbytes\[(.*)\]: (\d*).*/i) {
- $maxbytes{$1} = $2;
- #print $maxbytes{$1};
- }
-
- if (/^pagetop\[(.*)\]: (.*)/i) {
- $pagetop{$1} = $2;
- #print $pagetop{$1}, "\n";
- }
-}
-close (CFG);
-
-foreach $i ( keys %pagetop ) {
- next if ($maxbytes{$i} eq undef);
- next if ($pagetop{$i} eq undef);
-
- for ($j = 0; $j < $count; $j++ ) {
- $distr{$i}[$j][0] = 0;
- $distr{$i}[$j][1] = 0;
- $tot{$i} = 0;
- }
-
- open ( PIPE, "distrib -i $i.log -o $i.dist.$mode.gif -t $mode -w $width -h $height -r $maxbytes{$i} -d $count |" );
- while ( <PIPE> ) {
- if ( /(\d*):(\d*),(\d*).*/ ) {
- $distr{$i}[$1][0] = $2;
- $distr{$i}[$1][1] = $3;
- }
- }
-
- for ($j = 0; $j < $count; $j++ ) {
- $tot{$i} += ($j+1) * ($distr{$i}[$j][0] + $distr{$i}[$j][1]);
- }
-
- close ( PIPE );
-}
-
-
-###########################################################
-# open files
-open(OUT, ">$outFile") || die "Couldn't create $outFile";
-open(SCORE, ">distrib.txt") || die "Couldn't create distrib.txt";
-
-###########################################################
-# print html head
-$expTime=&expistr;
-
-print OUT <<EOF;
-<HTML>
-<HEAD>
-<TITLE>$title</TITLE>
-</HEAD>
-<META HTTP-EQUIV="Expires" CONTENT="$expTime">
-<META HTTP-EQUIV="Refresh" CONTENT=$refreshSeconds>
-<BODY bgcolor=#ffffff>
-<H1>$title ($theDate)</H1>
-
-These graphs presents the trafic distribution information for last $period, based on data collected each 5 minutes by MRTG. </p>
-They are refreshed each $refreshInt minutes. (green = input traffic, blue = output).
-Darker is the color, bigger is the trafic. Bigger is the rectangle, bigger is the time when the traffic was effective.
-
-<H1>Top 10 interfaces for last $period</H1>
-<img src="distrib.gif">
-
-<H1>All trafic distribution for last $period</H1>
-
-Vertical scale: % of time/</P>
-Horizontal scale: % of Maxbyte</P>
-
-<table border="1" cellpadding="0" height="43">
- <tr>
- <th>maxbytes</th>
- <th>pagetop</th>
- <th>target</th>
- <th>URL</th>
- </tr>
-EOF
-
-foreach $i ( sort by_number (keys %pagetop) ) {
- next if ($maxbytes{$i} eq undef);
- next if ($pagetop{$i} eq undef);
-
- print SCORE "$i:";
- for ($j=0; $j < ($count-1); $j++) {
- print SCORE $distr{$i}[$j][0], "/", $distr{$i}[$j][1], ",";
- }
- print SCORE $distr{$i}[$count-1][0], "/", $distr{$i}[$count-1][1], "\n";
-
-print OUT <<EOF;
-<TR>
- <TD><CENTER>$maxbytes{$i}</CENTER></TD>
- <TD><CENTER>$pagetop{$i} $pc $post</CENTER></TD>
- <TD><CENTER>$i, score $tot{$i}</CENTER></TD>
- <TD><A HREF="$i.html"><img src="$i.dist.$mode.gif"></A></TD>
-</TR>
-EOF
-}
-
-print OUT <<EOF;
-</TABLE>
-</BODY>
-</HTML>
-EOF
-
-close(OUT);
-close(SCORE);
-
-# computes top 10 lines distribution (-r 10)
-`distrib -i distrib.txt -o distrib.gif -t x -w 700 -h 300 -d $count -r 10`;
-
-exit (0);
-
-# expiration time & date ########################################
-sub expistr {
- my ($time) = time+$refreshInt*60+5;
- my ($wday) = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat')[(gmtime($time))[6]];
- my ($month) = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep',
- 'Oct','Nov','Dec')[(gmtime($time))[4]];
- my ($mday,$year,$hour,$min,$sec) = (gmtime($time))[3,5,2,1,0];
- if ($mday<10) {$mday = "0$mday"};
- if ($hour<10) {$hour = "0$hour"};
- if ($min<10) {$min = "0$min";}
- if ($sec<10) {$sec = "0$sec";}
- return "$wday, $mday $month ".($year+1900)." $hour:$min:$sec GMT";
-}
-
-# for sorting ########################################
-sub by_number {
- $tot{$b} <=> $tot{$a};
-}
diff --git a/src/contrib/distrib/readme.txt b/src/contrib/distrib/readme.txt
deleted file mode 100644
index c16db22..0000000
--- a/src/contrib/distrib/readme.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Distrib for MRTG contribution.
-
-Introduction
-------------
-
-- 'distrib' read mrtg log files and computes traffic distribution in
- the time. It ouputs a graph with :
- usage 1 : distrib -i infile -o giffile -w width -h height -t mode -r rate -d count
- (width / height in pixels)
- mode : d(ay), w(eek), m(onth), y(ear)
- count : how many categories of trafic must be taken
-
- - in x the percentage of trafic utilisation (% bandwith)
- - in y how many times the utilization was reached (% time)
-
-
- usage 2 : distrib -i infile -o giffile -w width -h height -t x -r top -d count
- (width / height in pixels)
- this option builds another graph, with more than interface, but the same informations 'stacked'
- one on the other ...
-
-
-- 'distrib.pl' use distrib to make a complete html ('distrib.html, distrib.gif') file
- with all target defined in the file mrtg.cfg (!).
-
- usage : distrib.pl
-
-
-Installation
-------------
-
-- distrib uses the GD library, as mrtg does. In order to compile it, you must
- have the following files :
-
- GDFONTS.H
- GDFONTS.C
- MTABLES.C
- GD.H
- GD.C
-
- and ... distrib.c
-
- on unix, gcc distrib.c -I/yourgdinclude -L/yourgdlibrary -lgd -lm -o distrib
- on a PC with NT or 95, make a project with RDLOG2.C, GD.C, GDFONTS.C
-
-
-
-All suggestions, bugs reports and others are welcome ...
-
-
-Philippe Simonet, Philippe.Simonet@swisstelecom.com, 24.06.97 \ No newline at end of file
diff --git a/src/contrib/gentcucci-1.0.0/README b/src/contrib/gentcucci-1.0.0/README
deleted file mode 100644
index 59f4312..0000000
--- a/src/contrib/gentcucci-1.0.0/README
+++ /dev/null
@@ -1,11 +0,0 @@
-From: Kevin Benton <s1kevin@sotatech.net>
-To: Tobias Oetiker <oetiker@ee.ethz.ch>
-Date: Tue, 17 Oct 2000 09:42:18 -0400 (EDT)
-Subject: MRTG Thanks and a contrib
-
-
-Please find included a nice little package which automatically generates
-configs for 3Com Total Control chassis, but also generates a little
-colored table to the left of the graph on the index to display usage
-history at a glance.
-
diff --git a/src/contrib/gentcucci-1.0.0/gentcucci b/src/contrib/gentcucci-1.0.0/gentcucci
deleted file mode 100755
index 92391d8..0000000
--- a/src/contrib/gentcucci-1.0.0/gentcucci
+++ /dev/null
@@ -1,261 +0,0 @@
-#!/bin/bash
-
-###############################################################################
-# gentcucci - Generate Total Control User Count (and temp) Config and Index
-# (pronounced like Gent Cookie) an MRTG Tool
-#
-# Version 1.0.0
-#
-# Copyright and written by Kevin Benton, 1999.
-#
-# Please be sure that if you choose to use this code that you let Tobi or
-# myself know that it's useful to you. Tobi - thanks for writing MRTG and
-# making it freely available to those of us who weren't quite so creative.
-#
-# NOTE 1 - At the time of this writing, we've been using this script for over
-# a year and it's worked like a champ. Don't let the version number fool
-# you - this stuff is tried and tested.
-#
-# NOTE 2 - Please be sure to pick the target method below. Look for
-# "INTENTIONAL ERROR" in this file, uncomment the appropriate line and delete
-# the two "error" lines as directed.
-#
-# NOTE 3 - This could have been written in Perl to make it a lot faster, but at
-# the time I wrote it, I didn't know enough Perl to do it. I certainly didn't
-# feel like spending the time to write it in C. I may soon rewrite this
-# entire script in Perl not only to make it faster, but to clean things as far
-# as temp files go and what not.
-#
-# NOTE 4 - tcf2mrtg returns the number of users on-line for a particular
-# target. This works on both ARCs and NetServers and gives us the ability to
-# split apart DSP's. It can of course be adapted to whatever your platform
-# needs require. If you only need data for the HARC aggregated together, use
-# the MIB .1.3.6.1.4.1.429.4.2.1.10.0 or whatever is current for the HARC code
-# you're using.
-###############################################################################
-
-###############################################################################
-# store in users index file
-
-stf() {
- echo "$1" >>$TEMP_FILE
-}
-
-###############################################################################
-# store in temperature index file
-
-stfd() {
- echo "$1" >>$TEMP_FILE2
-}
-
-###############################################################################
-# store in temperature config
-
-stod() {
- echo "$1" >>$degree_file
-}
-
-###############################################################################
-# store in users config
-
-stou() {
- echo "$1" >>$output_file
-}
-
-###############################################################################
-
-########################## CONFIGURATION PARAMETERS ###########################
-# output_dir is where MRTG will be storing configs. A directory www should
-# exist under that with the directories tcusercount and tcdegree below that.
-export output_dir=/usr/local/mrtg-2.8.12/local-config
-# output_file is the MRTG user count config file.
-export output_file=$output_dir/mrtg.tcusercount.cfg
-# degree_file is the MRTG chassis temperature config file.
-export degree_file=$output_dir/mrtg.tcdegree.cfg
-# ro_comm is the read only SNMP community to use to grab data with.
-export ro_comm=public
-########################## CONFIGURATION PARAMETERS ###########################
-
-export TEMP_FILE=/tmp/gentcuc.$$
-export TEMP_FILE2=/tmp/gentcuc.$$.2
-rm -f $TEMP_FILE 2>/dev/null >/dev/null
-trap "rm -f $TEMP_FILE $TEMP_FILE2 2>/dev/null >/dev/null ; exit" 1 2 15
-touch $TEMP_FILE
-
-index=${output_dir}/www/tcusercount/index.htm
-bigindex=${output_dir}/www/tcusercount/bigindex.htm
-degreeindex=${output_dir}/www/tcdegree/index.htm
-bigdegreeindex=${output_dir}/www/tcdegree/bigindex.htm
-
-# Create mrtg.tcusercount.cfg header
-cat >$output_file <<SH_EOF1
-##################################################################
-# CAUTION: This file is automatically generated. Do not edit. #
-# Changes should be made in gwcs.list only. #
-##################################################################
-
-Workdir: $output_dir
-Refresh: 300
-Interval: 5
-WriteExpires: Yes
-
-Directory[^]: www/tcusercount/
-PageTop[^]: <H1>
-PageTop[\$]: Total Control Chassis User Count</H1>
-Options[^]: gauge noinfo
-YLegend[^]: Users On
-ShortLegend[^]: Users
-Title[$]: Total Control Chassis User Count
-XZoom[^]: 2.0
-YZoom[^]: 2.0
-
-SH_EOF1
-
-# Create mrtg.tcdegree.cfg header
-cat >$degree_file <<SH_EOF2
-##################################################################
-# CAUTION: This file is automatically generated. Do not edit. #
-# Changes should be made in nmcs.list only. #
-##################################################################
-
-Workdir: $output_dir
-Refresh: 300
-Interval: 5
-WriteExpires: Yes
-Directory[^]: www/tcdegree/
-PageTop[^]: <H1>
-PageTop[\$]: Total Control Chassis Temperature</H1>
-Options[^]: gauge noinfo nopercent
-YLegend[^]: Fahrenheit
-ShortLegend[^]: Temp
-Title[$]: Total Control Chassis Temperature
-XZoom[^]: 2.0
-YZoom[^]: 2.0
-
-SH_EOF2
-
-# Create master index temp file
-stf "<HTML>"
-stf "<HEAD><TITLE>Total Control SED_REPLACE_WITH_NAME</TITLE></HEAD>"
-stf "<BODY BGCOLOR=WHITE>"
-stf "<H1>Total Control SED_REPLACE_WITH_NAME</H1>"
-stf "Updated `date`<P>"
-stf "<A HREF=\"SED_REPLACE_WITH_INDEX.HTM\">Click here for SED_REPLACE_WITH_SIZE size images</A><BR>"
-stf "<TABLE BORDER>"
-
-# Process into mrtg.tcusercount.cfg and master user count index from gwcs.list
-while read line
-do
- if echo "$line" | egrep '^#' >/dev/null 2>/dev/null
- then
- continue
- fi
- if [ -z "$line" ]
- then
- continue
- fi
- target="`echo \"$line\" | cut -d: -f1 | sed -e 's/+/ /g'`"
- tag="`echo \"$line\" | \
- cut -d: -f1 | \
- sed -e 's/+/_/g' | \
- sed -e 's/\_.*\@/_/g' | \
- cut -d@ -f2`"
- title="`echo \"$line\" | cut -d: -f2`"
- maxb="`echo \"$line\" | cut -d: -f3`"
- absm="`echo \"$line\" | cut -d: -f4`"
-INTENTIONAL ERROR: YOU MUST PICK 1 OF THE 2 TARGETS BELOW AND DELETE THIS LINE
-# stou "Target[$tag]: \`/usr/local/mrtg-2.8.12/local-config/tcf2mrtg \"$target\"\`"
-# stou "Target[$tag]: .1.3.6.1.4.1.429.4.2.1.10.0:${ro_comm}@$target"
-INTENTIONAL ERROR: YOU MUST PICK ONE OF THE TARGETS ABOVE AND DELETE THIS LINE
- stou "Title[$tag]: $title"
- stou "PageTop[$tag]: $title"
- if [ ! "$absm" = "0" ]
- then
- stou "AbsMax[$tag]: $absm"
- fi
- stou "MaxBytes[$tag]: $maxb"
- stou "WithPeak[$tag]: ymwd"
- stou ""
- stf " <TR>"
- stf " <TD ROWSPAN=2>"
- stf " <CENTER><A HREF=\"$tag.html\">$title</A><BR>"
- stf " `/home/httpd/cgi-bin/tcnowstat \"$tag\" \"$maxb\"`<BR>"
- stf " Potential Users: $maxb</CENTER>"
- stf " <TD>Today<BR>5 Min</TD>"
- stf " <TD>"
- stf " <IMG SRC=\"$tag-day.png\" SED_REPLACE_WITH_PICSIZE>"
- stf " </TD>"
- stf " </TR>"
- stf " <TR>"
- stf " <TD>This Week<BR>30 Min</TD>"
- stf " <TD>"
- stf " <IMG SRC=\"$tag-week.png\" SED_REPLACE_WITH_PICSIZE>"
- stf " </TD>"
- stf " </TR>"
-done <gwcs.list
-
-stfd "<HTML>"
-stfd "<HEAD><TITLE>Total Control SED_REPLACE_WITH_NAME</TITLE></HEAD>"
-stfd "<BODY BGCOLOR=WHITE>"
-stfd "<H1>Total Control SED_REPLACE_WITH_NAME</H1>"
-stfd "Updated `date`<P>"
-stfd "<A HREF=\"SED_REPLACE_WITH_INDEX.HTM\">Click here for SED_REPLACE_WITH_SIZE size images</A><BR>"
-stfd "<TABLE BORDER>"
-
-# Process into mrtg.tcusercount.cfg and master user count index from gwcs.list
-while read line
-do
- if echo "$line" | egrep '^#' >/dev/null 2>/dev/null
- then
- continue
- fi
- if [ -z "$line" ]
- then
- continue
- fi
- name="`echo \"$line\" | cut -d: -f1 | sed -e 's/+/ /g'`"
- tag="`echo \"$line\" | cut -d: -f1 | sed -e s/+/_/g`"
- title="`echo \"$line\" | cut -d: -f2`"
- stod "##################################################################"
- stod "Target[$tag]: .1.3.6.1.4.1.429.1.2.2.5.0&.1.3.6.1.4.1.429.1.2.2.5.0:public@$name * 1.8 + 32"
- stod "Title[$tag]: $title"
- stod "PageTop[$tag]: $title"
- stod "MaxBytes[$tag]: 200"
- stfd " <TD ROWSPAN=2>"
- stfd " <CENTER><A HREF=\"$tag.html\">$title</A><BR>"
- stfd " `/home/httpd/cgi-bin/tcnowtemp \"$tag\"`</CENTER>"
- stfd " <TD>Today<BR>5 Min</TD>"
- stfd " <TD>"
- stfd " <IMG SRC=\"$tag-day.png\" SED_REPLACE_WITH_PICSIZE>"
- stfd " </TD>"
- stfd " </TR>"
- stfd " <TR>"
- stfd " <TD>This Week<BR>30 Min</TD>"
- stfd " <TD>"
- stfd " <IMG SRC=\"$tag-week.png\" SED_REPLACE_WITH_PICSIZE>"
- stfd " </TD>"
- stfd " </TR>"
-done <nmcs.list
-
-# close the indexes up tight
-stf "</TABLE></BODY></HTML>"
-stfd "</TABLE></BODY></HTML>"
-
-# create normal and big indexes for user count and temperature.
-cat $TEMP_FILE | sed -e 's/SED_REPLACE_WITH_INDEX.HTM/bigindex.htm/g' | \
- sed -e 's/SED_REPLACE_WITH_SIZE/double/g' | \
- sed -e 's/SED_REPLACE_WITH_NAME/User Count Analysis/g' | \
- sed -e 's/SED_REPLACE_WITH_PICSIZE//g' >$index
-cat $TEMP_FILE | sed -e 's/SED_REPLACE_WITH_INDEX.HTM/index.htm/g' | \
- sed -e 's/SED_REPLACE_WITH_SIZE/normal/g' | \
- sed -e 's/SED_REPLACE_WITH_NAME/User Count Analysis/g' | \
- sed -e 's/SED_REPLACE_WITH_PICSIZE/WIDTH=1000 HEIGHT=270/g' >$bigindex
-cat $TEMP_FILE2 | sed -e 's/SED_REPLACE_WITH_INDEX.HTM/bigindex.htm/g' | \
- sed -e 's/SED_REPLACE_WITH_SIZE/double/g' | \
- sed -e 's/SED_REPLACE_WITH_NAME/Chassis Temperature/g' | \
- sed -e 's/SED_REPLACE_WITH_PICSIZE//g' >$degreeindex
-cat $TEMP_FILE2 | sed -e 's/SED_REPLACE_WITH_INDEX.HTM/index.htm/g' | \
- sed -e 's/SED_REPLACE_WITH_SIZE/normal/g' | \
- sed -e 's/SED_REPLACE_WITH_NAME/Chassis Temperature/g' | \
- sed -e 's/SED_REPLACE_WITH_PICSIZE/WIDTH=1000 HEIGHT=270/g' >$bigdegreeindex
-rm $TEMP_FILE $TEMP_FILE2
diff --git a/src/contrib/gentcucci-1.0.0/gwcs.list b/src/contrib/gentcucci-1.0.0/gwcs.list
deleted file mode 100644
index 562ba1c..0000000
--- a/src/contrib/gentcucci-1.0.0/gwcs.list
+++ /dev/null
@@ -1,32 +0,0 @@
-# tc users logged on
-#
-# format
-#
-# ip_name(+ip_name(+ip_name...)):max acceptable users:absolute graphable max
-#
-# example
-#
-# tc1.i40:Coshocton 1:48:336
-# tc1.i40 Access Server
-# Coshocton 1 Title for device
-# 48 Maximum (red line) users possible per T1 count
-# 336 Absolute maxmimum possible number of users
-#
-# tc3.i40+tc5.i40:Coshocton Total (w/o Omni):368:672
-# tc3.i40+tc5.i40 Access Servers
-# Coshocton Total (w/o Omni) Title for device
-# 48 Maximum (red line) users possible per T1 count
-# 336 Absolute maxmimum possible number of users
-#
-# Note: Absolute maximum is the highest potential number of users who can be
-# on-line on a particular chassis (HARC) at one time, which is not the
-# same as the number of channels plugged in to the chassis. Absolute
-# maximum is used in the event that someone forgets to reconfigure this
-# file before adding additional capacity. At present, one HARC can
-# handle up to approximately 336 users. If a chassis has 3 PRI's
-# plugged into it, then 69:336 would be appropriate because each PRI
-# will provide 23 channels for users, but the HARC can still handle a
-# lot more than that.
-#
-tc1.i40:Coshocton TC (tc1.i40):69:336
-tc1.nwk:Newark TC (tc1.nwk):69:336
diff --git a/src/contrib/gentcucci-1.0.0/mrtg_autorun b/src/contrib/gentcucci-1.0.0/mrtg_autorun
deleted file mode 100755
index c7679f1..0000000
--- a/src/contrib/gentcucci-1.0.0/mrtg_autorun
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-# Should be run every n minutes (generally either 5 or 10) in cron as in the
-# crontab example below...
-#
-# */5 * * * * /home/autorun/bin/mrtg_autorun
-#
-# Edit the paths for your system's needs.
-#
-cd /usr/local/mrtg/local-config
-
-gentcucci
-../run/mrtg mrtg.tcusercount.cfg
-../run/mrtg mrtg.tcdegree.cfg
diff --git a/src/contrib/gentcucci-1.0.0/nmcs.list b/src/contrib/gentcucci-1.0.0/nmcs.list
deleted file mode 100644
index 4e6045f..0000000
--- a/src/contrib/gentcucci-1.0.0/nmcs.list
+++ /dev/null
@@ -1,14 +0,0 @@
-# NMC's for Temperature monitoring.
-#
-# format
-#
-# ip_name:description
-#
-# example
-#
-# tc1b.i40:Coshocton 1 (tc1b.i40)
-# tc1.i40 Ping host
-# Coshocton 1 (tc1b.i40) Title for device
-#
-tc1b.i40:Coshocton TC (tc1.i40)
-tc1b.nwk:Newark TC (tc1.nwk)
diff --git a/src/contrib/gentcucci-1.0.0/tcnowstat b/src/contrib/gentcucci-1.0.0/tcnowstat
deleted file mode 100755
index 2d8111f..0000000
--- a/src/contrib/gentcucci-1.0.0/tcnowstat
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-grep_it() {
- value="`cat $TEMP_FILE | head -$1 | tail -1`"
- perc="`expr \"$value\" \* 100 / \"${MAXB:=1}\"`"
- color=""
- if [ ${perc:=0} -ge 90 ]
- then
- color=" bgcolor=red"
- elif [ ${perc:=0} -ge 80 ]
- then
- color=" bgcolor=yellow"
- elif [ ${perc:=0} -le 25 ]
- then
- color=" bgcolor=cyan"
- else
- color=" bgcolor=lightgreen"
- fi
- echo " <td>$value</td><td$color>${perc}%</td>"
-}
-
-###############################################################################
-
-export DIR=/usr/local/mrtg-2.8.12/local-config/www/tcusercount
-export MACH="`echo \"$1\" | sed -e 's/+/_/g'`"
-export MAXB="$2"
-export TEMP_FILE=/tmp/tcnowstat.$$
-
-###############################################################################
-
-if [ ! -r "$DIR/${MACH}.html" ]
-then
- exit
-fi
-
-cat "$DIR/${MACH}.html" | \
- grep '<\!-- ' | \
- grep "in " | \
- cut -d' ' -f4 >$TEMP_FILE
-trap "rm -f $TEMP_FILE ; exit" 1 2 15
-
-echo ""
-echo " <table border>"
-echo " <tr>"
-echo " <td></td>"
-echo " <td colspan=2 align=center>Max</td>"
-echo " <td colspan=2 align=center>Avg</td>"
-echo " <td colspan=2 align=center>Now</td>"
-echo " </tr>"
-echo " <tr>"
-echo " <td>Day</td>"
-grep_it 1
-grep_it 2
-grep_it 3
-echo " </tr>"
-echo " <tr>"
-echo " <td>Week</td>"
-grep_it 4
-grep_it 5
-grep_it 6
-echo " </tr>"
-echo " <tr>"
-echo " <td>Month</td>"
-grep_it 7
-grep_it 8
-grep_it 9
-echo " </tr>"
-echo " <tr>"
-echo " <td>Year</td>"
-grep_it 10
-grep_it 11
-grep_it 12
-echo " </tr>"
-echo " </table>"
-echo ""
-
-trap - 1 2 15
-rm -f $TEMP_FILE 2>/dev/null
diff --git a/src/contrib/gentcucci-1.0.0/tcnowtemp b/src/contrib/gentcucci-1.0.0/tcnowtemp
deleted file mode 100755
index 21fc208..0000000
--- a/src/contrib/gentcucci-1.0.0/tcnowtemp
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-
-grep_it() {
- value="`cat $TEMP_FILE | head -$1 | tail -1`"
- color=""
- if [ ${value:=0} -ge 100 ]
- then
- color=" bgcolor=red"
- elif [ ${value:=0} -ge 85 ]
- then
- color=" bgcolor=yellow"
- elif [ ${value:=0} -le 50 ]
- then
- color=" bgcolor=cyan"
- else
- color=" bgcolor=lightgreen"
- fi
- echo " <td$color>$value</td>"
-}
-
-###############################################################################
-
-export DIR=/world/mrtg/tcdegree
-export MACH="`echo \"$1\" | sed -e 's/+/_/g'`"
-export MAXB="$2"
-export TEMP_FILE=/tmp/tcnowtemp.$$
-
-###############################################################################
-
-if [ ! -r "$DIR/${MACH}.html" ]
-then
- exit
-fi
-
-cat "$DIR/${MACH}.html" | \
- grep '<\!-- ' | \
- grep "out " | \
- cut -d' ' -f4 >$TEMP_FILE
-trap "rm -f $TEMP_FILE ; exit" 1 2 15
-
-echo ""
-echo " <table border>"
-echo " <tr>"
-echo " <td></td>"
-echo " <td align=center>Max</td>"
-echo " <td align=center>Avg</td>"
-echo " <td align=center>Now</td>"
-echo " </tr>"
-echo " <tr>"
-echo " <td>Day</td>"
-grep_it 1
-grep_it 2
-grep_it 3
-echo " </tr>"
-echo " <tr>"
-echo " <td>Week</td>"
-grep_it 4
-grep_it 5
-grep_it 6
-echo " </tr>"
-echo " <tr>"
-echo " <td>Month</td>"
-grep_it 7
-grep_it 8
-grep_it 9
-echo " </tr>"
-echo " <tr>"
-echo " <td>Year</td>"
-grep_it 10
-grep_it 11
-grep_it 12
-echo " </tr>"
-echo " </table>"
-echo ""
-
-trap - 1 2 15
-rm -f $TEMP_FILE 2>/dev/null
diff --git a/src/contrib/get-active/README b/src/contrib/get-active/README
deleted file mode 100644
index 2257859..0000000
--- a/src/contrib/get-active/README
+++ /dev/null
@@ -1,21 +0,0 @@
-From leewm@hpsgmx18.sgp.hp.com Mon Nov 3 09:19:59 1997
-Date: Sat, 01 Nov 1997 23:03:45 SGP
-From: Wee-Meng LEE <leewm@hpsgmx18.sgp.hp.com>
-To: oetiker@ee.ethz.ch
-Subject: get-active.pl
-
-Hi Tobi,
-
-A collegue and I did some improvements in the get-active.pl
-script written by Russ Wright in the contrib directory.
-
-get-active2.pl does a summary page of all the router interfaces
-being monitored and it proved to be very useful.
-
-I'm not able to contact Russ but feel free to pass the code
-around.
-
-Rgds,
-weemeng
-
-
diff --git a/src/contrib/get-active/get-active.pl b/src/contrib/get-active/get-active.pl
deleted file mode 100644
index 1215d24..0000000
--- a/src/contrib/get-active/get-active.pl
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/usr/local/bin/perl
-#
-# Author: Russ Wright, Lawrence Berkeley National Laboratory December 1997
-#
-# This will look at the $trafficDir directory for MRTG generated HTML
-# files, parse them and generate a listing of the most active interfaces
-# in a file called "active.htlm" in the same directory
-#
-# modify this if you wish as long as the above credit is not removed
-#
-# The only weird thing I do is to skip tunnel interfaces (see code below)
-
-#
-# TWO VARIABLES YOU MUST CHANGE
-#
-##$trafficDir="/usr/ns-home/htdocs/traffic";
-#
-# I put it in a file and include it because I use it in other scripts
-# if you don't - comment this out and uncomment the above line
-require "trafficdir.include";
-
-# CHANGE THIS to your organization name
-$orgName="LBNL";
-
-$outFile = "$trafficDir/active.html";
-
-# The following may be changed and I admit that it isn't perfect how I decide
-# to highlight stuff.
-#
-# if over this value, will bold entry
-$highlightThresh = 15;
-# if max is over this value, will bold entry
-$highlightMaxThresh = 40;
-# Refresh interval (minutes) for HTML doc
-$refreshInt=10;
-#
-$refreshSeconds=60*$refreshInt;
-#
-# Max % to look at (if the Max is lower then we do not include in the list)
-$maxThresh = 5;
-$theDate=`date +"%m/%d/%y %H:%M"`;
-
-open(LS, "ls $trafficDir/*.[0-9]*.html|") || die "Couldn't list directory";
-while (<LS>) {
- chop;
- $theFile = $_;
- open(IN, "$theFile") || die "Couldn't open $theFile\n";
- $i=0;
- while (<IN>) {
- if (/Traffic Analysis for .*[0-9]<BR>(.*)<\/H1> <TABLE>/) {
- if ($1 =~ /tunnel/i) {
-# skip tunnels
- last;
- }
- $desc{$theFile} = $1;
- }
- if (/\(([0-9.]*\%)\)/) {
- $theList{$theFile}[$i++] = $1;
- }
- }
- close(IN);
-}
-close(LS);
-
-#
-#
-# the array contains all the percentages: the following 6 for
-# daily, weekly, monthly, yearly
-#
-# 0 Max In
-# 1 Avg In
-# 2 Cur In
-# 3 Max Out
-# 4 Avg Out
-# 5 Cur Out
-#
-#
-
-open(OUT, ">$outFile") || die "Couldn't create $outFile";
-&PrintHead;
-
-foreach $key (keys %theList) {
-# get sum of both max in and out
- $sumInOut = $theList{$key}[0] + $theList{$key}[4];
- if ( ($sumInOut > $maxThresh) ||
- ($curIn > $highlightThresh) ||
- ($curOut > $highlightThresh) ||
- ($avgIn > $highlightThresh) ||
- ($avgOut > $highlightThresh) ) {
- $printList{$key} = $sumInOut;
- }
-}
-
-
-foreach $key (sort by_percent (keys %printList)) {
- $theRouter = $key;
- $theRouter =~ s/.*\///;
- $theRouter =~ s/\.html//;
- $theFile = $key;
- $theFile =~ s/.*traffic\///;
- $maxIn= $theList{$key}[0];
- $avgIn= $theList{$key}[1];
- $curIn= $theList{$key}[2];
- $maxOut= $theList{$key}[3];
- $avgOut= $theList{$key}[4];
- $curOut= $theList{$key}[5];
- if ($maxIn > $highlightMaxThresh) {
- $maxIn= "<FONT COLOR=\"#FF0000\">$maxIn</FONT>";
- }
- if ($maxOut > $highlightMaxThresh) {
- $maxOut= "<FONT COLOR=\"#FF0000\">$maxOut</FONT>";
- }
- if ($curOut > $highlightThresh) {
- $curOut= "<FONT COLOR=\"#FF0000\">$curOut</FONT>";
- }
- if ($curIn > $highlightThresh) {
- $curIn= "<FONT COLOR=\"#FF0000\">$curIn</FONT>";
- }
- if ($avgIn > $highlightThresh) {
- $avgIn= "<FONT COLOR=\"#FF0000\">$avgIn</FONT>";
- }
- if ($avgOut > $highlightThresh) {
- $avgOut= "<FONT COLOR=\"#FF0000\">$avgOut</FONT>";
- }
-
- printf(OUT "<TR><TD><CENTER>$maxIn</CENTER></TD><TD><CENTER><P>$maxOut<
-/CENTER></TD><TD><CENTER>$avgIn</CENTER></TD><TD><CENTER>$avgOut</CENTER></TD><
-TD><CENTER>$curIn</CENTER></TD><TD><CENTER>$curOut</CENTER></TD><TD><A HREF=$th
-eFile>$theRouter - $desc{$key}</A></TD></TR>\n");
-}
-
-&PrintTail;
-close(OUT);
-
-sub by_percent {
- $printList{$b} <=> $printList{$a};
-}
-
-sub PrintTail
-{
-print OUT <<EOF;
-</TABLE>
-</BODY>
-</HTML>
-EOF
-}
-
-sub PrintHead
-{
-$expTime=&expistr;
-
-print OUT <<EOF;
-<HTML>
-<HEAD>
-<TITLE>$orgName Most Active Subnets</TITLE>
-</HEAD>
-<META HTTP-EQUIV="Expires" CONTENT="$expTime">
-<META HTTP-EQUIV="Refresh" CONTENT=$refreshSeconds>
-<BODY bgcolor=#ffffff>
-<H1>LBNL Most Active Subnets as of $theDate</H1>
-<P> The following are sorted by the sum of the daily maximum input and daily ma
-ximum output interface octets. This table is updated every $refreshInt minutes
-and will automatically be updated if you are using Netscape.<P>
-<B>Note</B>: Tunnels are not included in this list<P>
-Values are in
-<FONT COLOR="#FF0000">RED</FONT>
-if the current or average is above $highlightThresh or if
-the maximum value is over $highlightMaxThresh
-<P>
-<TABLE WIDTH="750" BORDER="1" CELLSPACING="2" CELLPADDING="0" HEIGHT="43">
-<TR>
-<TH >In Max %</TH>
-<TH >Out Max %</TH>
-<TH >In Avg %</TH>
-<TH >Out Avg %</TH>
-<TH >In Current %</TH>
-<TH >Out Current %</TH>
-<TH >Interface</TH></TR>
-EOF
-}
-
-sub expistr {
- my ($time) = time+$refreshInt*60+5;
- my ($wday) = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat')[(gmtime($time))[6]];
- my ($month) = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep',
- 'Oct','Nov','Dec')[(gmtime($time))[4]];
- my ($mday,$year,$hour,$min,$sec) = (gmtime($time))[3,5,2,1,0];
- if ($mday<10) {$mday = "0$mday"};
- if ($hour<10) {$hour = "0$hour"};
- if ($min<10) {$min = "0$min";}
- if ($sec<10) {$sec = "0$sec";}
- return "$wday, $mday $month ".($year+1900)." $hour:$min:$sec GMT";
-}
-
diff --git a/src/contrib/get-active/get-active2.pl b/src/contrib/get-active/get-active2.pl
deleted file mode 100644
index 7eaa402..0000000
--- a/src/contrib/get-active/get-active2.pl
+++ /dev/null
@@ -1,247 +0,0 @@
-#!/usr/bin/perl
-#
-# Author: Russ Wright, Lawrence Berkeley National Laboratory December 1997
-# Local modifications by Wee-Meng Lee HP Singapore (colour/lynx)
-# and Mark Mushkin HP Santa Clara (avg/max/min that suit our needs)
-# Last Update on Oct 14, 1997
-#
-# This will look at the $trafficDir directory for MRTG generated HTML
-# files, parse them and generate a listing of the most active interfaces
-# in a file called "active.htlm" in the same directory
-#
-# modify this if you wish as long as the above credit is not removed
-#
-# The only weird thing I do is to skip tunnel interfaces (see code below)
-
-#
-# TWO VARIABLES YOU MUST CHANGE
-#
-$trafficDir="/usr/local/httpd/htdocs";
-#
-# I put it in a file and include it because I use it in other scripts
-# if you don't - comment this out and uncomment the above line
-#require "trafficdir.include";
-
-# CHANGE THIS to your organization name
-$orgName="HP Singapore - IT Site Infrastructure";
-
-$outFile = "$trafficDir/active.html";
-
-# The following may be changed and I admit that it isn't perfect how I decide
-# to highlight stuff.
-#
-
-#values over this will be displayed in the specified color
-# these are for the MAX values
-$maxAMBER = 70;
-$maxRED = 90;
-# these are for the Average and Current values
-$AMBER = 30;
-$RED = 60;
-
-#Defining the colors
-$REDcolor="#ff0000";
-$AMBERcolor="#ffff00";
-$GREENcolor="#00ff00";
-
-# Refresh interval (minutes) for HTML doc
-$refreshInt=10;
-#
-$refreshSeconds=60*$refreshInt;
-#
-# Max % to look at (if the Max is lower then we do not include in the list)
-#$maxThresh = 5;
-$maxThresh = 0;
-$theDate=`date +"%m/%d/%y %H:%M"`;
-
-open(LS, "ls $trafficDir/*.[0-9]*.html|") || die "Couldn't list directory";
-while (<LS>) {
- chop;
- $theFile = $_;
- open(IN, "$theFile") || die "Couldn't open $theFile\n";
- $i=0;
- while (<IN>) {
- if (/Traffic Analysis for .*[0-9]<BR>(.*)<\/H1> <TABLE>/) {
- if ($1 =~ /tunnel/i) {
-# skip tunnels
- last;
- }
- $desc{$theFile} = $1;
- }
- if (/\(([0-9.]*\%)\)/) {
- $theList{$theFile}[$i++] = $1;
- }
- }
- close(IN);
-}
-close(LS);
-
-#
-#
-# the array contains all the percentages: the following 6 for
-# daily, weekly, monthly, yearly
-#
-# 0 Max In
-# 1 Avg In
-# 2 Cur In
-# 3 Max Out
-# 4 Avg Out
-# 5 Cur Out
-#
-#
-
-open(OUT, ">$outFile") || die "Couldn't create $outFile";
-&PrintHead;
-
-foreach $key (keys %theList) {
-# get sum of both max in and out
-# $sumInOut = $theList{$key}[0] + $theList{$key}[4]; # use for max
- $sumInOut = $theList{$key}[1] + $theList{$key}[4]; # use for avg
- if ( ($sumInOut > $maxThresh) ||
- ($curIn > $highlightThresh) ||
- ($curOut > $highlightThresh) ||
- ($avgIn > $highlightThresh) ||
- ($avgOut > $highlightThresh) ) {
- $printList{$key} = $sumInOut;
- }
-}
-
-
-foreach $key (sort by_percent (keys %printList)) {
- $theRouter = $key;
- $theRouter =~ s/.*\///;
- $theRouter =~ s/\.html//;
- $theFile = $key;
- $theFile =~ s/.*traffic\///;
- $maxIn= $theList{$key}[0];
- $avgIn= $theList{$key}[1];
- $curIn= $theList{$key}[2];
- $maxOut= $theList{$key}[3];
- $avgOut= $theList{$key}[4];
- $curOut= $theList{$key}[5];
-
- printf(OUT "<TR>");
-
- if ($maxIn > $maxRED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$maxIn</CENTER></TD>");
- } elsif ($maxIn > $maxAMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$maxIn</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$maxIn</CENTER></TD>");
- }
- printf(OUT " ");
-
- if ($maxOut > $maxRED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$maxOut</CENTER></TD>");
- } elsif ($maxOut > $maxAMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$maxOut</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$maxOut</CENTER></TD>");
- }
- printf(OUT " ");
-
- if ($avgIn > $RED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$avgIn</CENTER></TD>");
- } elsif ($avgIn > $AMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$avgIn</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$avgIn</CENTER></TD>");
- }
- printf(OUT " ");
-
- if ($avgOut > $RED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$avgOut</CENTER></TD>");
- } elsif ($avgOut > $AMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$avgOut</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$avgOut</CENTER></TD>");
- }
- printf(OUT " ");
-
- if ($curIn > $RED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$curIn</CENTER></TD>");
- } elsif ($curIn > $AMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$curIn</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$curIn</CENTER></TD>");
- }
- printf(OUT " ");
-
- if ($curOut > $RED) {
- printf(OUT "<TD BGCOLOR=$REDcolor><CENTER>$curOut</CENTER></TD>");
- } elsif ($curOut > $AMBER) {
- printf(OUT "<TD BGCOLOR=$AMBERcolor><CENTER>$curOut</CENTER></TD>");
- } else {
- printf(OUT "<TD BGCOLOR=$GREENcolor><CENTER>$curOut</CENTER></TD>");
- }
- printf(OUT " ");
-
- printf(OUT "<TD><A HREF=${theRouter}\.html>$theRouter</A></TD></TR><p>\n");
-
-}
-
-&PrintTail;
-close(OUT);
-
-sub by_percent {
- $printList{$b} <=> $printList{$a};
-}
-
-sub PrintTail
-{
-print OUT <<EOF;
-</TABLE>
-</BODY>
-</HTML>
-EOF
-}
-
-sub PrintHead
-{
-$expTime=&expistr;
-
-print OUT <<EOF;
-<HTML>
-<HEAD>
-<TITLE>$orgName Most Active Interface</TITLE>
-</HEAD>
-<META HTTP-EQUIV="Expires" CONTENT="$expTime">
-<META HTTP-EQUIV="Refresh" CONTENT=$refreshSeconds>
-<BODY bgcolor=#ffffff>
-<H1>Most Active Interfaces as of $theDate</H1>
-<P> The following are sorted by the sum of the daily average input
-and daily average output (In Avg% + Out Avg%) interface octets.
-This table is updated every $refreshInt minutes and will automatically
-be updated if you are using Netscape.<P>
-
-<B>Value ranges: </B><P>
-MAX Values are: <FONT COLOR="#ff0000">RED if \> $maxRED </font>, and
-<B>YELLOW if \> $maxAMBER </font></B><P>
-<P>
-Average & Current Values are: <FONT COLOR="#ff0000">RED if \> $RED </font>, and <B>YELLOW if \> $AMBER </font></B><P>
-<P>
-<TABLE WIDTH="750" BORDER="1" CELLSPACING="2" CELLPADDING="0" HEIGHT="43">
-<TR>
-<TH >In Max %</TH>
-<TH >Out Max %</TH>
-<TH >In Avg %</TH>
-<TH >Out Avg %</TH>
-<TH >In Current %</TH>
-<TH >Out Current %</TH>
-<TH >Interface</TH></TR>
-<P>
-EOF
-}
-
-sub expistr {
- my ($time) = time+$refreshInt*60+5;
- my ($wday) = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat')[(gmtime($time))[6]];
- my ($month) = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep',
- 'Oct','Nov','Dec')[(gmtime($time))[4]];
- my ($mday,$year,$hour,$min,$sec) = (gmtime($time))[3,5,2,1,0];
- if ($mday<10) {$mday = "0$mday"};
- if ($hour<10) {$hour = "0$hour"};
- if ($min<10) {$min = "0$min";}
- if ($sec<10) {$sec = "0$sec";}
- return "$wday, $mday $month ".($year+1900)." $hour:$min:$sec GMT";
-}
diff --git a/src/contrib/get-equi/README b/src/contrib/get-equi/README
deleted file mode 100644
index daeca3f..0000000
--- a/src/contrib/get-equi/README
+++ /dev/null
@@ -1,9 +0,0 @@
-From: Mike Gaertner <miky@forum.org.kh>
-Date: Tue, 25 Apr 2000 19:06:52 +0700 (ICT)
-
-The Equinox SST card does not provide SNMP support. Therefor I wrote a
-small perl script which reads out the byte counter from the Equinox SST
-board.
-
-Regards Mike Gaertner
-
diff --git a/src/contrib/get-equi/get-equi.pl b/src/contrib/get-equi/get-equi.pl
deleted file mode 100644
index 1d726ee..0000000
--- a/src/contrib/get-equi/get-equi.pl
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/perl
-#
-# byte counter for a Equinox SST card with analog modem pool
-# for use with mrtg2
-#
-# by Mike Gaertner <mg@forum.org.kh>
-# 20 Apr 2000
-#
-# Returns the total sum of the input and output character counter
-# from an SST card for all ports you specify
-#
-# NEEDS the Linux driver version 3-35c for SST based boards
-#
-# --- sample.cfg file ---
-# #MaxBytes = (8 x 56kbit/s modems) / 8 = 56000 bytes/s total capacity
-# # adjust this to the number of modems you have
-#
-# Target[modems]: `/usr/local/mlog3/bin/mrtg/get-equi.pl`
-# MaxBytes[modems]: 56000
-# Title[modems]: OFIX modem pool traffic (8 Modems)
-# Options[modems]: growright
-# XSize[modems]: 500
-# YSize[modems]: 200
-# WithPeak[modems]: my
-# PageTop[modems]: <H1>Traffic Analysis modem pool (8 Modems)</H1>
-# -------
-#
-# Edit the @m array
-# @m = Modems you want to monitor without ttyQ
-#
-# check the $sstty path
-#
-
-use strict;
-
-my(@m,$sstty,$port,$i,$o,$new_i,$new_o,$source);
-
-# modems
-@m = ("1a5","1a6","1a7","1a8","1a9","1a10","1a11","1a12") ;
-
-$sstty = "/usr/bin/sstty -s ";
-$source = "equinox modempool";
-
-$new_i = 0;
-$new_o = 0;
-
-foreach $port ( @m ) {
-
- open ( STAT, "$sstty $port |" ) ;
- while( <STAT> ) {
- if ( /input/ ) {
- ($i,$o) = (split(/ +/))[8,11] ;
- $new_i += hex($i);
- $new_o += hex($o);
- }
- }
- close(STAT);
-}
-
-print $new_i,"\n",$new_o,"\n",&uptime(),"\n$source\n" ;
-
-#find out when the board driver was last loaded
-sub uptime {
-
- my($start,$now,$diff,$s,$m,$h,$d,$hms);
- $start = (stat("/etc/eqnx/logfile"))[10] ;
- $now = time() ;
- $diff = $now - $start ;
-
- $s = $diff % 60;
- $diff = ($diff - $s) / 60;
- $m = $diff % 60;
- $diff = ($diff - $m) / 60;
- $h = $diff % 24;
- $diff = ($diff - $h) / 24;
- $d = $diff ;
-
- $hms.= ($h < 10 ? " " : "") . $h;
- $hms.= ($m < 10 ? ":0" : ":") . $m;
- $hms.= ($s < 10 ? ":0" : ":") . $s;
- return "$d days, $hms";
-}
-
diff --git a/src/contrib/get-multiserial/get-modems-remote.pl b/src/contrib/get-multiserial/get-modems-remote.pl
deleted file mode 100644
index 5954300..0000000
--- a/src/contrib/get-multiserial/get-modems-remote.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/perl
-#
-# get-modems-remote.pl
-#
-# Connects to a TCP port get's there the number of occupied modems
-# and prints'em out
-#
-# The other side consists of a silly programm (a la get-modems.pl ;)
-# that just prints the number of active lines.
-#
-# ex:
-# /etc/services :
-# getmodems 9999/tcp
-# /etc/inetd.conf:
-# getmodems stream tcp nowait nobody /usr/bin/get-modems.pl get-modems.pl
-#
-# Thanks to Larry Wall for the nice example in the Lama Perl-tutorial
-#
-# (c) T.Pospisek <tpo@spin.ch> Distributed under GNU copyleft
-#
-# History:
-# ??-??-97 initial release for mrtg
-# 13-05-99 cleaned up a little bit - thanks to Dancho Kanev
-# <dancho@globcom.net> for "buging" me ;-)
-
-# ---- please adapt the following two lines to your local configuration ---
-
-# The name of the remote server
-$remote_server='jesus';
-
-# The name of the service
-$service='getmodems';
-
-#-- end of user configurable stuff ---
-
-use Socket;
-
-$sockaddr = 'S n a4 x8';
-chop($hostname = `hostname`);
-($name, $aliases, $proto) = getprotobyname('tcp');
-($name, $aliases, $port) = getservbyname($service,'tcp');
-($name, $aliases, $type, $len, $thisaddr) = gethostbyname($hostname);
-($name, $aliases, $type, $len, $thataddr) = gethostbyname($remote_server);
-$thisport = pack($sockaddr, &AF_INET, 0, $thisaddr);
-$thatport = pack($sockaddr, &AF_INET, $port, $thataddr);
-
-socket(S, &PF_INET, &SOCK_STREAM, $proto) ||
- die "dial-in-check : cannot create socket\n";
-bind(S, $thisport) ||
- die "dial-in-check : cannot bind socket\n";
-connect(S, $thatport) ||
- die "dial-in-check : cannot bind socket\n";
-while (<S>) {
- print;
-}
-# print "0\n";
-# print "0\n";
-# print "$remote_server\n";
diff --git a/src/contrib/get-multiserial/get-modems.pl b/src/contrib/get-multiserial/get-modems.pl
deleted file mode 100644
index 9245c4e..0000000
--- a/src/contrib/get-multiserial/get-modems.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/local/bin/perl
-#
-# Returns number of active analog and digital dial-ins
-#
-# This script could be very much improved - it's a quick hack
-# and it works ...
-#
-# I'm doing a "w" sorting out all the important tty's (ttyC for cyclades
-# boards) and checking if the correspond to the digita lines
-#
-# T.Pospisek <tpo@spin.ch> :
-#
-# Distributed under the GNU copyleft
-#
-
-# Number of active tty's
-$isdn = 0;
-$modem = 0;
-
-# Name of this host
-$my_name = "Dial-In";
-
-# Our digital lines
-$tty{"ttyC12"}="i";
-$tty{"ttyC13"}="i";
-$tty{"ttyC14"}="i";
-$tty{"ttyC15"}="i";
-$tty{"ttyC16"}="i";
-$tty{"ttyC24"}="i";
-$tty{"ttyC25"}="i";
-
-open(TTYS, "w -hs|cut -b 10-17|fgrep ttyC|");
-while(<TTYS>) {
- chop;
- s/\s+//;
- if( $tty{"$_"} ) {
- $isdn++;
- } else {
- $modem++;
- }
-}
-print "$modem\n";
-print "$isdn\n";
-print "0\n";
-print "$my_name\n";
diff --git a/src/contrib/ipchainacc/README b/src/contrib/ipchainacc/README
deleted file mode 100644
index 4cd31fd..0000000
--- a/src/contrib/ipchainacc/README
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Ilya Konstantinov <future@galanet.net>
-Date: 06 Sep 2000 18:53:33 -0200
-
-I have tweaked the ipchainacc perl script provided in MRTG's contrib for our
-own use at our LUG, and I thought the rest of the users might find my
-changes helpful.
-
-Changes:
-1. Made it account BYTES instead of PACKETS, like it used to do before.
-2. It now accepts (optional) two command-line arguments to make it
-return results for the 2nd etc. rules in the chain, so for example,
-I can insert rules into the 'acctin' and 'acctout' chains which'll match
-traffic with destination and source (respectively) port set to 80, so I
-could
-see how much traffic passes through HTTP only.
-
-so:
-ipchainacc 1 1
-should return counters of 2nd acctin and 2nd acctout rules.
-
diff --git a/src/contrib/ipchainacc/ipchainacc b/src/contrib/ipchainacc/ipchainacc
deleted file mode 100644
index 877b4d9..0000000
--- a/src/contrib/ipchainacc/ipchainacc
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl
-
-# ipchainacc version 1.0.2
-# Author: John Lange, john@darkcore.net
- Ilya Konstantinov, mrtg-ipchains@future.galanet.net
-# Date: Sep 06, 2000
-#
-# This script was written to provide output for MRTG
-# (multi router traffic grapher) via ipchains.
-#
-# http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
-#
-## USAGE EXAMPLE (line from mrtg.conf)
-#
-# Target[traffic]: /usr/local/mrtg-2/bin/ipchainacc 0 0
-#
-# The arguments 0 0 mean it should report the bytes count
-# for the 1st (1st is 0, 2st is 1 and so on) rule in
-# the 'acctin' chain (supposed to be the incoming traffic)
-# and the 1st rule in the 'acctout' chain.
-#
-## Changelog
-# v1.0.2 Made it actually account bytes instead of packages.
-# Now ipchainacc requires 2 command-line arguments.
-# This allows having more than one rule in the accounting
-# chains, so you could have traffic cuts by protocol
-# or IP blocks which match your rules.
-# v1.0.1 added -x to ipchains to expand byte counters
-# v1.0.0 Inital Release
-#
-#
-# This command must return 4 lines of output:
-# Line 1 : current state of the 'incoming bytes counter'
-# Line 2 : current state of the 'outgoing bytes counter'
-# Line 3 : string, telling the uptime of the target.
-# Line 4 : string, telling the name of the target.
-
-# This script relies on you having setup your ipchains rules beforehand
-
-## edit for your system
-
-$ipchains='/sbin/ipchains'; # path to ipchains
-$host=`/bin/hostname --fqdn`; # local hostname (for information only)
-
-# if you use the ipchains rules above, you don't have to change these
-$inrule='acctin'; # name of input accounting rule
-$outrule='acctout'; # name of output accounting rule
-
-
-## -- don't edit below here ----
-
-# get command line params
-my ($in_rule,$out_rule) = @ARGV;
-
-# fetch the status from ipchains
-@rules=`$ipchains -L $inrule -v -n -x`;
-splice @rules, 0, 2;
-@in_bytes=split(' ',$rules[$in_rule]);
-
-@rules=`$ipchains -L $outrule -v -n -x`;
-splice @rules, 0, 2;
-@out_bytes = split(' ',$rules[$out_rule]);
-print "$out_line"; # just for debugging
-
-#$c=1;
-#foreach $value (@in_bytes) {
-# printf "$c: $value\n";
-# $c++;
-#};
-
-# uptime of the machine
-my $upTimeLine = `uptime`;
-my $upTime;
-if ($upTimeLine =~ /\s+?.*?\s+?up (\d+ days,\s+.*?),/)
-{
- $upTime = $1;
-}
-
-# 4 lines of output only.
-if (!$in_bytes[1]) { $in_bytes[1] = 0; }
-if (!$out_bytes[1]) { $out_bytes[1] = 0; }
-
-print "$in_bytes[1]\n",
- "$out_bytes[1]\n",
- "$upTime\n$host";
-
-
-#print ($in_bytes[1] ne ''?$in_bytes[1]:'0'),"\n",
-# ($out_bytes[1] ne ''?$out_bytes[1]:'0'),"\n",
-# "$upTime\n$host";
diff --git a/src/contrib/ipchains/README b/src/contrib/ipchains/README
deleted file mode 100644
index 170489a..0000000
--- a/src/contrib/ipchains/README
+++ /dev/null
@@ -1,61 +0,0 @@
-ipchainacc 1.1.0
-
-Author: John Lange john@darkcore.net
-Date : September 12, 2000
-
-ipchains accounting script for use with MRTG
-
-*** New in this version ***
-*** please read before ***
-*** using this script ***
-
-***
-In version 1.0.1, the script is actually counting packets, NOT bytes as
-was intended. I apologize for this mistake.
-
-By default, this new version of the script also counts packets NOT bytes.
-I've done this to maintain compatibility with the previous (buggy) version
-so that people who blindly upgrade won't suddenly find all of their output
-out of whack.
-
-To change to counting bytes, please edit the ipchainacc script.
-***
-
-In order for this script to work:
-
-1)
-You need a kernel which was compiled with the configuration option
-CONFIG_IP_FIREWALL set to y. You also need the front end to ip firewall and
-ip accounting, that is, the tool 'ipchains'. I used version 1.3.9.
-
-2)
-Add input and output rules to ipchains for accounting. I've included the
-small script ipchainacc.rules. If you run it, it will do what it needs for
-ipchains to work with this script. I recommend you have a look at it before
-running it. It shouldn't break anything because it just adds some empty
-rules at the top of the input and output chains for accounting purposes. One
-concern however is that these rules have to be first on the chains to work.
-If you have some bad IPs black-holed these rules will still count packets
-from them which might be bad for server load.
-
-2)
-edit the script ipchainacc for your system. You only need give it the path
-to ipchains and hostname. Alternatively, you can just remove the call to
-hostname and assign it manually.
-
-The ipchainacc script can also be run from the console if you want to see the output.
-
-3) edit your mrtg.cfg for your system. For this script to be incorperated
-into mrtg, you need only add the following line to mrtg.cfg:
-
-Target[ipchains]: `/sbin/ipchainacc`
-
-4) set mrtg to run as a cron (see the mrtg docs)
-
-------
-NOTE: this script is very basic. It captures accounting information for
-EVERYTHING coming in and out of your machine on all interfaces and IPs.
-
-If you need to narrow the accounting rules, you will have to edit the
-ipchainacc.rules script. I've included a very simple example in that script
-on how to narrow the accounting but it remains untested.
diff --git a/src/contrib/ipchains/ipchainacc b/src/contrib/ipchains/ipchainacc
deleted file mode 100755
index db7862e..0000000
--- a/src/contrib/ipchains/ipchainacc
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/perl
-
-# ipchainacc version 1.1.0
-# Author: John Lange, john@darkcore.net
-# Date: September 12, 2000
-#
-# This script was written to provide output for MRTG
-# (multi router traffic grapher) via ipchains.
-#
-# http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
-#
-## Changelog
-# Sept 12, 2000
-# v1.1.0 added flag for selection of graphing either packets, or bytes.
-# The default is packets (which is pretty useless), but since
-# the previous releases were graphing packets I kept the default
-# the same.
-# I always meant for this to be bytes but I only recently noticed
-# this bug so I added a config flag for bytes.
-# Also changed the uptime slightly, but its still broken. When
-# goes past 99 days, it will hack the last digit off (used to happen
-# after 9 days)
-#
-# June 22, 2000
-# v1.0.1 added -x to ipchains to expand byte counters
-#
-# v1.0.0 Inital Release
-#
-#
-# This command must return 4 lines of output:
-# Line 1 : current state of the 'incoming bytes counter'
-# Line 2 : current state of the 'outgoing bytes counter'
-# Line 3 : string, telling the uptime of the target.
-# Line 4 : string, telling the name of the target.
-
-# This script relies on you having setup your ipchains rules beforehand
-
-#--- sample ipchains rules that will work with this script
-## Add some empty rules for accounting purposes only
-#
-#/sbin/ipchains -F acctin
-#/sbin/ipchains -F acctout
-#
-## add the new rules
-#/sbin/ipchains -N acctin
-#/sbin/ipchains -N acctout
-#
-## empty rules on the chains
-#/sbin/ipchains -A acctin
-#/sbin/ipchains -A acctout
-#
-#/sbin/ipchains -I input -j acctin
-#/sbin/ipchains -I output -j acctout
-#----------- end ---------------
-
-## edit for your system
-
-$ipchains='/sbin/ipchains'; # path to ipchains
-$host=`/bin/hostname --fqdn`; # local hostname (for information only)
-
-# if you use the ipchains rules above, you don't have to change these
-$inrule='acctin'; # name of input accounting rule
-$outrule='acctout'; # name of output accounting rule
-
-# What should we graph? packet counters = 0, bytes = 1
-# If you used this script before and you want to keep counting
-# packets, then set this to 0. If you would rather do the
-# sensible thing and count bytes, then set this to 1. If you change
-# from one to the other, then you should delete all the previous
-# history since it will be meaningless.
-$bytec=0;
-
-## -- don't edit below here ----
-
-# fetch the status from ipchains
-$_=`$ipchains -L $inrule -v -n -x |grep -v -i Chain |grep -v -i pkts`;
-@in_bytes = split;
-printf "$in_line"; # just for debugging
-
-$_=`$ipchains -L $outrule -v -n -x |grep -v -i Chain |grep -v -i pkts`;
-@out_bytes = split;
-printf "$out_line"; # just for debugging
-
-#$c=1;
-#foreach $value (@in_bytes) {
-# printf "$c: $value\n";
-# $c++;
-#};
-
-# uptime of the machine
-open(UPTIME,"uptime |cut -b 13-27|");
-$upTime=<UPTIME>;
-close(UPTIME);
-chop $upTime;
-
-# 4 lines of output only.
-printf "$in_bytes[$bytec]\n$out_bytes[$bytec]\n$upTime\n$host";
diff --git a/src/contrib/ipchains/ipchainacc.rules b/src/contrib/ipchains/ipchainacc.rules
deleted file mode 100755
index 3be5f63..0000000
--- a/src/contrib/ipchains/ipchainacc.rules
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-#--- sample ipchains rules for accounting
-
-# Flush the rules in case they exist already
-/sbin/ipchains -F acctin
-/sbin/ipchains -F acctout
-
-# add the new rule chains
-/sbin/ipchains -N acctin
-/sbin/ipchains -N acctout
-
-# add empty rules to the new chains just for accounting
-/sbin/ipchains -A acctin
-/sbin/ipchains -A acctout
-
-# insert rules into the input and output streams.
-# Packets will first pass through these rules before
-# returning to the other rules in the chains
-# You might not want this if you are trying to
-# completely ignore certain hosts.
-/sbin/ipchains -I input -j acctin
-/sbin/ipchains -I output -j acctout
-
-# if you wanted to narrow the accouting to a single IP
-# you could do these lines instead of the above 2 (not tested)
-# (assuming your IP address was 192.168.1.1)
-#/sbin/ipchains -I input -d 192.168.1.1 -j acctin
-#/sbin/ipchains -I output -s 192.168.1.1 -j acctout
-
-# By changing the rules, you can make it filter only exactly
-# what you want as long as it jumps to acctin, or acctout.
-# Be careful not to double count packets though.
-
-#----------- end ---------------
-
diff --git a/src/contrib/ipfilter/fw.pl b/src/contrib/ipfilter/fw.pl
deleted file mode 100644
index 67cf8b8..0000000
--- a/src/contrib/ipfilter/fw.pl
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/local/bin/perl
-# reads stats and uptime from ip-filter for mrtg
-# ron@rosie.18james.com, 2 Jan 2000
-
-my $firewall = "IP Filter v3.3.3";
-my($in_pkts,$out_pkts) = (0,0);
-
-open(FW, "/sbin/ipfstat -hio|") || die "cannot open ipfstat\n";
-while (<FW>) {
- $in_pkts += $1 if (/^(\d+)\s+pass\s+in\s+quick.*group\s+1\d0/);
- $out_pkts += $1 if (/^(\d+)\s+pass\s+out\s+quick.*group\s+1\d0/);
-}
-print "$in_pkts\n",
- "$out_pkts\n";
-my $uptime = `/usr/bin/uptime`;
-$uptime =~ /^\s+(\d{1,2}:\d{2}..)\s+up\s+(\d+)\s+(......),/;
-print "$2 $3\n",
- "$firewall\n";
diff --git a/src/contrib/ipfilter/ip-filter.readme b/src/contrib/ipfilter/ip-filter.readme
deleted file mode 100644
index 0e9ff57..0000000
--- a/src/contrib/ipfilter/ip-filter.readme
+++ /dev/null
@@ -1,34 +0,0 @@
-I've found the simple enclosed perl script useful to use mrtg to graph
-traffic through our IP-Filter firewall. The script may need some
-fiddling with the regular expressions to graph what you need at your
-site; our if-filter configuration blocks everything on the WAN
-interface by default and allows specific protocols in with `pass in
-quick' and `block in quick' rules on groups from 100-190; hence the
-simple regular expressions.
-
-The usage in mrtg.cfg here is:
-
-# firewall
-
-Target[firewall]: `./fw.pl`
-
-Options[firewall]: growright, noinfo, perhour
-
-MaxBytes[firewall]: 50000
-
-Title[firewall]: IP-Filter
-
-PageTop[firewall]: <center>
- <h1><font color=red>Firewall Traffic Analysis</font></h1>
- <h3>Syn/Ack Packets Passed (Connections) on le1 (24.7.4.75)</h3>
- </center>
-
-YLegend[firewall]: Packets per Hour
-ShortLegend[firewall]: pkts/hr
-Legend1[firewall]: Inbound connections per hour
-Legend2[firewall]: Outbound connections per hour
-
---
-
-Ronald Florence http://members.home.net/18james
-
diff --git a/src/contrib/iptables-accounting/README b/src/contrib/iptables-accounting/README
deleted file mode 100644
index 3361e94..0000000
--- a/src/contrib/iptables-accounting/README
+++ /dev/null
@@ -1,21 +0,0 @@
-From: "Gill, Vern" <vgill@technologist.com>
-Date: Fri, 9 Mar 2001 18:43:30 -0800
-Subject: New Module for MRTG
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-I have "hacked" together a module for iptables. I used the ipchainacc
-1.1.0 from the contrib directory. Here's the scoop;
-Requires Perl
-
-There is one argument required, and it can be any of the following;
-filter
-nat
-mangle
-You may extend the functionality, but it also requires editing the
-script. To use, place the following in your mrtg.cfg;
-Target[iptables]: `/path-to/iptables-accounting argument`
-
-The script is probably ugly to perl gurus, but for a guy who has
-never used perl, I think it's pretty good.
diff --git a/src/contrib/iptables-accounting/iptables-accounting b/src/contrib/iptables-accounting/iptables-accounting
deleted file mode 100755
index 6d6dba2..0000000
--- a/src/contrib/iptables-accounting/iptables-accounting
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/perl
-# iptables-accounting .9
-#
-# Author: Vern Gill <vgill@technologist.com>
-# Date: March 9, 2001
-#
-# Adapted from code used in ipchainacc
-#
-# ipchainacc 1.1.0
-#
-# Author: John Lange john@darkcore.net
-# Date : September 12, 2000
-#
-#
-# The command takes one argument:
-# Argument: what filter do you want to view
-# I.E. iptables-accounting filter
-# iptables-accounting nat
-#
-# Also, you can check bytes or packets. Check the $bytec below
-# and the text above it for details
-#
-# This command must return 4 lines of output:
-# Line 1 : current state of the 'incoming bytes counter'
-# Line 2 : current state of the 'outgoing bytes counter'
-# Line 3 : string, telling the uptime of the target.
-# Line 4 : string, telling the name of the target.
-#
-# To add more counters, just edit the commented out if lines
-# below. For instance, to count the filter table and the
-# INPUT chain, just change the elsif to filter, and the
-# $inrule to INPUT
-# Share and enjoy
-
-# edit for your system
-
-$iptables='/usr/local/sbin/iptables'; # path to iptables
-$host=`/bin/hostname --fqdn`; # local hostname (for information
-only)
-
-$table = $ARGV[0];
-
-if ( $table =~ /^filter/i ) {
- $inrule='FORWARD';
- $outrule='OUTPUT';
-} elsif ( $table =~ /^nat/i ) {
- $inrule='PREROUTING';
- $outrule='POSTROUTING';
-} elsif ( $table =~ /^mangle/i ) {
- $inrule='PREROUTING';
- $outrule='OUTPUT';
-#} elsif ( $table =~ /^table-name-here/i ) {
-# $inrule='CHAIN-NAME-HERE';
-# $outrule='OTHER-CHAIN-NAME';
-#} elsif ( $table =~ /^table-name-here/i ) {
-# $inrule='CHAIN-NAME-HERE';
-# $outrule='OTHER-CHAIN-NAME';
-}
-
-# What should we graph? packet counters = 4, bytes = 6
-# If you used the ipchainacc script before and you want to keep
-counting
-# packets, then set this to 4. If you would rather do the
-# sensible thing and count bytes, then set this to 6. If you change
-# from one to the other, then you should delete all the previous
-# history since it will be meaningless.
-$bytec=6;
-
-## -- don't edit below here ----
-
-# fetch the status from iptables
-$_=`$iptables -t $table -L $inrule -v -n -x | grep Chain`;
-@in_bytes = split;
-
-$_=`$iptables -t $table -L $outrule -v -n -x | grep Chain`;
-@out_bytes = split;
-
-# uptime of the machine
-open(UPTIME,"uptime |cut -b 13-27|");
-$upTime=<UPTIME>;
-close(UPTIME);
-chop $upTime;
-
-# 4 lines of output only.
-printf "$in_bytes[$bytec]\n$out_bytes[$bytec]\n$upTime\n$host";
diff --git a/src/contrib/iptables_acc/README b/src/contrib/iptables_acc/README
deleted file mode 100644
index 28f9169..0000000
--- a/src/contrib/iptables_acc/README
+++ /dev/null
@@ -1,13 +0,0 @@
-Date : Mit Sep 27 09:06:26 MEST 2000
-Author : Gereon Ruetten <g.ruetten@gmx.de>
-
-Because there is no default policy for user-chains, you have to insert a
-rule which counts all pakets/bytes going through the chain.
-You can do that by inserting (must be the first rule in the chain) a rule
-like :
-
-iptables -t filter -A httpin
-
-in your mrtg config file you have to add a line :
-
-Target[iptables]: ´/firewall/stats/mrtg/iptables_acc httpin httpout´
diff --git a/src/contrib/iptables_acc/iptables_acc b/src/contrib/iptables_acc/iptables_acc
deleted file mode 100755
index 8ef8032..0000000
--- a/src/contrib/iptables_acc/iptables_acc
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/perl
-
-# iptables_acc version 0.1
-# Author: Gereon Ruetten, g.ruetten@gmx.de
-#
-# for further informations about mrtg :
-#
-# http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
-#
-# usage :
-# Target[traffic]: /usr/local/mrtg-2/bin/iptables_acc httpin httpout
-#
-# the two arguments are the user chains you want to read
-
-use strict;
-
-my ($IPTABLES, $host, $in_chain, $out_chain, $in_data, $out_data);
-
-$IPTABLES='/usr/local/bin/iptables'; # where to find iptables
-$host=`/bin/hostname --fqdn`; # local hostname (for information only)
-
-# these are defaults, yu can ovveride them with command-line parameters
-$in_chain='httpin'; # name of input accounting rule
-$out_chain='httpout'; # name of output accounting rule
-
-$in_data = 0; # edit these settings if you want to monitor something else
-$out_data = 0; # then the bytes counter
-
-## -- don't edit below here ----
-
-my (@rules, @in_count, @out_count, $upTime, $value, $c);
-
-# get command line params
-($in_chain,$out_chain) = @ARGV;
-
-# fetch the status from iptables
-@rules=`$IPTABLES -L $in_chain -v -n -x`;
-splice @rules, 0, 2;
-@in_count=split(' ',$rules[$in_data]);
-
-@rules=`$IPTABLES -L $out_chain -v -n -x`;
-splice @rules, 0, 2;
-@out_count = split(' ',$rules[$out_data]);
-
-#$c=1;
-#foreach $value (@in_count) {
-# printf "in $c: $value\n";
-# $c++;
-#};
-
-#$c=1;
-#foreach $value (@out_count) {
-# printf "out $c: $value\n";
-# $c++;
-#};
-
-# uptime of the machine
-open(UPTIME,"uptime |cut -b 13-26|");
-$upTime=<UPTIME>;
-close(UPTIME);
-chop $upTime;
-
-# 4 lines of output only.
-if (!$in_count[1]) { $in_count[1] = 0; }
-if (!$out_count[1]) { $out_count[1] = 0; }
-
-print "$in_count[1]\n",
- "$out_count[1]\n",
- "$upTime\n$host";
diff --git a/src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt b/src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt
deleted file mode 100644
index 4060e3f..0000000
--- a/src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-HANDCO-SNMP-MIB DEFINITIONS ::= BEGIN
-
-IMPORTS
- OBJECT-TYPE, MODULE-IDENTITY,
- Counter32, Integer32, Opaque, enterprises, Counter64
- FROM SNMPv2-SMI
-
- TEXTUAL-CONVENTION, DisplayString, TruthValue
- FROM SNMPv2-TC;
-
-handco MODULE-IDENTITY
- LAST-UPDATED "0104260000Z"
- ORGANIZATION "Handco"
- CONTACT-INFO
- "Primary Author: Herve HERITIER
- email: hh@handco.org"
- DESCRIPTION
- "This file defines the private UCD SNMP MIB extensions."
- REVISION "0104260000Z"
- DESCRIPTION
- "SMIv2 version"
- ::= { enterprises 2055 }
-
-hostname OBJECT-TYPE
- SYNTAX DisplayString
- MAX-ACCESS read-only
- STATUS current
- DESCRIPTION
- "The process name we're counting/checking on."
- ::= { handco 1 }
-
-
-iptables OBJECT-TYPE
- SYNTAX SEQUENCE OF IpTable
- MAX-ACCESS read-only
- STATUS current
- INDEX {tableName, chainName}
- DESCRIPTION
- ""
- ::= {handco 2}
-
-IpTable ::= SEQUENCE {
- chainName DisplayString
- chainCounter Counter64
- }
-
-iptable OBJECT-TYPE
- SYNTAX IpTable
- MAX-ACCESS read-only
- STATUS current
- DESCRIPTION
- ""
- ::= {iptables 1}
-
-chainName OBJECT-TYPE
- SYNTAX DisplayString
- MAX-ACCESS read-only
- STATUS current
- DESCRIPTION
- ""
- ::= {iptable 1}
-
-chainCounter OBJECT-TYPE
- SYNTAX Counter32
- MAX-ACCESS read-only
- STATUS current
- DESCRIPTION
- ""
- ::= {iptable 2}
-
-
-
-END
diff --git a/src/contrib/iptables_acc_snmp/README b/src/contrib/iptables_acc_snmp/README
deleted file mode 100644
index a224f71..0000000
--- a/src/contrib/iptables_acc_snmp/README
+++ /dev/null
@@ -1,15 +0,0 @@
-From: HERITIER Hervé <hh@handco.org>
-Date: 12 May 2001 18:04:11 -0000
-
-Attached, you find a simple script to capture iptables counter on Linux 2.4,
-to use it, on each computer run iptables, add a pass line into the
-snmpd.conf to activate access like this :
-
-pass .1.3.6.1.4.1.2055 /usr/bin/perl /usr/local/iptables_acc_snmp
-
-It can be useful for ISP's to make easly a main accounting and performance
-monitoring.
-I provide a sample MIB file to implement it into mrtg config file.
-
-Hervé HERITIER
-
diff --git a/src/contrib/iptables_acc_snmp/iptables_acc_snmp b/src/contrib/iptables_acc_snmp/iptables_acc_snmp
deleted file mode 100755
index 0912df0..0000000
--- a/src/contrib/iptables_acc_snmp/iptables_acc_snmp
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/usr/bin/perl
-
-my ($req,$place,$returnOID,$mode, $IPTABLES,@counters);
-
-$IPTABLES = "iptables"; # cmdline to iptables
-$place=".1.3.6.1.4.1.2055";
-
-@counters = loadChains();
-
-main();
-
-
-sub main {
- my ($mode,$req);
- if (scalar(@ARGV) == 2) {
- ($mode,$req) = @ARGV;
- } else {
- ($req) = @ARGV;
- }
-
- SWITCH: for ($mode) {
- /-s/ && exit;
- /-n/ && do {
- SWITCH: for ($req) {
- /$place$/ && do {
- $returnOID = "$place.1";
- last SWITCH;
- };
- /$place\.1$/ && do {
- $returnOID = "$place.2.1.1.1";
- last SWITCH;
- };
- /$place\.2$/ && do {
- $returnOID = "$place.2.1.1.1";
- last SWITCH;
- };
- /$place\.2\.1$/ && do {
- $returnOID = "$place.2.1.1.1";
- last SWITCH;
- };
- /$place\.2\.1\.1$/ && do {
- $returnOID = "$place.2.1.1.1";
- last SWITCH;
- };
- /$place\.2\.1\.1\.(.*)$/ && do {
- if ($1 < scalar(@counters)-1) {
- $returnOID = "$place.2.1.1." . ($1 + 1);
- } else {
- $returnOID = "$place.2.1.2.1";
- }
- last SWITCH;
- };
- /$place\.2\.1\.2\.(.*)$/ && do {
- if ($1 < scalar(@counters)-1) {
- $returnOID = "$place.2.1.2." . ($1 + 1);
- } else {
- exit;
- }
- last SWITCH;
- };
- exit;
- }
- last SWITCH;
- };
- SWITCH: for ($req) {
- /$place$/ && exit;
- /$place\.2\.1$/ && exit;
- /$place\.2\.1\.1$/ && exit;
- /$place\.2\.1\.2$/ && exit;
- $returnOID = $req;
- }
- }
- print "$returnOID\n";
- $_ = $returnOID;
- SWITCH: {
- /^$place\.1$/ && do {
- print "string\n", getHostname() ;
- last SWITCH;
- };
- /^$place\.2\.1\.(1|2)\.(.*)$/ && do {
- ($a, $b) = split ("=", @counters[$2]);
- if ($1 == 1) {
- print "string\n$a\n";
- } else {
- print "counter\n$b\n";
- }
- last SWITCH;
- };
- /^$place\.2\.1\.1\.3\.1\.1\.(1|2|3)$/ && do {
- print "integer\n$1\n";
- last SWITCH;
- };
- /^$place\.2\.1\.1\.2\.(1|2|3)$/ && do {
- SWITCH: for ($1) {
- /1/ && do {
- print "string\nfilter\n";
- last SWITCH
- };
- /2/ && do {
- print "string\nnat\n";
- last SWITCH
- };
- /3/ && do {
- print "string\nmangle\n";
- last SWITCH
- };
- }
- last SWITCH;
- };
-
- print "string\nack... $returnOID $req\n";
- }
-}
-
-sub getHostname {
- return `/bin/hostname --fqdn`;
-}
-
-sub getChainCount {
- my ($table);
- $table = shift();
- return scalar(getChainNames($table));
-}
-sub getChainNames {
- my (@bufLines,$table,@chains);
- $table = shift();
- @bufLines = `$IPTABLES -t $table -nL`;
- foreach (@bufLines) {
- if (/^Chain (.*) \((.*)$/) {
- push (@chains, $1);
- }
- }
- return @chains;
-}
-
-sub getChainCounter {
- my (@rules, @count, $value);
- $table = shift();
- $chain = shift();
- @rules=`$IPTABLES -t $table -vnxL $chain`;
- splice @rules, 0, 2;
- $total=0;
- foreach $value (@rules) {
- @count=split(' ',$value);
- $total += $count[1];
- }
- return $total;
-}
-
-sub getChains {
- my ($table, @result, @names, $counter, $name,@buf);
- $table = shift();
- @chains = getChainNames($table);
- foreach $name (@chains) {
- $counter = getChainCounter ($table, $name);
- push (@result, "$table/$name=$counter");
- }
- return @result;
-}
-sub loadChains {
- my (@result, @buf, $table);
- foreach $table ("filter","nat","mangle") {
- @buf = getChains ($table);
- push (@result, @buf);
- }
- return @result;
-} \ No newline at end of file
diff --git a/src/contrib/ircstats/README b/src/contrib/ircstats/README
deleted file mode 100644
index 722b215..0000000
--- a/src/contrib/ircstats/README
+++ /dev/null
@@ -1,6 +0,0 @@
-ircstats.pl is the simple perl script I use to monitor client
-loads and such on various EFnet IRC servers.
-
-- Matt Ramsey (MR227) mjr@geeks.org, mjr@nin.com
-
-
diff --git a/src/contrib/ircstats/ircstats.pl b/src/contrib/ircstats/ircstats.pl
deleted file mode 100644
index 6b7993e..0000000
--- a/src/contrib/ircstats/ircstats.pl
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/local/bin/perl5
-# client.pl v1.5 7 Oct 1997 Matthew Ramsey <mjr@blackened.com>
-# http://www.blackened.com/ircstats/
-# A simple perl script I use to grab client info on IRC Servers. While
-# it was designed for connecting to an IRC Server, it can easily be
-# modified to be used for other purposes.
-# Special thanks to Chris Behrens and Doug McLaren.
-
-use Socket;
-
-$DEBUG = 0;
-
-if ($ARGV[0]) {
- $irchost = $ARGV[0] ;
-} else {
- print STDERR "Usage: $0 <irc server>\n" ;
- exit 1 ;
-}
-
-
-#$irchost = "irc-e.primenet.com";
-$ircport = "6666";
-$nick1 = "alskdjf";
-$nick2 = "aselkr";
-
-($locclients, $totclients, $numserv, $numchan) =
- getinfo($irchost, $ircport);
-$time = time();
-print "$locclients\n";
-print "$locclients\n";
-print "$time\n";
-print "";
-
-exit; # We're done!
-
-sub connect_host
-{
- local($ip, $port) = @_;
-
- ($d1, $d2, $proto) = getprotobyname("tcp");
- ($d1, $d2, $d3, $d4, $rawclient) = gethostbyname(`hostname`);
- ($d1, $d2, $d3, $d4, $rawserver) = gethostbyname($ip);
- $clientaddr = pack("Sna4x8", 2, 0, $rawclient);
- $serveraddr = pack("Sna4x8", 2, $port, $rawserver);
- socket(SOCKET, AF_INET, SOCK_STREAM, $proto) || die "No socket: $!";
- bind(SOCKET, $clientaddr);
- connect(SOCKET, $serveraddr) || die "connect failed: $!";
- select(SOCKET);
- $| = 1;
- select(STDOUT);
-}
-
-sub getinfo
-{
- local($host, $port) = @_;
- local($lc, $ts, $ns, $nc);
-
- $lc = "0";
- $ts = "0";
- $ns = "0";
- $nc = "0";
- connect_host($host, $port);
- print SOCKET "user efnet jskd fksj fkjs fkjsfk jfk\nnick
-$nick1\nlusers\n";
- while(<SOCKET>)
- {
- chomp();
- @args = split(' ', "$_");
- if (substr($args[0], 0, 1) eq ":")
- {
- if ($args[1] eq "433")
- {
- print SOCKET "nick $nick2\nlusers\n";
- }
- elsif ($args[1] eq "251")
- {
- $tc = $args[5] + $args[8];
- $ns = $args[11];
- }
- elsif ($args[1] eq "254")
- {
- $nc = $args[3];
- }
- elsif ($args[1] eq "255")
- {
- $lc = $args[5];
- last;
- }
- }
- }
- close(SOCKET);
- return ($lc, $tc, $ns, $nc);
-}
diff --git a/src/contrib/ircstats2/README b/src/contrib/ircstats2/README
deleted file mode 100644
index f8b2e9a..0000000
--- a/src/contrib/ircstats2/README
+++ /dev/null
@@ -1,38 +0,0 @@
-ircstats2.pl v1.3 (06/04/2001)
-
-ircstats2.pl is a perl script I use to monitor
-the user load of the Langochat.net IRC Network.
-- Lucas Nussbaum <lucas@schickler.net>
-Homepage : http://www.schickler.net/lucas/ircstats2/
-
-Usage :
-
-All the configuration is done in ircstats2.pl.
-You can look at example.cf to learn how to configure mrtg with this script.
-To restart the script if it crashes (this soft is supposed to be bug-free,
-so that shouldn't happen), you can use the crontab script included.
-
-Changes :
-
-1.3 (21/03/2001)
- - Now counts servers and ircops too.
-1.2 (25/01/2001)
- - Better calculation of the global user load, when the list of servers
- isn't up to date.
- - Now counts the number of channels too :)
- - Can display the global users and channels count in plain text file,
- enabling those files to be used in other scripts.
-
-1.1 (24/08/2000)
- - Initial public release
-
-Licence :
-
-This software is subject to the
-
- GNU GENERAL PUBLIC LICENCE version 2 or above
-
-It can be found on http://www.gnu.org/copyleft/gpl.html
-
-However, if you modify something in this script, I would strongly appreciate
-that you send me a copy.
diff --git a/src/contrib/ircstats2/crontab.script b/src/contrib/ircstats2/crontab.script
deleted file mode 100755
index b21f2f5..0000000
--- a/src/contrib/ircstats2/crontab.script
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-#
-# Crontab script for ircstats2
-#------------------------------
-# You can use that script to check whether the stats generation script is
-# running.
-#
-# No bugs are known in this software. So if it crashes, please tell me, even if
-# you don't know anything about the crash !
-#
-# To check for your script every 10 minutes, put the following line in your
-# crontab:
-# 0,30 * * * * /home/mydir/crontab.script
-# And if you don't want to get email from crontab when it checks you script,
-# put the following in your crontab:
-# 0,30 * * * * /home/mydir/crontab.script >/dev/null 2>&1
-#
-
-# change this to the directory you run the script from:
-ircstatsdir="/home/lucas/ircstats2"
-
-########## you probably don't need to change anything below here ##########
-
-cd $ircstatsdir
-
-if test -r ircstats2.pid
-then
- pid=`cat ircstats2.pid`
- if `kill -CHLD $pid >/dev/null 2>&1`
- then
- exit 0
- fi
- echo ""
- echo "Stale ircstats2.pid file, erasing..."
- rm -f ircstats2.pid
-fi
-
-echo ""
-echo "ircstats2.pl restarting ..."
-echo "This software is supposed to be bug-free. If the bot has to restart,"
-echo "and if that's not for a good reason (server reboot for example), please notify"
-echo "the author (lucas@schickler.net) even if you don't know why the script crashed."
-
-./ircstats2.pl
-exit 0
diff --git a/src/contrib/ircstats2/example.cf b/src/contrib/ircstats2/example.cf
deleted file mode 100644
index 06bcdf3..0000000
--- a/src/contrib/ircstats2/example.cf
+++ /dev/null
@@ -1,38 +0,0 @@
-WorkDir: /home/lucas/public_html/mrtg
-
-Refresh: 300
-Interval: 5
-WriteExpires: Yes
-IconDir: images/
-RunAsDaemon: Yes
-
-#.....................................................................
-# Default settings
-
-MaxBytes[_]: 10000
-Options[_]: gauge, noinfo, nopercent, integer, growright
-Background[_]: #FFFFC0
-YLegend[_]: Users
-WithPeak[_]: wym
-ShortLegend[_]: Users
-Legend1[_]: Users
-Legend2[_]:
-Legend3[_]: Max Users
-Legend4[_]:
-LegendI[_]: &nbsp;Users :
-Colours[_]: BLUE#0000FF,BLUE#0000FF,LIGHT BLUE#C0C0FF,LIGHT BLUE#C0C0FF
-
-Target[global]: `cat /home/lucas/ircstats2/temp/globalusersmrtg`
-Title[global]: Irc.Kewl.Org User Load
-LegendO[global]:
-PageTop[global]: <H2>Irc.Kewl.Org User Load</H2><TABLE>
- <TR><TD>Stats Maintainer :</TD><TD><A HREF="mailto:Lucas@Kewl.Org">Lucas@Kewl.Org</A></TD></TR>
- </TABLE>
-
-Target[angers]: `cat /home/lucas/ircstats2/temp/angers.fr.eu.kewl.org`
-Title[angers]: Angers.FR.EU.Kewl.Org User Load
-LegendO[angers]:
-PageTop[angers]: <H2>Angers.FR.EU.Kewl.Org User Load</H2><TABLE>
- <TR><TD>Stats Maintainer :</TD><TD><A HREF="mailto:Lucas@Kewl.Org">Lucas@Kewl.Org</A></TD></TR>
- </TABLE>
-
diff --git a/src/contrib/ircstats2/ircstats2.pl b/src/contrib/ircstats2/ircstats2.pl
deleted file mode 100755
index 370aec0..0000000
--- a/src/contrib/ircstats2/ircstats2.pl
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/usr/bin/perl
-# ircstats2.pl v1.3 06 Apr 2001 Lucas Nussbaum <lucas@schickler.net>
-# More info can be found on http://www.schickler.net/lucas/ircstats2.php
-# based on ircstats from Matt Ramsey (MR227) mjr@geeks.org, mjr@nin.com
-# Used to generate stats on the Kewl.Org IRC Network
-# If you see something that should be changed, please notify me !
-
-use Socket;
-
-# pseudo-client parameters
-$nick = "StatsMaker234";
-$ident = "Stats";
-$realname = "http://www.schickler.net/lucas/";
-
-# server and port to connect to
-$ircserver = "127.0.0.1";
-$ircport = "6667";
-
-# Where to store the output data (directory MUST exist)
-# The number of users on each server will be in a file named like the server.
-# An additionnal file named 'global' will be created, containing the sum of
-# all servers' users.
-# An example configuration file is included.
-$datapath = "/home/lucas/ircstats2/temp";
-
-# Where to put the PID file
-$pidfile = "/home/lucas/ircstats2/ircstats2.pid";
-
-# NOTE: Set those variables to 0 to enable, put a # in front of the
-# lines to disable.
-# Count the global number of users in "globalusersmrtg" file (MRTG format)
-$globalusersmrtg=0;
-# Count the channels in "channelsmrtg" file (MRTG format)
-$channelsmrtg=0;
-# Count the global number of ircops in "ircopsmrtg" file (MRTG format)
-$ircopsmrtg=0;
-# Count the number of servers in "serversmrtg" file (MRTG format)
-$serversmrtg=0;
-# Count the global number of users in "globalusersplain" file
-# (Plain text, to be used with others scripts)
-$globalusersplain=0;
-# Count the channels in "channelsplain" file (Plain text,
-# to be used with others scripts)
-$channelsplain=0;
-# Count the global number of ircops in "ircopsplain" file
-# (Plain text, to be used with others scripts)
-$ircopsplain=0;
-# Count the number of servers in "serversmrtg file (MRTG format)
-$serversplain=0;
-# ircops number offset (not to count services, for example)
-$ircopsoffset=0;
-# servers number offset (not to count services, for example)
-$serversoffset=0;
-
-# Servers to poll
-$server{"cybernet.langochat.net"}=0;
-$server{"sicfa.langochat.net"}=0;
-$server{"free.langochat.net"}=0;
-$server{"jeuxgroup.langochat.net"}=0;
-$server{"diligo.langochat.net"}=0;
-
-##############################################
-### DO NOT MODIFY ANYTHING BELOW THIS LINE ###
-##############################################
-
-print "Now daemonizing ...\n";
-&daemonize;
-
-if (!(($globalusersmrtg eq "")&&($globalusersplain eq "")&&($channelsmrtg eq "")&&($channelsplain eq "")&&($ircopsmrtg eq "")&&($ircopsplain eq "")&&($serversplain eq "")&&($serversmrtg eq ""))) {
- $needlusers=1;
-}
-($g, $g, $proto) = getprotobyname("tcp");
-while (true) {
- ($g, $g, $g, $g, $rawserver) = gethostbyname($ircserver);
- if ($rawserver) {
- $serveraddr = pack("Sna4x8", 2, $ircport, $rawserver);
- socket(SOCKET, AF_INET, SOCK_STREAM, $proto) || die "No socket: $!";
- if (connect(SOCKET, $serveraddr)){
- select(SOCKET); $| = 1;
- select(STDOUT); $| = 1;
- print SOCKET "USER $ident a b :$realname\n";
- print SOCKET "NICK $nick\n";
- while (<SOCKET>){
- @i = split(" ",$_);
- if ($i[1] eq "433") {print SOCKET "NICK ".$nick.time()."\n";}
- elsif ($i[1] eq "437") {print SOCKET "NICK ".$nick.time()."\n";}
- elsif ($i[1] eq "376") {&getinfo;}
- elsif ($i[1] eq "402") {$server{lc($i[3])}=0;}
- elsif ($i[1] eq "265") {
- $i[0]=~s/\://;
- $server{lc($i[0])}=$i[6];
- }
- elsif ($i[1] eq "266") {
- if ($globalusersmrtg ne "") {
- $globalusersmrtg=$i[6];
- }
- if ($globalusersplain ne "") {
- $globalusersplain=$i[6];
- }
- }
- elsif ($i[1] eq "254") {
- if ($channelsmrtg ne "") {
- $channelsmrtg=$i[3];
- }
- if ($channelsplain ne "") {
- $channelsplain=$i[3];
- }
- }
- elsif ($i[1] eq "251") {
- if ($serversmrtg ne "") {
- $serversmrtg=$i[11]-$serversoffset;
- }
- if ($serversplain ne "") {
- $serversplain=$i[11]-$serversoffset;
- }
- }
- elsif ($i[1] eq "252") {
- if ($ircopsmrtg ne "") {
- $ircopsmrtg=$i[3]-$ircopsoffset;
- }
- if ($ircopsplain ne "") {
- $ircopsplain=$i[3]-$ircopsoffset;
- }
- }
- elsif ($i[0] eq "PING") {
- &saveinfo;
- print SOCKET "PONG $i[1]\n";
- &getinfo;
- }
- }
- }
- close(SOCKET);
- }
- sleep(120);
-}
-
-sub saveinfo {
- foreach $s (keys %server){
- open(OUTPUT,">$datapath/$s");
- print OUTPUT "$server{$s}\n$server{$s}\n$time\n";
- close(OUTPUT);
- }
- if ($globalusersmrtg ne "") {
- open(OUTPUT, ">$datapath/globalusersmrtg");
- print OUTPUT "$globalusersmrtg\n$globalusersmrtg\n$time\n";
- close(OUTPUT);
- }
- if ($channelsmrtg ne "") {
- open(OUTPUT, ">$datapath/channelsmrtg");
- print OUTPUT "$channelsmrtg\n$channelsmrtg\n$time\n";
- close(OUTPUT);
- }
- if ($serversmrtg ne "") {
- open(OUTPUT, ">$datapath/serversmrtg");
- print OUTPUT "$serversmrtg\n$serversmrtg\n$time\n";
- close(OUTPUT);
- }
- if ($ircopsmrtg ne "") {
- open(OUTPUT, ">$datapath/ircopsmrtg");
- print OUTPUT "$ircopsmrtg\n$ircopsmrtg\n$time\n";
- close(OUTPUT);
- $ircopsmrtg=0; # raw 252 pas disp si pas opers
-
- }
- if ($globalusersplain ne "") {
- open(OUTPUT,">$datapath/globalusersplain");
- print OUTPUT "$globalusersplain";
- close(OUTPUT);
- }
- if ($channelsplain ne "") {
- open(OUTPUT, ">$datapath/channelsplain");
- print OUTPUT "$channelsplain";
- close(OUTPUT);
- }
- if ($serversplain ne "") {
- open(OUTPUT, ">$datapath/serversplain");
- print OUTPUT "$serversplain";
- close(OUTPUT);
- }
- if ($ircopsplain ne "") {
- open(OUTPUT, ">$datapath/ircopsplain");
- print OUTPUT "$ircopsplain";
- close(OUTPUT);
- $ircopsplain=0; # raw 252 pas disp si pas opers
- }
-}
-
-sub getinfo {
- foreach $s (keys %server) {
- print SOCKET "lusers * $s\n";
- }
- $time=time();
- if ($needlusers==1) {
- print SOCKET "lusers\n";
- }
-}
-
-sub daemonize () {
- chdir "/" or die "Can't chdir to /: $!";
- open STDIN, "/dev/null" or die "Can't read /dev/null: $!";
- open STDOUT, ">/dev/null" or die "Can't write to /dev/null: $!";
- defined (my $pid = fork) or die "Can't fork: $!";
- if ($pid) {
- if ($pidfile) {
- open(PIDFILE,">$pidfile");
- print PIDFILE "$pid\n";
- close(PIDFILE);
- }
- exit;
- }
- setsid or die "Can't start a new session: $!";
- open STDERR, ">&STDOUT" or die "Can't dup stdout: $!";
-}
diff --git a/src/contrib/jm/README b/src/contrib/jm/README
deleted file mode 100644
index a31fe3b..0000000
--- a/src/contrib/jm/README
+++ /dev/null
@@ -1,17 +0,0 @@
-From: joeym@inficad.com
-Date: Tue, 9 Feb 1999 16:51:50 -0700
-
-
-Enclosed are a few perl scripts I wrote to collect stats on: # of users
-logged into a given shell machine, # of players on a quake server, and # of
-users currently reading news.
-
-They each have a little blurb in the header describing their use.
-
---
-Joey Miller
-Lead Programmer
-Inficad Communications
-602.265.4423 / 888.265.4423
-
-
diff --git a/src/contrib/jm/finger-mrtg.pl b/src/contrib/jm/finger-mrtg.pl
deleted file mode 100755
index 4dfdcb8..0000000
--- a/src/contrib/jm/finger-mrtg.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl5
-#
-# finger-mrtg.pl -
-#
-# executes "finger @hostname" (hostname is the argument passed into
-# the script) and counts how many logins there currently are on that
-# machine.
-#
-# if machine is 'localhost', we just execute 'finger' instead, w/ no
-# arguments.
-#
-# example Target line:
-#
-# Target[shellbox1]: `/path/to/finger-mrtg.pl shellbox1.mydomain.com`
-#
-#
-# -joey miller, inficad communications, llc.
-# <joeym@inficad.com>
-
-
-if ( ! $ARGV[0] ) { exit; }
-
-# output:
-#
-# [user1.inficad.com]
-# Login Name Tty Idle Login Time Office Office Phone
-# username blah blah *pd 43 Feb 3 16:55
-# hello lada lada pa 5:16 Feb 3 15:21
-
-if ( $ARGV[0] =~ /localhost/ ) {
- open(FINGER, "/usr/bin/finger |") || exit;
-} else {
- open(FINGER, "/usr/bin/finger \@$ARGV[0] |") || exit;
-}
-
-while (<FINGER>) {
- if ( /^\[.*\]/ ) { next; }
- if ( /^Login/ ) { next; }
- $count++;
-}
-
-print "$count\n";
-print "$count\n";
-print "0\n";
-print "$ARGV[0]\n";
diff --git a/src/contrib/jm/mrtg-jm.tar.gz b/src/contrib/jm/mrtg-jm.tar.gz
deleted file mode 100644
index dc515e6..0000000
--- a/src/contrib/jm/mrtg-jm.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/contrib/jm/news-mrtg.pl b/src/contrib/jm/news-mrtg.pl
deleted file mode 100644
index 6c2cdef..0000000
--- a/src/contrib/jm/news-mrtg.pl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/perl5
-#
-# news-mrtg.pl -
-#
-#
-# joey miller, inficad communications, llc
-# <joeym@inficad.com> 1999/02/02
-#
-
-
-if ( ! $ARGV[0] ) { exit; }
-if ( ! $ARGV[1] ) { $port = 22; }
-else { $port = $ARGV[1]; }
-
-if ( $ARGV[0] =~ /localhost/ ) {
- open(NFO, " (uptime ; ps auxw |grep nnrp |grep -v grep) |") || exit -1;
-} else {
- open(NFO, "ssh -p $port $ARGV[0] 'uptime ; ps auxw |grep nnrp |grep -v grep' |") || exit -1;
-}
-while (<NFO>) {
- if ( ! $count ) {
- ($uptime) = $_ =~ /^.*(up.*),\s\d+user/;
- }
- $count++;
-}
-close(NFO);
-
-$count--;
-$uptime =~ s/,$//;
-
-print "$count\n";
-print "$count\n";
-print "$uptime\n";
-print "$ARGV[0]\n";
diff --git a/src/contrib/jm/quake-mrtg.pl b/src/contrib/jm/quake-mrtg.pl
deleted file mode 100755
index 30d44ae..0000000
--- a/src/contrib/jm/quake-mrtg.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl5
-#
-# quake-mrtg.pl
-#
-# counts the number of players currently on a given
-# quake2/quakeworld/unreal/etc server, using the 'qstat'
-# program available from: ftp://ftp.activesw.com/pub/quake/
-#
-# Usage:
-# Target[quakeserv]: `quake-mrtg.pl quake.server.com 27910 Q2`
-#
-# ^^^ Gets usage from a Q2 server running on quake.server.com,
-# port 27910.
-#
-# - joey miller, inficad communications, llc.
-# <joeym@inficad.com>, 2/5/1999
-#
-
-my($qstat) = "./qstat";
-
-$| = 1;
-
-if ( scalar(@ARGV) < 3 ) {
- print STDERR "usage: $0 server.address port game-type\n\n";
- print STDERR "\tgame-types: QS, QW, QWM, H2S, HWS, Q2, UNS, HLS, SNS\n";
- print STDERR "\tQW = quakeworld, Q2 = quake2, etc, etc\n";
- exit -1;
-}
-
-my($serv) = $ARGV[0];
-my($port) = $ARGV[1];
-my($game) = $ARGV[2];
-
-if ( ! open(QSTAT, "$qstat -raw : -default $game $serv:$port |") ) {
- print STDERR "Couldn't exec $qstat\n";
- exit -2;
-}
-
-my($users);
-while(<QSTAT>) {
- ($users) = (split(/:/))[6];
- last;
-}
-close(QSTAT);
-
-print "$users\n";
-print "$users\n";
-print "0\n";
-print "$serv:$port\n";
-
-
diff --git a/src/contrib/linux_stat/linux_stats.pl b/src/contrib/linux_stat/linux_stats.pl
deleted file mode 100644
index 5459de2..0000000
--- a/src/contrib/linux_stat/linux_stats.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/perl -Tw
-####################################################################
-# linux_stats.pl 1.0 Mike Machado #
-# mike@innercite.com #
-# 2000-07-19 #
-# #
-# Script to read traffic stats off linux 2.2 and greater systems #
-# #
-####################################################################
-use strict;
-
-
-
-#### Options ####
-my $uptimeprog = '/usr/bin/uptime'; # Set to program to give system uptime
-my $hostnameprog = '/bin/hostname'; # Set to program to give system hostname
-my $defaultinterface = 'eth0'; # Set to default interface
-my $defaultstatfile = '/proc/net/dev'; # Set to traffic stats file location
-
-
-##### Nothing below here should have to be changed #####
-
-if (@ARGV && $ARGV[0] eq '-h') {
- print "Usage: linux_stats.pl [interface] [stats file]\n";
- print "\tIf left blank 'eth0' and '/proc/net/dev' are used\n";
- print "\tInterface of 'ALL' will total all interface traffic, excluding lo\n";
- exit;
-}
-
-my $interface = shift || $defaultinterface;
-my $statfile = shift || $defaultstatfile;
-
-# Clear path and get uptime
-delete $ENV{PATH};
-delete $ENV{BASH_ENV};
-my $uptime = `$uptimeprog`;
-chomp($uptime);
-my $hostname = `$hostnameprog`;
-chomp($hostname);
-
-my ($in, $out, $found);
-open(STATS, $statfile) || die "Cannot open $statfile: $!\n";
-while (<STATS>) {
- my $line = $_;
- chomp($line);
- if (uc($interface) eq 'ALL') {
- if ($line =~ /^\s+(.*):\s*(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+$/) {
- next if $1 eq 'lo';
- $in += $2;
- $out += $3;
- $found++;
- }
- } else {
- if ($line =~ /^\s*$interface:\s*(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+$/) {
- $in = $1;
- $out = $2;
- $found = 1;
- last;
- }
- }
-}
-close(STATS);
-
-if (!$found) {
- print "0\n0\n$uptime\n$hostname: Unknown Interface: $interface\n";
-} else {
- print "$in\n$out\n$uptime\n$hostname: Interface: $interface";
- if (uc($interface) eq 'ALL') {
- print " (counted $found interface";
- if ($found > 1) {
- print "s";
- }
- print ")";
- }
- print "\n";
-}
diff --git a/src/contrib/linux_stat/readme b/src/contrib/linux_stat/readme
deleted file mode 100644
index 861b2a7..0000000
--- a/src/contrib/linux_stat/readme
+++ /dev/null
@@ -1,9 +0,0 @@
-
-I could not find a simple script to get the current traffic off a linux
-machine, so in open source sprit, I wrote my own. Here it is to share with
-all those looking for such a tool.
-
-Mike Machado
-mike@innercite.com
-InnerCite
-Network Specialist
diff --git a/src/contrib/meminfo/README b/src/contrib/meminfo/README
deleted file mode 100644
index 4a9a785..0000000
--- a/src/contrib/meminfo/README
+++ /dev/null
@@ -1,9 +0,0 @@
-From: Colin Tinker <g1gsw@linux.g1gsw.ampr.org>
-Date: Sat, 15 Jan 2000 20:23:32 -0000
-
-You may like to include the perl script below in the next
-release someone may find it useful. It checks /proc/meminfo for the used
-and free memory parsing it out for MRTG. it is my first attempt at a perl
-program so if any one can suggest any improvements feel free.
-
-Colin Tinker
diff --git a/src/contrib/meminfo/memory.pl b/src/contrib/meminfo/memory.pl
deleted file mode 100644
index 1c90e77..0000000
--- a/src/contrib/meminfo/memory.pl
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/perl
-# This small utility is used to collect the available memory and
-# used memory. For free memory, it sums the free, cached and buffers.
-
-# You must enable the "gauge" feature to have a proper graph
-# as those numbers do not grow
-#
-# Colin Tinker
-# g1gsw@titanic.demon.co.uk
-
-# setup local vars
-
-my($machine);
-
-# Enter default macine name here
-
-$machine = "g1gsw.ampr.org";
-
-# This allows command args to override defaults listed above
-
-if (scalar(@ARGV) > 1 )
- {
- print("USAGE: memory.pl {machine}\n");
- exit(-1);
- }
-
- if ($ARGV[0] ne '' && $ARGV[0] ne '#')
- {
-
- $machine = $ARGV[0];
- }
-
-# Calculate free memory
-
- $getfree = `cat /proc/meminfo | grep Mem:`;
- $getfree =~ /^Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/;
-
-# Each (\D+) = $1 or $2 or $3 etc
-
- $outfree = $3;
- $outbuffers = $5;
- $outcached = $6;
-
-# Total free memory
-
- $gettotal = $outfree+$outcached+$outbuffers;
- print $gettotal."\n";
-
-# Get used memory free
-
- $getused = `cat /proc/meminfo | grep Swap:`;
- $outused = $1-$gettotal;
- print $outused."\n";
-
-# Get uptime
-
- $getuptime = `/usr/bin/uptime`;
-
-# Parse though getuptime and get data
- $getuptime =~ /^\s+(\d{1,2}:\d{2}..)\s+up\s+(\d+)\s+(\w+),/;
-
-#Print getuptime data for mrtg
-
- print $2." ".$3."\n";
-
-# Print machine name for mrtg
-
- print $machine."\n";
diff --git a/src/contrib/monitor/Monitor.mdb b/src/contrib/monitor/Monitor.mdb
deleted file mode 100644
index 43f1fe5..0000000
--- a/src/contrib/monitor/Monitor.mdb
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/config.asp b/src/contrib/monitor/config.asp
deleted file mode 100644
index d946463..0000000
--- a/src/contrib/monitor/config.asp
+++ /dev/null
@@ -1,274 +0,0 @@
-<% @LANGUAGE="VBSCRIPT" %>
-<% Response.Expires = 0 %>
-<% Server.ScriptTimeout = 1200 %>
-<!-- #INCLUDE FILE="monitor.inc" -->
-<%
- If ID = "" Then
- Response.Redirect(NoAuthURL)
- End If
-
- ' We only execute this code if the user actually submitted the configuration form from the page.
- If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
-
- ' Get the values that he or she entered at the configuration page.
- Password = Request.Form("Password") ' The circuit password.
- NewPassword = Request.Form("NewPassword") ' Change password.
- NewConfirmedPassword = Request.Form("ConfirmPassword") ' Change password confirmation.
- EMail = Request.Form("TechEMail") ' Technical E-Mail address.
- Graph_Daily = Request.Form("Daily_Graph") ' Display Daily Graphs.
- Graph_Weekly = Request.Form("Weekly_Graph") ' Display Weekly Grahps.
- Graph_Monthly = Request.Form("Monthly_Graph") ' Dispaly Monthly Graphs.
- Graph_Yearly = Request.Form("Yearly_Graph") ' Display Yearly Graphs.
-
- ' Check Graph_Daily
- If Graph_Daily = "" Then
- Graph_Daily = 0
- Else
- Graph_Daily = 1
- End If
-
- ' Check Graph_Weekly
- If Graph_Weekly = "" Then
- Graph_Weekly = 0
- Else
- Graph_Weekly = 1
- End If
-
- ' Check Graph_Monthly
- If Graph_Monthly = "" Then
- Graph_Monthly = 0
- Else
- Graph_Monthly = 1
- End If
-
- ' Check Graph_Yearly
- If Graph_Yearly = "" Then
- Graph_Yearly = 0
- Else
- Graph_Yearly = 1
- End If
-
- ' Did the user enter his or her password?
- If Password = "" Then ' We dont have a password!
- Error = "Please Enter Your Password"
- End If
-
- ' Now that we have the password, compare in in the database...
- set rsPassword = DBConn.Execute("SELECT LinePassword FROM Monitor_Authenticate WHERE ID=" & ID)
-
- TempPass = rsPassword("LinePassword") ' Get the password in the database.
-
- rsPassword.close ' Close the lookup record.
- Set rsPassword = Nothing
-
- If Password <> TempPass Then ' The password did not match the database.
- Error = "Invalid Password"
- End If
-
- If NewPassword <> "" Then ' Compare the NewPassword with the
- ' ConfirmedPassword...
- If NewPassword <> NewConfirmedPassword Then ' The two password do not match.
- Error="Your Passwords Did Not Match"
- Else
- Password = NewPassword ' Set the new password to be updated in the
- ' database.
- End If
- End If
-
-
- If Error = "" Then ' If we do not have a error, everything is
- ' well, lets update the records.
-
- If ID <> 1 Then ' ID 1 is the guest account, dont update the
- ' database.
- set rsUpdate = DBConn.Execute("UPDATE Monitor_Authenticate SET LinePassword='" & Password & "', " &_
- "EMail_Address='" & EMail & "', " &_
- "Graph_Day=" & Graph_Daily & ", " &_
- "Graph_Week=" & Graph_Weekly & ", " &_
- "Graph_Month=" & Graph_Monthly & ", " &_
- "Graph_Year=" & Graph_Yearly &_
- " WHERE (ID=" & ID & ")")
-
- Set rsUpdate = nothing ' Database update successfull.
-
- End If
-
- ' Update Session information...
- Session("DBLinePassword") = Password ' Update the password for the session.
- Session("DBEMail_Address") = EMail ' Update the E-Mail for the session.
- If Graph_Daily = 1 Then ' Daily Graph
- Session("DBGraph_Day") = True
- Else
- Session("DBGraph_Day") = False
- End If
- If Graph_Weekly = 1 Then ' Weekly Graph
- Session("DBGraph_Week") = True
- Else
- Session("DBGraph_Week") = False
- End If
- If Graph_Monthly = 1 Then ' Monthly Graph
- Session("DBGraph_Month") = True
- Else
- Session("DBGraph_Month") = False
- End If
- If Graph_Yearly = 1 Then ' Yearly Graph
- Session("DBGraph_Year") = True
- Else
- Session("DBGraph_Year") = False
- End If
-
- Response.Redirect(MonitorURL) ' Everything is updated, go back to
- ' monitor.
- End If
-
- End If
-%>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta http-equiv="Cache-Control" content="No Cache">
-<meta http-equiv="Pragma" content="No Cache">
-<meta http-equiv="Expires" content="0">
-<link rel="StyleSheet" href="global/main.css" type="text/css">
-<style type="text/css">
-<!--
-a:link { color: #003399 }
-a:visited { color: #003399 }
-a:hover { color: red }
--->
-</style>
-</head>
-<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onload="Clock()">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top" align="left"><font size="1"><img src="/images/spacer.gif" width="53" height="22" alt></font></td>
- <td valign="top" align="left" width="100%">
- <p class="HEADING"><span class="HEADING">Monitor Configuration For Circuit Number: <%= LineNumber %></span></td>
- </tr>
- <tr>
- <td valign="middle" align="left" colspan="2"><font size="1"><img border="0" src="/images/spacer.gif" width="110" height="19"><a href="default.asp?mode=logout">Logout
- of Monitor</a><img border="0" src="/images/spacer.gif" width="25" height="19"><a href="login.asp">Bandwidth Details</a></font></td>
- </tr>
- </table>
- <hr>
- <div align="left">
- <table border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top" align="left"><font size="1">Circuit Number:</font></td>
- <td valign="top" align="left"><font size="1"><%= LineNumber %></font></td>
- <td valign="top" align="left"><font size="1"><img border="0" src="/images/spacer.gif" width="10" height="10"></font></td>
- <td valign="top" align="left"><font size="1">Circuit Speed:</font></td>
- <td valign="top" align="left"><font size="1"><%= LineSpeed %> <i>bps</i></font></td>
- <td valign="top" align="left"><font size="1"><img border="0" src="/images/spacer.gif" width="10" height="10"></font></td>
- <td valign="top" align="left"><font size="1">Technical Contact:</font></td>
- <td><a href="mailto:<%= EMail_Address %>"><font size="1"><%= EMail_Address %></font></a></td>
- </tr>
- <tr>
- <td colspan="8" valign="top" align="left"><font size="1">You Last Visited Monitor On: <%= LastVisit %></font></td>
- </tr>
- </table>
- </div>
- <hr>
- <%' Do we have a error that the user needs to know about?
- If Error <> "" Then %>
- <p class="COLUMNRED"><font size="1"><%= Error %></font></p>
- <% End If %>
-
- <p><font size="1">Please take note, for your changes to take affect, you must enter your password in the first password field.&nbsp; If you wish to change your
- password, you may then also complete the &quot;New Password&quot; and &quot;Confirm Password&quot; fields.</p>
- <form action="/config.asp" method="POST">
- <div align="left">
- <table border="0" cellpadding="2" cellspacing="1" width="822">
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Your Password:</font></td>
- <td valign="top" width="106"><font size="1"><input type="password" name="Password" size="20" class="INPUT"></font></td>
- </font>
- <td valign="middle">
- <p class="COLUMNRED">Required For <b>ANY</b> changes to be made</td>
- </tr>
- <font size="1">
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Change Your Password:</font></td>
- <td valign="top" width="106"><font size="1"><input type="password" name="NewPassword" size="20" class="INPUT"></font></td>
- <td valign="middle"><font size="1">New Password</font></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">&nbsp;</font></td>
- <td valign="top" width="106"><font size="1"><input type="password" name="ConfirmPassword" size="20" class="INPUT"></font></td>
- <td valign="middle"><font size="1">Confirm Password</font></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Technical Contact E-Mail Address:</font></td>
- <td valign="top" width="106"><font size="1"><input type="text" name="TechEMail" size="20" value="<%= EMail_Address %>" class="INPUT"></font></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Show The Daily Graph:</font></td>
- <td valign="top" width="106"><font size="1"><input type="checkbox" name="Daily_Graph" value="1" <% if graph_day = true then%>checked <% end if%>></font></td>
- <td valign="top"></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Show The Weekly Graph:</font></td>
- <td valign="top" width="106"><font size="1"><input type="checkbox" name="Weekly_Graph" value="1" <% if graph_week = true then %>checked<% end if %>></font></td>
- <td valign="top"></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Show The Monthly Graph:</font></td>
- <td valign="top" width="106"><font size="1"><input type="checkbox" name="Monthly_Graph" value="1" <% if graph_month = true then %>checked<% end if %>></font></td>
- <td valign="top"></td>
- </tr>
- <tr>
- <td align="right" valign="top" width="210"><font size="1">Show The Yearly Graph:</font></td>
- <td valign="top" width="106"><font size="1"><input type="checkbox" name="Yearly_Graph" value="1" <% if graph_year = true then %>checked<% end if %>></font></td>
- <td valign="top"></td>
- </tr>
- <tr>
- <td align="center" valign="top" colspan="2" width="322">
- <p align="center"><input type="submit" value="Update Configuration" name="UPDATE" class="BUTTON"></td>
- <td valign="top"></td>
- </tr>
- </form>
- </table>
- </div>
- <hr>
- </font></td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td>
- <div align="left">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" valign="top" align="center">
- <p align="center"><font size="1"><b>©2000 <a href="mailto:cgknipe@mweb.co.za">Chris Knipe</a>.&nbsp; All Rights Reserved.</b></font></td>
- </tr>
- <tr>
- <td valign="top" align="right"><br>
- <img border="0" src="images/msie.gif" width="88" height="31"><img border="0" src="images/msprod.gif" width="88" height="31"><img border="0" src="images/spacer.gif" width="5" height="10"></td>
- <td width="100%" valign="top" align="left">&nbsp;
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="63"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-l.gif" width="63" height="25"></a></td>
- <td width="25"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt="MRTG" border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-m.gif" width="25" height="25"></a></td>
- <td width="388"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-r.gif" width="388" height="25"></a></td>
- </tr>
- </table>
- <SPACER TYPE=VERTICAL SIZE=4>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr valign="top">
- <td><font face="Arial,Helvetica" size="2"><a href="http://tobi.oetiker.ch">Tobias Oetiker</a> <a href="mailto:tobi@oetiker.ch">&lt;tobi@oetiker.ch&gt;</a>
- and&nbsp;<a href="http://www.bungi.com">Dave&nbsp;Rand</a>&nbsp;<a href="mailto:dlr@bungi.com">&lt;dlr@bungi.com&gt;</a></font></td>
- </tr>
- </table>
- <p>&nbsp;</td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
-</body>
-</html>
diff --git a/src/contrib/monitor/default.asp b/src/contrib/monitor/default.asp
deleted file mode 100644
index ef86161..0000000
--- a/src/contrib/monitor/default.asp
+++ /dev/null
@@ -1,254 +0,0 @@
-<% @LANGUAGE="VBSCRIPT" %>
-<% Response.Expires = 0 %>
-<% Server.ScriptTimeout = 1200 %>
-<% On Error Resume Next %>
-<!-- #INCLUDE FILE="monitor.inc" -->
-<%
- ' Check if we have to log out...
- If Request.QueryString("mode") = "logout" Then
- ' Update the circuit access date
- ' Get the record ID to update
- LineID = Session("DBID")
-
- If LineID = "" Then ' The Session Expired
- Response.Redirect(LogOutURL)
- End If
-
- Set rsAuthenticate = DBConn.Execute("UPDATE Monitor_Authenticate SET LastVisit='" &_
- Month(Date()) & "/" & Day(Date()) & "/" &_
- Year(Date()) & " " & Time &"' WHERE (ID=" & LineID & ")")
- Session.Abandon
- Response.Redirect(LogOutURL)
- End If
-
-' Status is a universal indicator implemented to show us which part of the authentication process is
-' failing.
-' For now, Status has the following values.
-' 0) No errors, everything was successfull.
-' 1) Circuit number not found in the database.
-' 2) The given password did not match for the circuit number.
-' 3) We are logged out and should redirect back to SunnyLine
-
-' We only execute this code if the user actually submitted the login form from the page.
-If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
-
- ' Get the values that he or she entered at the login page.
- Number = Request.Form("Number")
- Password = Request.Form("Password")
-
- ' Setup a default error code. We use a incorrect circuit number here.
- Status = 1
-
- ' Did The User Enter a circuit number & password?
- If Number = "" Then
- Status = 1 ' No circuit number
- Elseif Password = "" Then
- Status = 2 ' No password
- Else
- Status = 0 ' We have a circuit number & password, lets continue.
- End If
-
- ' If we have both circuit number and password, compare it to the database.
- If Status = 0 Then
-
- ' Pull the circuit number from the database.
- Set rsAuthenticate = DBConn.Execute("SELECT * FROM Monitor_Authenticate WHERE LineNumber=" & Number)
-
- Do While not rsAuthenticate.EOF
-
- ' We need to give DBPassword an initial value. If for instance, a client enteres a circuit
- ' number which is not located in the database, the lookup will fail and DBPassword won't have a
- ' value for us to compare to. The Rnd Function should be secure enough?
- DBPassword = Rnd(10)
- DBID = rsAuthenticate("ID")
- DBLine = rsAuthenticate("LineNumber")
- DBPassword = rsAuthenticate("LinePassword")
- DBSpeed = rsAuthenticate("LineSpeed")
- DBEMail = rsAuthenticate("EMail_Address")
- DBG_Day = rsAuthenticate("Graph_Day")
- DBG_Week = rsAuthenticate("Graph_Week")
- DBG_Month = rsAuthenticate("Graph_Month")
- DBG_Year = rsAuthenticate("Graph_Year")
- DBG_EMail = rsAuthenticate("Graph_EMail")
- DBDate = rsAuthenticate("LastVisit")
-
- If DBPassword = Password Then
-
- ' We got what we wanted, close the database connection... Just for incase.
- rsAuthenticate.close
- Set rsAuthenticate = nothing
-
- ' We setup the values inside the session before or after we move into monitor.
- ' This is just so that we don't have to do the entire lookup process again at displaying the graps to the user, if
- ' we save the values now, we are able to reference any setting in the DataBase that we would need at any given time.
- Session("DBID") = DBID
- Session("DBLineNumber") = DBLine
- Session("DBLinePassword") = DBPassword
- Session("DBLineSpeed") = DBSpeed
- Session("DBEMail_Address") = DBEMail
- Session("DBGraph_Day") = DBG_Day
- Session("DBGraph_Week") = DBG_Week
- Session("DBGraph_Month") = DBG_Month
- Session("DBGraph_Year") = DBG_Year
- Session("DBGraph_EMail") = DBG_EMail
- Session("DBLastVisit") = DBDate
-
- ' And we redirect !!
- Response.Redirect(MonitorURL)
-
- Else
-
- ' Passwords didnt match. We are not going to worry about incorrect circuit numbers, that
- ' will just make it easier for someone to maybe guess a line number if he or she has
- ' nothing better to do!
- Status = 2
- End If
-
- rsAuthenticate.MoveNext
-
- Loop
-
- ' If we are here, there was serious error. This means perhaps a incorrect curciut number and or
- ' incorrect password. In any case, the lookup did fail, and we have no reference what so ever to the given value for
- ' the circuit number or password. Close the database and send the user back to the login section.
- rsAuthenticate.close
- Set rsAuthenticate = nothing
- End If
-
-End If
-%>
-<html>
-<head>
-<meta http-equiv="Content-Language" content="en-za">
-<meta http-equiv="Cache-Control" content="No Cache">
-<meta http-equiv="Pragma" content="No Cache">
-<meta http-equiv="Expires" content="0">
-<title>Welcome To Monitor!!</title>
-<link rel="StyleSheet" href="global/default.css" type="text/css">
-<link rel="StyleSheet" href="global/additional.css" type="text/css">
-</head>
-
-<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onload="Clock()">
-<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top">
-
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top" align="left"><font size="1"><img src="images/spacer.gif" width="53" height="52" alt></font></td>
- <td valign="top" align="left" width="100%">
- <h1><span class="HEADING"><font face="Verdana,Arial,Helvetica" size="1">Welcome to Monitor.SunnyLine.co.za</font></span></h1>
- </td>
- </tr>
-</table>
-
-<p><font size="1">Congratulations on the purchase of your high-speed permanent connections to the Internet.&nbsp; Please take a moment and log on to our monitoring system
-to see you bandwidth usage.</font></p>
-
-<p><font size="1">Your Circuit number will be the number printed on your Data Unit installed by Telkom (The small black box where your NTU or Modem plugs into).&nbsp; If
-you have any problems locating your Circuit number, or have problems authenticating with this service, please contact us for immediate assistance at <a href="mailto:support@sunnyline.co.za">support@sunnyline.co.za</a></font></p>
-
-<p><font size="1">Wondering what is Monitor! Well, don't worry, read up all about monitor by clicking <a href="/monitor.html">here</a>.</p>
-<form method="POST" action="default.asp">
- <div align="center">
- <center>
- <table border="0" cellpadding="2" cellspacing="1">
- <tr>
- <td>
- <div align="right">
- <p><font size="1">Circuit Number:</font>
- </div>
- </td>
- <td><font size="1"><input type="text" name="Number" size="20" value="<%= Number %>"></font></td>
- <td>
- <div align="left">
- <p><b><font color="#FF0000" size="1"><% If Status = 1 Then
- Response.Write ("Invalid Circuit Number!!!")
- End If %></font></b>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <div align="right">
- <p><font size="1">Your Password:</font>
- </div>
- </td>
- <td><font size="1"><input type="password" name="Password" size="20" maxlength="8"></font></td>
- <td>
- <div align="left">
-
- <p><b><font color="#FF0000" size="1"><% If Status = 2 Then
- Response.Write ("Invalid Password!!!")
- End If %></font></b>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center"><font size="1"><input type="submit" value="Submit" class="BUTTON"></font></td>
- <td></td>
- </tr>
- </table>
- </center>
- </div>
-</form>
-
-&nbsp;
-<div align="center">
- <center>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td colspan="2">
- <p class="Greenhead" align="center"><font size="1">Guest Users:</font></td>
- </tr>
- <tr>
- <td align="right"><font size="1">Please log in with Circuit Number:&nbsp;</font></td>
- <td align="left"><font size="1"><b>1234567890</b></font></td>
- </tr>
- <tr>
- <td align="right"><font size="1">and Password:&nbsp;</font></td>
- <td align="left"><font size="1"><b>12345678</b></font></td>
- </tr>
- <tr>
- <td align="left" colspan="2">
- <p align="center"><font size="1">to see a demo of this service right now.</font></td>
- </tr>
- </table>
- </center>
-</div>
-&nbsp;</font>
-
-</td></tr></table>
-<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
-
-<div align="left">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" valign="top" align="center">
- <p align="center"><font size="1"><b>©2000 SunnyLine Internet Services.&nbsp; All Rights Reserved.</b></font></td>
- </tr>
- <tr>
- <td valign="top" align="right"><br>
- <img border="0" src="images/msie.gif" width="88" height="31"><img border="0" src="images/msprod.gif" width="88" height="31"><img border="0" src="images/spacer.gif" width="5" height="10"></td>
- <td width="100%" valign="top" align="left">&nbsp;
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="63"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="/images/mrtg-l.gif" width="63" height="25"></a></td>
- <td width="25"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt="MRTG" border="0" src="/images/mrtg-m.gif" width="25" height="25"></a></td>
- <td width="388"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="/images/mrtg-r.gif" width="388" height="25"></a></td>
- </tr>
- </table>
- <SPACER TYPE=VERTICAL SIZE=4>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr valign="top">
- <td><font face="Arial,Helvetica" size="2"><a href="http://ee-staff.ethz.ch/~oetiker">Tobias Oetiker</a> <a href="mailto:oetiker@ee.ethz.ch">&lt;oetiker@ee.ethz.ch&gt;</a>
- and&nbsp;<a href="http://www.bungi.com">Dave&nbsp;Rand</a>&nbsp;<a href="mailto:dlr@bungi.com">&lt;dlr@bungi.com&gt;</a></font></td>
- </tr>
- </table>
- <p>&nbsp;</td>
- </tr>
- </table>
-</div>
-
-</td></tr>
-</table></body>
-
-</html>
diff --git a/src/contrib/monitor/global.asa b/src/contrib/monitor/global.asa
deleted file mode 100644
index a3a1e53..0000000
--- a/src/contrib/monitor/global.asa
+++ /dev/null
@@ -1,25 +0,0 @@
-<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
-Sub Session_OnStart
- ' Make sure that new users start on the correct page.
- startPage = "/default.asp"
- currentPage = Request.ServerVariables("SCRIPT_NAME")
-
- ' Do a case-insensitive compare, and if they don't match, send the user to the start
- ' page.
- If strcomp(currentPage,startPage,1) then
- Response.Redirect(startPage)
- End If
-
-End Sub
-
-
-Sub Session_OnEnd
-
- ' Remove the temp images copied from the mrtg spool directory...
- Set fs = CreateObject("Scripting.FileSystemObject")
- fs.DeleteFile "c:\inetpub\monitor.sunnyline.co.za\images\mrtg\" &_
- Session("DBLINENUMBER") & "-*.gif"
-
-End Sub
-
-</SCRIPT> \ No newline at end of file
diff --git a/src/contrib/monitor/global/main.css b/src/contrib/monitor/global/main.css
deleted file mode 100644
index e31c960..0000000
--- a/src/contrib/monitor/global/main.css
+++ /dev/null
@@ -1,411 +0,0 @@
-BODY {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- font-size : 7.5pt;
- color : 000000;}
-
-.NNBold-MCSP {
- font : bold x-small Verdana, Arial, Helvetica, sans-serif;
- font-size : 7.5pt;
- font-weight : bold;
- color : 3366CC;
-}
-
-.NNBold-DA {
- font : bold x-small Verdana, Arial, Helvetica, sans-serif;
- font-size : 7.5pt;
- font-weight : bold;
- color : 003399;
-}
-
-.NNBold-Gen {
- font : bold x-small Verdana, Arial, Helvetica, sans-serif;
- font-size : 7.5pt;
- font-weight : bold;
- color : 000000;
-}
-
-.Greenhead {
- font : bold x-small Verdana, Arial, Helvetica, sans-serif;
- font-size : 7.5pt;
- font-weight : bold;
- color : 36B236;
- text-decoration : underline;
-}
-
-.HEADING {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : 000000;
- font-size : 10pt;
- font-weight : bold;
- }
-
-
-.SEARCH {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : 003399;
- font-size : 7.5pt;
-}
-
-.MCSP {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : 3366CC;
- font-size : 7.5pt;
-}
-
-.MSDA {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : 003399;
- font-size : 7.5pt;
-}
-
-.COLUMN {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : FFFFFF;
- font-size : 7.5pt;
- font-weight : bold;
-}
-
-.COLUMNRED {
- font : x-small Verdana, Arial, Helvetica, sans-serif;
- color : FF3300;
- font-size : 7.5pt;
- font-weight : bold;
-}
-
-.BUTTON {
- background : 6699CC;
- text-align : center;
- font-weight : bold;
- color : White;
- font : 10px;
- border-left-color : White;
- border-top-color : White;
- border-right-color : Black;
- border-bottom-color : Black;
-}
-
-.INPUT{
- height : 20px;
- width : 100px;
-}
-
-
-
-DIV.Jobs {
- position: relative;
- width : 310;
- height : 85;
- border : 1px solid;
- background-color:white;
- padding : 8px;
- text-align : left;
- border-bottom-color : 003399;
- border-color : 003399 003399 003399 003399;
- border-left-color : 003399;
- border-right-color : 003399;
- border-top-color : 003399;
-}
-
-
-A.MCSPLEVEL1 {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.MCSPLEVEL1:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.MCSPLEVEL1:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-
-A.MCSPLEVEL2 {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- font-weight : bold;
- text-decoration : underline;
-}
-A.MCSPLEVEL2:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- text-decoration:none;}
-A.MCSPLEVEL2:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:3366cc;
- cursor:hand;
- text-decoration:none;}
-A.MCSPLEVEL2:HOVER {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:underline;}
-
-A.DALEVEL1 {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.DALEVEL1:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.DALEVEL1:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-
-A.DALEVEL2 {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- font-weight : bold;
- text-decoration : underline;}
-
-A.DALEVEL2:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;}
-A.DALEVEL2:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;}
-A.DALEVEL2:HOVER {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:underline;}
-
-
-
-.HRRED {
- color:FF3300;
- height : 1px;}
-
-DIV.Menu {
- position:absolute;
- left:160;
- top: 200w;
- width: 150;
- border : 1px solid;
- background-color:white;
- padding : 3px;
- text-align : left;
- border-bottom-color : 003399;
- border-color : 003399 003399 003399 003399;
- border-left-color : 003399;
- border-right-color : 003399;
- border-top-color : 003399;
- padding-left : 10px;
- padding-right : 4px;
- padding-top : 4px;
- padding-bottom : 4px;
- }
-
-.STANDARD {
- font-size:8.5pt;
- line-height:10pt;
- color:000000;}
-
-.STANDARDSMALL {
- font-size:7.5pt;
- line-height:10pt;
- color:000000;}
-
-A.DEFAULT {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;}
-A.DEFAULT:VISITED {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;}
-A.DEFAULT:ACTIVE {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;}
-A.DEFAULT:HOVER {
- font-size:8.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;}
-
-A.DEFAULTSMALL {
- font-size:7.5pt;
- line-height:5pt;
- color:003399;
- cursor:hand;}
-A.DEFAULTSMALL:VISITED {
- font-size:7.5pt;
- line-height:5pt;
- color:003399;
- cursor:hand;}
-A.DEFAULTSMALL:ACTIVE {
- font-size:7.5pt;
- color:003399;
- line-height:5pt;
- cursor:hand;}
-A.DEFAULTSMALL:HOVER {
- font-size:7.5pt;
- line-height:5pt;
- color:FF3300;
- cursor:hand;}
-
-A.DEFAULTSMALLSUB {
- font-size:7.5pt;
- line-height:8pt;
- color:003399;
- cursor:hand;}
-A.DEFAULTSMALLSUB:VISITED {
- font-size:7.5pt;
- line-height:8pt;
- color:003399;
- cursor:hand;}
-A.DEFAULTSMALLSUB:ACTIVE {
- font-size:7.5pt;
- color:003399;
- line-height:8pt;
- cursor:hand;}
-A.DEFAULTSMALLSUB:HOVER {
- font-size:7.5pt;
- line-height:8pt;
- color:FF3300;
- cursor:hand;}
-
-
-
-A.BOLD {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.BOLD:VISITED {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.BOLD:ACTIVE {
- font-size:8.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.BOLD:HOVER {
- font-size:8.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:underline;
- font-weight:bold;}
-
-A.RED {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.RED:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.RED:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.RED:HOVER {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;
- text-decoration:underline;
- font-weight:bold;}
-
-A.LEVEL1 {
- font-size:7.5pt;
- line-height:10pt;
- color:black;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.LEVEL1:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:black;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-A.LEVEL1:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:black;
- cursor:hand;
- text-decoration:none;
- font-weight:bold;}
-
-A.LEVEL2 {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;}
-A.LEVEL2:VISITED {
- font-size:7.5pt;
- line-height:10pt;
- color:003399;
- cursor:hand;}
-A.LEVEL2:ACTIVE {
- font-size:7.5pt;
- line-height:10pt;
- color:black;
- cursor:hand;}
-A.LEVEL2:HOVER {
- font-size:7.5pt;
- line-height:10pt;
- color:FF3300;
- cursor:hand;
- text-decoration:underline;}
-
-
diff --git a/src/contrib/monitor/images/mrtg-l.gif b/src/contrib/monitor/images/mrtg-l.gif
deleted file mode 100644
index 11eb3d7..0000000
--- a/src/contrib/monitor/images/mrtg-l.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/mrtg-m.gif b/src/contrib/monitor/images/mrtg-m.gif
deleted file mode 100644
index ec4ee9a..0000000
--- a/src/contrib/monitor/images/mrtg-m.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/mrtg-r.gif b/src/contrib/monitor/images/mrtg-r.gif
deleted file mode 100644
index cc19bd6..0000000
--- a/src/contrib/monitor/images/mrtg-r.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/mrtg-ti.gif b/src/contrib/monitor/images/mrtg-ti.gif
deleted file mode 100644
index b5fdea1..0000000
--- a/src/contrib/monitor/images/mrtg-ti.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/msie.gif b/src/contrib/monitor/images/msie.gif
deleted file mode 100644
index 76b994a..0000000
--- a/src/contrib/monitor/images/msie.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/msprod.gif b/src/contrib/monitor/images/msprod.gif
deleted file mode 100644
index a7f54a2..0000000
--- a/src/contrib/monitor/images/msprod.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/images/spacer.gif b/src/contrib/monitor/images/spacer.gif
deleted file mode 100644
index 7ab9a76..0000000
--- a/src/contrib/monitor/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/monitor/login.asp b/src/contrib/monitor/login.asp
deleted file mode 100644
index 64f8d0f..0000000
--- a/src/contrib/monitor/login.asp
+++ /dev/null
@@ -1,176 +0,0 @@
-<% @LANGUAGE="VBSCRIPT" %>
-<% Response.Expires = 0 %>
-<% Server.ScriptTimeout = 1200 %>
-<!-- #INCLUDE FILE="monitor.inc" -->
-<%
- If ID = "" Then ' The Session Expired
- Response.Redirect(NoAuthURL)
- End If
-
- Set fs = CreateObject("Scripting.FileSystemObject") ' FileSystemObject to copy graphs
-
- fs.CopyFile "c:\mrtg\targets\" & LineNumber & "-*.gif", "c:\InetPub\monitor.sunnyline.co.za\images\mrtg\"
-%>
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta http-equiv="Cache-Control" content="No Cache">
-<meta http-equiv="Pragma" content="No Cache">
-<meta http-equiv="Expires" content="0">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<link rel="StyleSheet" href="global/main.css" type="text/css">
-<style type="text/css">
-<!--
-a:link { color: #003399 }
-a:visited { color: #003399 }
-a:hover { color: red }
--->
-</style>
-</head>
-
-<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onload="Clock()">
-
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top" align="left"><font size="1"><img src="images/spacer.gif" width="53" height="22" alt></font></td>
- <td valign="top" align="left" width="100%">
- <p class="HEADING"><span class="HEADING">Bandwidth Statistics For Circuit Number: <%= LineNumber %></span></td>
- </tr>
- <tr>
- <td valign="middle" align="left" colspan="2"><font size="1"><img border="0" src="images/spacer.gif" width="110" height="19"><a href="default.asp?mode=logout">Logout
- of Monitor</a><img border="0" src="images/spacer.gif" width="25" height="19"><a href="/config.asp">Configure Monitor</a></font></td>
- </tr>
- </table>
- <hr>
- <div align="left">
- <table border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top" align="left"><font size="1">Circuit Number:</font></td>
- <td valign="top" align="left"><font size="1"><%= LineNumber %></font></td>
- <td valign="top" align="left"><font size="1"><img border="0" src="images/spacer.gif" width="10" height="10"></font></td>
- <td valign="top" align="left"><font size="1">Circuit Speed:</font></td>
- <td valign="top" align="left"><font size="1"><%= LineSpeed %> <i>bps</i></font></td>
- <td valign="top" align="left"><font size="1"><img border="0" src="images/spacer.gif" width="10" height="10"></font></td>
- <td valign="top" align="left"><font size="1">Technical Contact:</font></td>
- <td><a href="mailto:<%= EMail_Address %>"><font size="1"><%= EMail_Address %></font></a></td>
- </tr>
- <tr>
- <td colspan="8" valign="top" align="left"><font size="1">You Last Visited Monitor On: <%= LastVisit %></font></td>
- </tr>
- </table>
- </div>
- <hr>
- <% If Graph_Day = True Then %>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td valign="top">
- <p class="SEARCH" align="right"><font size="1"><b>Daily Graph<br>
- <img border="0" src="images/spacer.gif" height="10" width="100"></b></font></p>
- </td>
- <td valign="top"><font size="1"><img src="images/spacer.gif" width="10">Shows Your Bandwidth Usage Over the last&nbsp; 24 Hours</font></td>
- </tr>
- <tr>
- <td></td>
- <td><font size="1"><img src="/images/mrtg/<%= LineNumber%>-day.gif" alt="Daily Bandwidth Graph" width="380" height="130"></font></td>
- </tr>
- </table>
- <p>&nbsp;</p>
- <hr>
- <% End If %>
- <% If Graph_Week = True Then %>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td valign="top">
- <p class="SEARCH" align="right"><font size="1"><b>Weekly Graph<br>
- <img border="0" src="images/spacer.gif" height="10" width="100"></b></font></p>
- </td>
- <td valign="top"><font size="1"><img src="images/spacer.gif" width="10">Shows Your Bandwidth Usage Over the Last 7 Days</font></td>
- </tr>
- <tr>
- <td></td>
- <td><font size="1"><img src="/images/mrtg/<%= LineNumber%>-week.gif" alt="Weekly Bandwidth Graph" width="380" height="130"></font></td>
- </tr>
- </table>
- <p><font size="1"><br>
- </font></p>
- <hr>
- <% End If %>
- <% If Graph_Month = True Then %>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td valign="top">
- <p class="SEARCH" align="right"><font size="1"><b>Monthly Graph<br>
- <img border="0" src="images/spacer.gif" height="10" width="100"></b></font></p>
- </td>
- <td valign="top"><font size="1"><img src="images/spacer.gif" width="10">Shows Your Bandwidth Usage Over The Last Month</font></td>
- </tr>
- <tr>
- <td></td>
- <td><font size="1"><img src="/images/mrtg/<%= LineNumber%>-month.gif" alt="Monthly Bandwidth Graph" width="380" height="130"></font></td>
- </tr>
- </table>
- <p>&nbsp;</p>
- <hr>
- <% End If %>
- <% If Graph_Year = True Then %>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td valign="top">
- <p class="SEARCH" align="right"><font size="1"><b>Yearly Graph<br>
- <img border="0" src="images/spacer.gif" height="10" width="100"></b></font></p>
- </td>
- <td valign="top"><font size="1"><img src="images/spacer.gif" width="10">Shows Your Bandwidth Usage Over The Last Year</font></td>
- </tr>
- <tr>
- <td></td>
- <td><font size="1"><img src="/images/mrtg/<%= LineNumber%>-year.gif" alt="Yearly Bandwidth Graph" width="380" height="130"></font></td>
- </tr>
- </table>
- <p>&nbsp;</p>
- <hr>
- <% End If %>
- </td>
- </tr>
-</table>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td>
- <div align="left">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" valign="top" align="center">
- <p align="center"><font size="1"><b>©2000 <a href="mailto:cgknipe@mweb.co.za">Chris Knipe</a>.&nbsp; All Rights Reserved.</b></font></td>
- </tr>
- <tr>
- <td valign="top" align="right"><br>
- <img border="0" src="images/msie.gif" width="88" height="31"><img border="0" src="images/msprod.gif" width="88" height="31"><img border="0" src="images/spacer.gif" width="5" height="10"></td>
- <td width="100%" valign="top" align="left">&nbsp;
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="63"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-l.gif" width="63" height="25"></a></td>
- <td width="25"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt="MRTG" border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-m.gif" width="25" height="25"></a></td>
- <td width="388"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-r.gif" width="388" height="25"></a></td>
- </tr>
- </table>
- <SPACER TYPE=VERTICAL SIZE=4>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr valign="top">
- <td><font face="Arial,Helvetica" size="2"><a href="http://ee-staff.ethz.ch/~oetiker">Tobias Oetiker</a> <a href="mailto:oetiker@ee.ethz.ch">&lt;oetiker@ee.ethz.ch&gt;</a>
- and&nbsp;<a href="http://www.bungi.com">Dave&nbsp;Rand</a>&nbsp;<a href="mailto:dlr@bungi.com">&lt;dlr@bungi.com&gt;</a></font></td>
-
- </tr>
- </table>
- <p>&nbsp;</td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-</body>
-</html>
diff --git a/src/contrib/monitor/monitor.html b/src/contrib/monitor/monitor.html
deleted file mode 100644
index e0e57e1..0000000
--- a/src/contrib/monitor/monitor.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Language" content="en-za">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-</head>
-
-<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
-
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td valign="top" align="left"><font size="1"><img src="/images/spacer.gif" width="53" height="52" alt></font></td>
- <td valign="top" align="left" width="100%">
- <h1><span class="HEADING"><font face="Verdana,Arial,Helvetica" size="1">What is Monitor.SunnyLine.co.za?</font></span></h1>
- </td>
- </tr>
- </table>
-
- <p><font size="1">Monitor is a bandwidth monitoring system implemented by SunnyLine Internet Services.</font>
-
- <p><font size="1">With the use of Monitor! we allow our customers to see real-time statistics about their bandwidth usage.&nbsp; Monitor creates detailed graphs based
- on a daily, weekly, monthly, and yearly bases, graphing your in- and outgoing bandwidth usage.&nbsp; Monitor also aids in the detection and prevention of Network
- Congestion (or lag), by allowing Network Administrators to see possible network bottlenecks before they actually happen.</font></p>
-
- <p><font size="1">Monitor is a value added services from SunnyLine Internet Services for all of their Leased Line clients with permanent connections.&nbsp; Due to the
- manner in which Network Data is being monitored, we are unable to provide information on dial-up ports.&nbsp; At least for now.</font></p>
-
- <p><font size="1">MRTG consists of a Perl script which uses SNMP to read the traffic counters of your routers and a fast C program which logs the traffic data and
- creates beautiful graphs representing the traffic on the monitored network connection. These graphs are embedded into WebPages which can be viewed from any modern
- Web-browser.&nbsp; In addition to a detailed daily view, MRTG also creates visual representations of the traffic seen during the last seven days, the last four weeks
- and the last twelve months. This is possible because MRTG keeps a log of all the data it has pulled from the router. This log is automatically consolidated, so that it
- does not grow over time, but still contains all the relevant data for all the traffic seen over the last two years. This is all performed in an efficient manner.
- Therefore you can monitor 50 or more network links from any halfway decent UNIX box.</font></p>
-
- <p><font size="1">MRTG is not limited to monitoring traffic though, it is possible to monitor any SNMP variable you choose. You can even use an external program to
- gather the data which should be monitored via MRTG. People are using MRTG, to monitor things such as System Load, Login Sessions, Modem availability and more. MRTG even
- allows you to accumulate two or more data sources into a single graph.</font></p>
- &nbsp;</td>
- </tr>
-</table>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td>
- <div align="left">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" valign="top" align="center">
- <p align="center"><font size="1"><b>©2000 <a href="mailto:cgknipe@mweb.co.za">Chris Knipe</a>.&nbsp; All Rights Reserved.</b></font></td>
- </tr>
- <tr>
- <td valign="top" align="right"><br>
- <img border="0" src="images/msie.gif" width="88" height="31"><img border="0" src="images/msprod.gif" width="88" height="31"><img border="0" src="images/spacer.gif" width="5" height="10"></td>
- <td width="100%" valign="top" align="left">&nbsp;
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="63"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-l.gif" width="63" height="25"></a></td>
- <td width="25"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt="MRTG" border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-m.gif" width="25" height="25"></a></td>
- <td width="388"><a href="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><img alt border="0" src="http://monitor.internal.sunnyline.co.za/images/mrtg-r.gif" width="388" height="25"></a></td>
- </tr>
- </table>
- <SPACER TYPE=VERTICAL SIZE=4>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr valign="top">
- <td><font face="Arial,Helvetica" size="2"><a href="http://ee-staff.ethz.ch/~oetiker">Tobias Oetiker</a> <a href="mailto:oetiker@ee.ethz.ch">&lt;oetiker@ee.ethz.ch&gt;</a>
- and&nbsp;<a href="http://www.bungi.com">Dave&nbsp;Rand</a>&nbsp;<a href="mailto:dlr@bungi.com">&lt;dlr@bungi.com&gt;</a></font></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-</body>
-</html> \ No newline at end of file
diff --git a/src/contrib/monitor/monitor.inc b/src/contrib/monitor/monitor.inc
deleted file mode 100644
index 2418093..0000000
--- a/src/contrib/monitor/monitor.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-<%
- ' Create ADO connection component to connect with our SQL database.
- Set DBConn = Server.CreateObject("ADODB.Connection")
- DBConn.Open "DSN=SunnyLine"
-
- ' Redirection URLs used.
- LogOutURL = "/default.asp" ' The URL we redirect to when someone logs out of montior.
- MonitorURL = "/login.asp" ' The URL we redirect to after a successfull circuit number has been identified.
- NoAuthURL = "/default.asp" ' The URL we redirect to when we don't have a database ID for the account anymore.
-
- ' The session Details
- ID = Session("DBID") ' DataBase Entry ID.
- LineNumber = Session("DBLINENUMBER") ' Circuit Number.
- LinePassword = Session("DBLINEPASSWORD") ' Circuit Password.
- LineSpeed = Session("DBLINESPEED") ' Circuit Speed.
- EMail_Address = Session("DBEMAIL_ADDRESS") ' Contact E-Mail Address.
- Graph_Day = Session("DBGRAPH_DAY") ' Daily Graphs.
- Graph_Week = Session("DBGRAPH_WEEK") ' Weekly Graphs.
- Graph_Month = Session("DBGRAPH_MONTH") ' Monthly Graphs.
- Graph_Year = Session("DBGRAPH_YEAR") ' Yearly Graphs.
- LastVisit = Session("DBLASTVISIT") ' Last Time Visited.
-%> \ No newline at end of file
diff --git a/src/contrib/monitor/readme.txt b/src/contrib/monitor/readme.txt
deleted file mode 100644
index 877ea3f..0000000
--- a/src/contrib/monitor/readme.txt
+++ /dev/null
@@ -1,139 +0,0 @@
-Monitor v.1.1b
-~~~~~~~~~~~~~~
-Hi, welcome to the world of Monitor. This is my first ASP based contribution towards the Internet community at large, but
-I hope that there will be lots more to come.
-
-Monitor is a system designed by me with the use of MRTG. This application will be of most use to Internet Service Providers
-who may have a range of clients on Lease Lines running from their backbone. The system uses a database which keeps record
-of all the customers who have Leased Lines.
-
-The database holds the following information:
- LineNumber (Or Circuit Number)
- LinePassword (A Password Protecting The Circuit On Monitor)
- EMail_Address (This will be used in a later version)
- Graph_Day (Enable The Daily Graph)
- Graph_Week (Enable The Weekly Graph)
- Graph_Month (Enable The Monthly Graph)
- Graph_Year (Enable The Yearly Graph)
- Graph_EMail (This will be used in a later version)
-
-With this information, Monitor provides an easy way for clients to see and monitor their traffic usage after logging into
-the monitoring system. The users are then also provided with the option to customise the layout of their monitoring system,
-allowing them to only see the graphs that they need.
-
-Because this is a ASP application, the system has to be hosted on Windows NT Server, or a Unix based server that supports
-ASP code. For Unix based servers (or if this application is ported to the PHP3 Lanuage), the database routines will need
-to be redone. Unix' clones will almost certainly not support the same database methods as NT (This application is designed
-to work with Microsoft's ADO engine for interest sakes).
-
-
-
-What's Included:
-~~~~~~~~~~~~~~~~
-I've included the following files in the distribution:
- config.asp - This is the ASP file where clients can customise the output from the Monitoring system.
- default.asp - This is the ASP file where the authentication process will happen.
- global.asa - global.asa takes care of the deletation of the graph images when a session is abandoned or
- expires. We also make sure here that users start on the correct page when entering the
- web site at any point or file.
- login.asp - After successfull authentication, this page displays the graphs to the users.
- monitor.html - A page that you can use to explain the service to your clients.
- monitor.inc - This file holds reference to the Database connection strings, aswell as Session information.
- readme.txt - You're reading it.
- monitor.mdb - The Database provided in Microsoft Access 2000 format. (Please read below for more
- information.)
-
-
-
-Setup:
-~~~~~~
-Firstly, for the setup of this application on a NT based server, you need to install MRTG on Windows, and have this working.
-If you want for some reason not to run MRTG from Windows NT, then please use Samba file sharing, and MAP THE DRIVE to the
-Windows NT machine that will host the web pages. NT will need PHYSICAL FILE ACCESS to the files (Read Only Access will be
-sufficient).
-
-Next, you can take the database (Monitor.mdb), and place this somewhere on your system. The location of the database does
-not matter that much, seeing that you need to setup a ODBC DataSource Name (DSN), to point the the database file. If you
-do not want to use DSN connections, have a look in Monitor.inc and change the DSN entry there to point to the file path
-(DBQ entry). You will also need to change Monitor.inc to have the correct DSN name in for the DSN you have just created.
-
-Thirdly, you need to setup a bit of file permissions. This is more than likely the trickiest part of the installation.
-
-Because MRTG graphs are updated dynamically, we need to implement a system where the graphs are stored OUTSIDE of the web
-server. We need the graphs outside the web server, so that people can't just link to the images on the monitoring system
-with a simple <img src="...."> tag in ther html on a local web server. This is accomplished with the use of the built in
-ASP objects CopyFile and DeleteFile. After a successfull login occured, the ASP code will copy the images (all four -
-daily, weekly, monthly, and yearly), from a pre determined MRTG "spool" directory. This directory will be a global
-directory where MRTG saves the images from it's targets. It can either be a share that is mapped to the local server, or a
-local path on the Windows NT host. You need to explictly give the Iusr_machinename user (or the user under which the IIS
-process run), READ access on both the directory, aswell as all the files within.
-
-This will allow the ASP code, to read the binary images from the directory, and copy them to inside the web site. Next,
-what you need to do permission wise, is assign READ, WRITE, and DELETE permissions on both the file and directory inside the
-Monitor web site, where the target images will be copied to. In this example package, the images are copied to the
-images/mrtg/ folder.
-
-Once you have your database setup, and the file permissions set up correctly, the site should work. After login, the
-application will copy the files from the MRTG spool directory, into it's target directory. The graphs will then be
-displayed to the user, and will reside on the web server for as long as the session exist. Once the user logs out, or
-when the session expires, the ASP code will automatically issue the DeleteFiles directive which removes the images that
-are copied from the MRTG spool directory after the user has logged in. The images are re-copied at every refresh of the
-page, so this will also ensure that images on the monitor web site will remain up-to-date, for as long as the client is
-logged into the system.
-
-The supplied database is in Access 2000 form. From what I've heard, Access 2000 is not compatible with older versions.
-Should you have troubles using this database, please upgrade to Access 2000. If this is a bit of a harsh thing to ask
-(which I also presume), I have decided to include an SQL Script for the creation of the database. The script is based on
-Microsoft SQL Server 6.5, but will give you a pretty good idea on how the database should look inside Access...
-
-
-
-Microsoft SQL 6.5 Database Script:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/****** Object: Table dbo.Monitor_Authenticate Script Date: 00/06/17 07:45:08 ******/
-CREATE TABLE dbo.Monitor_Authenticate (
- ID int IDENTITY (1, 1) NOT NULL ,
- LineNumber numeric(18, 0) NOT NULL ,
- LinePassword varchar (8) NOT NULL ,
- LineSpeed numeric(18, 0) NOT NULL ,
- EMail_Address varchar (50) NOT NULL ,
- Graph_Day bit NOT NULL ,
- Graph_Week bit NOT NULL ,
- Graph_Month bit NOT NULL ,
- Graph_Year bit NOT NULL ,
- Graph_EMail bit NOT NULL ,
- LastVisit datetime NULL ,
- Comment varchar (255) NULL
-)
-GO
-
-
-
-Bugs & Problems:
-~~~~~~~~~~~~~~~~
-Yes, there are a few of them inside the code at the date when I released this. Although they are nothing serious, I feel
-that you should take note of this.
-
- - Client Authentication: If the web user enteres a Curcuit number and password that do not exist in the database,
- the Database engine responds with an error. This will be fixed in a next release and
- is not a serious problem to overcome. Possible solution is to code in a additional
- if statement to check that the circuit number exist BEFORE the authentication process
- is initiated.
- - Client Passwords: The client password is limited in the database to 8 characters. A JavaScript or something
- similar should be implemented in the config page which will limit the passwords entered to
- 8 characters to reflect the limitation in the database. As it is now, the entire password
- is accepected, although only the first 8 are saved.
- - Date Formating: The 'LastVisit' date that is displayed on the pages needs to be re-formatted so that it is
- more readable. This change will more than likely be so that the dates will read:
- Mon, 19 June 2000, 20:13:11
-
-If there is anything else that is 'misbehaving' or that you believe can pose to be a problem, please do not hesitate to
-contact me where I will look into the matter, aswell as issue a update to the code should it be neccessary.
-
-
-
-Contacting me:
-~~~~~~~~~~~~~~
-Please feel free to contact me at any time by sending mail to cgknipe@mweb.co.za, I'm always looking forward to hearing
-from people who uses my code and appreciates the value of implementations done by me.
-
diff --git a/src/contrib/mrtg-archiver-script/README b/src/contrib/mrtg-archiver-script/README
deleted file mode 100644
index 245db9c..0000000
--- a/src/contrib/mrtg-archiver-script/README
+++ /dev/null
@@ -1,88 +0,0 @@
-MRTG Statistics Archiever
-Version 0.2
-Oleg Krotoff <krot@tnsplus.kz>
-16/06/2000
----------
-Intro and Disclaimer
-
-This script was written as a result of attempts to provide
-automatic archiving of graphs, generated by MRTG for all
-targets.
-
-I failed to customize the scripts written by Emanuele Leonardi
-<Emanuele.Leonardi@roma1.infn.it> and Rawlin Blake
-<blake@nevada.edu> (their scripts supplied with MRTG in contrib)
-so I wrote my own.
-
-The script provided "as-is", just because it may be usefull
-for someone with the same needs. It works for me, but
-I can't be sure that it will work for you. It was tested only
-with Linux 2.2.14 -- 2.2.16, Apache 1.3.6 -- 1.3.12
-and Perl 5.6.
-
----------
-
-* mrtg-archiver
-
-Main part is the 'mrtg-archiver' script itself. It tries to parse
-MRTG configuration file and extracts the list of targets. Then
-the script copies graphs and necessary parts of html file to
-the archive.
-
-
-* Command-line options:
-
--conf=/path/to/config-file MRTG configuration file
--arch=/path/to/archive Path to folder, where the archive
- will be stored. You should create
- folders 'days', 'weeks', 'months'
- 'years' in it and also you can
- place the supplied index.html
- to the archive folder. All other
- indexes are produced automaticaly.
--d Produce daily archive
--w Produce weekly archive
--m Produce monthly archive
--y Produce yearly archive
-
--back=n Tell the archiever, that date, to which the archiving
- process is made was n seconds earlier. This allows
- to make daily archives at, for example, 3:00am but
- mark them by correct (yesterday) date.
-
-The script relies heavily on the structure of html files produced by
-MRTG, so if the structure change substantialy the script will possibly
-crash.
-
-
-* What you can customize in script:
-
-The variable $GroupRE contains regular expression to group targets.
-Currently it groups targets by router IP in target itself, assuming
-that target name starts from router IP. You can change it to anything
-you want and also you can group targets by some parts in Title.
-For this you should comment out line 178 and uncomment line 179.
-
-The variable $img_suffix contains the suffix (currently 'png')
-of graph files produced by MRTG. If your MRTG produces gifs, you
-can change this variable's value to 'gif'.
-
-
-* Starting the archiver
-
-mrtg-archive supposed to be started by cron. The example lines to
-be put in crontab are supplied in file 'to-crontab'
-
-
-* Navigating through archives
-
-To provide the navigation through archives, the cgi-script 'mrtgnav'
-should be placed into /cgi-bin/mrtg of your WWW server. It requires
-URI.pm to be installed on your site. You may need to change the
-value of $HtmlBase, it should contain the location of Web server
-document root.
-
-The idea of the navigation script was inspired by Cooler
-(http://cooler.irk.ru).
-
-
diff --git a/src/contrib/mrtg-archiver-script/index.html b/src/contrib/mrtg-archiver-script/index.html
deleted file mode 100644
index a22abd5..0000000
--- a/src/contrib/mrtg-archiver-script/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
-<title>MRTG Statistics Archive</title>
-</head>
-<body bgcolor=white textcolor=black>
-<h1>MRTG Statistics Archive</h1>
-<ul>
- <li> <a href="days/index.html">Daily Archive</a>
- <li> <a href="weeks/index.html">Weekly Archive</a>
- <li> <a href="months/index.html">Monthly Archive</a>
- <li> <a href="years/index.html">Yearly Archive</a>
-</ul>
-<hr>
-MRTG Statistics Archiver by <a href="mailto:krot@tnsplus.kz">Krot</a>.
-</body>
-</html>
diff --git a/src/contrib/mrtg-archiver-script/mrtg-archiver b/src/contrib/mrtg-archiver-script/mrtg-archiver
deleted file mode 100755
index f3a53dc..0000000
--- a/src/contrib/mrtg-archiver-script/mrtg-archiver
+++ /dev/null
@@ -1,254 +0,0 @@
-#!/usr/bin/perl
-#
-# MRTG Archiver by O.Krotoff
-#
-# Version 0.2
-#
-
-use strict;
-use Getopt::Long;
-use File::Copy;
-use POSIX qw(strftime);
-
-my @targets;
-my %titles;
-my $target;
-my $ArchiveDir = 'archive';
-my $WorkDir = 'mrtgdata';
-my $ConfigFile = 'mrtg.cfg';
-my ($subdir, $timedir, $archpath, $archindex, $suffix, $img_suffix);
-my ($archperiod);
-my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $week);
-my ($cur_target, $cur_date, $cur_group);
-
-my $DayPartRE = '^\<B\>\`Daily\'';
-my $WeekPartRE = '^\<B\>\`Weekly\'';
-my $MonthPartRE = '^\<B\>\`Monthly\'';
-my $YearPartRE = '^\<B\>\`Yearly\'';
-my $GroupRE = '^(\d+\.\d+\.\d+\.\d+)'; # To group targets by router IP
-my $BackShift = 0;
-
-my ($DayFlag, $WeekFlag, $MonthFlag, $YearFlag);
-
-($DayFlag, $WeekFlag, $MonthFlag, $YearFlag) = (0, 0, 0, 0);
-$img_suffix = 'png';
-
-GetOptions('d!' => \$DayFlag,
- 'w!' => \$WeekFlag,
- 'm!' => \$MonthFlag,
- 'y!' => \$YearFlag,
- 'conf=s' => \$ConfigFile,
- 'arch=s' => \$ArchiveDir,
- 'back=i' => \$BackShift
- );
-
-$timedir = 'days' if $DayFlag;
-$timedir = 'weeks' if $WeekFlag;
-$timedir = 'months' if $MonthFlag;
-$timedir = 'years' if $YearFlag;
-
-$suffix = 'day' if $DayFlag;
-$suffix = 'week' if $WeekFlag;
-$suffix = 'month' if $MonthFlag;
-$suffix = 'year' if $YearFlag;
-
-$archperiod = 'Daily' if $DayFlag;
-$archperiod = 'Weekly' if $WeekFlag;
-$archperiod = 'Monthly' if $MonthFlag;
-$archperiod = 'Yearly' if $YearFlag;
-
-@targets = ();
-
-open(CFGFILE, $ConfigFile) || die "Can't open configuration file $ConfigFile\n";
-while(<CFGFILE>) {
- if(/^WorkDir:\s*(.*)\s*$/) {
- $WorkDir = $1;
- } elsif(/^Target\[(.*)\]:/) {
- $cur_target = $1;
- push @targets, $cur_target;
- } elsif(/^Title\[$cur_target\]:\s*(.*)\s*$/) {
- $titles{$cur_target} = $1;
- }
-}
-
-($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) =
- localtime(time - $BackShift);
-$week = strftime("%W", $sec, $min, $hour, $mday, $mon, $year);
-$year += 1900;
-$mon += 1;
-# $week = int($yday / 7) + 1;
-
-
-if($DayFlag) {
- $subdir = sprintf "%4d-%02d-%02d", $year, $mon, $mday;
- $cur_date = sprintf "%02d/%02d/%4d", $mday, $mon, $year;
-} elsif($WeekFlag) {
- $subdir = sprintf "%4d-%02d", $year, $week;
- $cur_date = sprintf "%02d/%4d, week %2d", $mon, $year, $week;
-} elsif($MonthFlag) {
- $subdir = sprintf "%4d-%02d", $year, $mon;
- $cur_date = sprintf "%02d/%4d", $mon, $year;
-} elsif($YearFlag) {
- $subdir = sprintf "%4d", $year;
- $cur_date = $subdir;
-}
-
-$archpath = "$ArchiveDir/$timedir/$subdir";
-$archindex = "$ArchiveDir/$timedir/index.html";
-
-if(-f $archindex) {
- open(ARCHINDEX, "< $archindex") || die "Can't open $archindex !\n";
- open(OUTARCHINDEX, "> $archindex.new") || die "Can't open $archindex.new !\n";
- while(<ARCHINDEX>) {
- if(m{^\<\!-- Start --\>}) {
- print OUTARCHINDEX $_;
- print OUTARCHINDEX "<li> <a href=\"$subdir/index.html\">$cur_date</a> \n";
- if($DayFlag && $mday == 1) {
- print OUTARCHINDEX "<li> <hr> \n";
- }
- if($WeekFlag && $week == 1) {
- print OUTARCHINDEX "<li> <hr> \n";
- }
- if($MonthFlag && $mon == 1) {
- print OUTARCHINDEX "<li> <hr> \n";
- }
- } else {
- print OUTARCHINDEX $_;
- }
- }
- close(ARCHINDEX);
- close(OUTARCHINDEX);
- unlink($archindex);
- rename("$archindex.new", $archindex);
-} else {
- open(OUTARCHINDEX, "> $archindex") || die "Can't create $archindex !\n";
- print OUTARCHINDEX <<ARCHINDSTOP;
-<html>
-<head>
-<title>MRTG Statistics $archperiod Archive</title>
-</head>
-<body bgcolor=white textcolor=black>
-<h1>MRTG Statistics $archperiod Archive</h1>
-<a href="../index.html">Back to archive index</a>
-<hr>
-<ul>
-<!-- Start -->
-<li> <a href="$subdir/index.html">$cur_date</a> <!-- First one -->
-</ul>
-<hr>
-MRTG Statistics Archiver by <a href="mailto:krot\@tnsplus.kz">Krot</a>.
-</body>
-</html>
-ARCHINDSTOP
-
-}
-
-# print "Archive dir is: $archpath \n";
-
-unless(-d $archpath) {
- mkdir($archpath, 0755)
- || die "Can't create archive dir! \n";
-}
-
-open(INDEXFILE, "> $archpath/index.html") || die "Can't create index.html file!\n";
-print INDEXFILE <<INDEXTOP;
-<html>
-<head>
-<title>MRTG Statistics Archive --- $cur_date</title>
-</head>
-<body bgcolor=white textcolor=black>
-<h2>MRTG Statistics Archive --- $cur_date</h2>
-<a href="/cgi-bin/mrtg/mrtgnav?prev">&lt; Prev</a>&nbsp;
-<a href="/cgi-bin/mrtg/mrtgnav?index">Back to $archperiod archive index</a>&nbsp;
-<a href="/cgi-bin/mrtg/mrtgnav?next">Next &gt;</a>
-<hr>
-<ul>
-INDEXTOP
-
-$cur_group = '';
-
-foreach $target (@targets) {
-
- if(open(HTMLFILE, "$WorkDir/$target.html")) {
-# print "Processing $target...\n";
-
- if($GroupRE) {
- $target =~ /$GroupRE/;
-# $titles{$target} =~ /$GroupRE/;
- if($cur_group ne $1) {
- print INDEXFILE "</ul>" if $cur_group;
- $cur_group = $1;
- print INDEXFILE " <li>$cur_group\n <ul>\n";
- }
- }
-
- print INDEXFILE " <li><a href=$target.html> $titles{$target} </a>\n";
- copy("$WorkDir/$target-$suffix.$img_suffix", "$archpath/$target-$suffix.$img_suffix")
- || die "Failed to copy file $archpath/$target-$suffix.$img_suffix !\n";
-
- open(OUTFILE, "> $archpath/$target.html")
- || die "Can't create archive file $archpath/$target.html !\n";
-
- my $inHead = 0;
- my $inDayPart = 0;
- my $inWeekPart = 0;
- my $inMonthPart = 0;
- my $inYearPart = 0;
- my $inTail = 0;
-
- while(<HTMLFILE>) {
- chomp;
- if(/^\<!DOCTYPE/) { $inHead = 2 }
- elsif(/^\<HR/ && $inHead) {
- $inHead--;
- print OUTFILE <<NAVBLOCK if $inHead;
-<a href="/cgi-bin/mrtg/mrtgnav?prev">&lt; Prev</a>&nbsp;
-<a href="/cgi-bin/mrtg/mrtgnav?index">Index</a>&nbsp;
-<a href="/cgi-bin/mrtg/mrtgnav?next">Next &gt;</a>
-NAVBLOCK
- print OUTFILE "<HR>" unless $inHead;
- }
- elsif(/$DayPartRE/) { $inDayPart = 1 }
- elsif(/^\<HR/ && $inDayPart) { $inDayPart = 0 }
- elsif(/$WeekPartRE/) { $inWeekPart = 1 }
- elsif(/^\<HR/ && $inWeekPart) { $inWeekPart = 0 }
- elsif(/$MonthPartRE/) { $inMonthPart = 1 }
- elsif(/^\<HR/ && $inMonthPart) { $inMonthPart = 0 }
- elsif(/$YearPartRE/) { $inYearPart = 1 }
- elsif(/\<HR/ && $inYearPart) { $inYearPart = 0; $inTail = 1; }
-
- next if $inHead && (/^\<META/ || /^\<!--/);
-
- s{\</[Hh](\d)\>}{ --- $cur_date\</H$1\>} if $inHead;
- s{SRC=\"(mrtg\-[lmr])}{SRC=\"/mrtg-images/$1}g if $inTail;
-
- print OUTFILE $_."\n" if ($inHead || ($inDayPart && $DayFlag) ||
- ($inWeekPart && $WeekFlag) ||
- ($inMonthPart && $MonthFlag) ||
- ($inYearPart && $YearFlag) ||
- $inTail);
-
- }
-
- close(OUTFILE);
- close(HTMLFILE);
-
- }
-}
-
-print INDEXFILE " </ul>" if $GroupRE;
-print INDEXFILE <<INDEXTAIL;
-</ul>
-<hr>
-MRTG Statistics Archiver by <a href="mailto:krot\@tnsplus.kz">Krot</a>.
-</body>
-</html>
-INDEXTAIL
-
-
-
-
-
-
-
-
diff --git a/src/contrib/mrtg-archiver-script/mrtgnav b/src/contrib/mrtg-archiver-script/mrtgnav
deleted file mode 100755
index efcad3d..0000000
--- a/src/contrib/mrtg-archiver-script/mrtgnav
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use URI;
-
-my $dirc = 'none';
-my $HtmlBase = "/usr/lib/apache/htdocs";
-my ($rq, $rf, $prevDir, $nextDir, $newLocation);
-my ($basedir, $subdir, $file, $TheDir, $host);
-my (@dirs, @pathsegs);
-
-$rq = URI->new($ENV{"REQUEST_URI"});
-$dirc = $rq->query;
-
-$rf = URI->new($ENV{"HTTP_REFERER"});
-
-$host = $rf->host;
-$subdir = $rf->path;
-@pathsegs = $rf->path_segments;
-
-$file = $pathsegs[-1];
-$subdir = $pathsegs[-2];
-$basedir = join('/', @pathsegs[0..$#pathsegs-2]);
-
-opendir(DIRHNDL, "$HtmlBase/$basedir");
-
-while($TheDir = readdir(DIRHNDL)) {
- if($TheDir =~ /^\w/ && -d "$HtmlBase/$basedir/$TheDir") {
- push @dirs, $TheDir;
- }
-}
-
-@dirs = sort @dirs;
-
-for(my $i = 0; $i <= $#dirs; $i++) {
- if ($dirs[$i] eq $subdir) {
- if($i > 0) { $prevDir = $dirs[$i - 1] }
- else { $prevDir = $subdir }
-
- if($i < $#dirs) { $nextDir = $dirs[$i + 1] }
- else { $nextDir = $subdir }
-
- last;
- }
-}
-
-if($dirc eq 'prev') {
- if(-f "$HtmlBase/$basedir/$prevDir/$file") {
- $newLocation = "http://$host$basedir/$prevDir/$file";
- } else {
- $newLocation = "http://$host$basedir/$subdir/$file";
- }
-} elsif ($dirc eq 'next') {
- if(-f "$HtmlBase/$basedir/$nextDir/$file") {
- $newLocation = "http://$host$basedir/$nextDir/$file";
- } else {
- $newLocation = "http://$host$basedir/$subdir/$file";
- }
-} elsif ($dirc eq 'index') {
- if($file eq 'index.html') {
- $newLocation = "http://$host$basedir/index.html";
- } else {
- $newLocation = "http://$host$basedir/$subdir/index.html";
- }
-} else {
- $newLocation = $ENV{"HTTP_REFERER"};
-}
-
-print "Location:$newLocation\n\n";
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/contrib/mrtg-archiver-script/to-crontab b/src/contrib/mrtg-archiver-script/to-crontab
deleted file mode 100644
index 23bf968..0000000
--- a/src/contrib/mrtg-archiver-script/to-crontab
+++ /dev/null
@@ -1,4 +0,0 @@
-19 0 * * * /usr/local/lib/mrtg/mrtg-archiver -d --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
-19 0 * * mon /usr/local/lib/mrtg/mrtg-archiver -w --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
-19 0 1 * * /usr/local/lib/mrtg/mrtg-archiver -m --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200
-19 0 1 Jan * /usr/local/lib/mrtg/mrtg-archiver -y --conf=/usr/local/lib/mrtg/mrtg.cfg --arch=/usr/lib/apache/htdocs/mrtg/archive --back=1200 \ No newline at end of file
diff --git a/src/contrib/mrtg-archiver/README b/src/contrib/mrtg-archiver/README
deleted file mode 100644
index d0c3f51..0000000
--- a/src/contrib/mrtg-archiver/README
+++ /dev/null
@@ -1,54 +0,0 @@
-.... backup.pl ,....
-
-Date: Thu, 17 Jul 1997 14:31:32 +0200
-From: Emanuele Leonardi <Emanuele.Leonardi@roma1.infn.it>
-To: mrtg@list.ee.ethz.ch
-
-It wakes up at 23:54 every night and copies all the current daily gifs
-for the given list of routers to a directory named with the current date
-(e.g. 970717). The Perl code is extremely straightforward so there
-should be no problem in understanding it.
-
-The cron entry I use is:
-54 23 * * * /usr/local/lib/mrtg-2.2/backup.pl 1>>
-/usr/local/lib/mrtg-2.2/backup.log 2>&1
-
-I'll be very happy to discuss any possible improvement or modification.
-
-Ciao
-
- Emanuele
-
-
-
-... mrtg.archiver.pl .....
-
-From: Rawlin Blake <blake@nevada.edu>
-To: dlr@bungi.com, oetiker@ee.ethz.ch, Emanuele Leonardi <Emanuele.Leonardi@roma1.infn.it>
-Date: Mon, 4 Jan 1999 15:05:38 -0800 (PST)
-Subject: mrtg-archiver
-
-
-I have made some revisions to mrtg-archiver for use at my site. In the
-hopes that those changes will help others, I have appended my version.
-
-Changes include:
-Weekly archiving of week gifs, monthly archiving of month gifs, yearly
-archiving of year gifs.
-Specification of which interfaces you want summary files saved for.
-Terse error messages. (I happen to prefer shorter messages, to each their
-own :-) )
-Creation of the archive directory if it doesn't exist.
-Symlinking of the mrtg gifs instead of copying (I have limited disk space)
-
-
----------
-blake@nevada.edu http://www.nevada.edu/~blake
-
-How far would Moses have gone if he had taken a poll in Egypt? What would
-Jesus Christ have preached if he had taken a poll in the land of Israel?
-What would have happened to the Reformation if Martin Luther had taken a
-poll? It isn't polls or public opinion of the moment that counts. It is
-right and wrong and leadership.
- -- USA President Harry S Truman
-==========================================================================
diff --git a/src/contrib/mrtg-archiver/backup.pl b/src/contrib/mrtg-archiver/backup.pl
deleted file mode 100644
index b04559e..0000000
--- a/src/contrib/mrtg-archiver/backup.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/perl
-
-# Define list of nodes to backup
-@nodes_to_backup = ('router1','router2','router3','etc');
-
-# Get date and time of execution
-chop ($date = `date +%y%m%d`);
-chop ($time = `date +%H:%M:%S`);
-
-# Define working directories
-$MRTG_DIR = "/home/httpd/html/mrtg";
-$BACKUP_DIR = "$MRTG_DIR/backup";
-$TO_DIR = "$BACKUP_DIR/$date";
-
-print "==================================================
-Starting backup for day $date at $time.\n";
-
-# Create daily directory and copy default GIF files
-print "Creating directory $TO_DIR.\n";
-mkdir($TO_DIR,"755") || die "Error creating directory $TO_DIR.\n";
-chmod(0755,$TO_DIR);
-system(sprintf("cp -a %s/mrtg-*.gif %s",$MRTG_DIR,$TO_DIR));
-
-# For each node copy the daily summary file and create the index file
-foreach $node ( @nodes_to_backup ) {
- printf("Executing backup for node %s.\n",$node);
- system(sprintf("cp -a %s/%s.*-day.gif %s",$MRTG_DIR,$node,$TO_DIR));
- $Summary_Source = "$MRTG_DIR/$node.html";
- $Summary_Destination = "$TO_DIR/$node.html";
- open(SRC,"<$Summary_Source");
- open(DST,">$Summary_Destination");
- while (<SRC>) {
- s/<A HREF[^>]*>//g;
- s/<\/A>//g;
- s/Router Overview/Router Overview of $date/;
- s/<META HTTP-EQUIV=\"Refresh\" CONTENT=300 >//;
- print DST; }
- close(SRC);
- close(DST);
- chmod(0644,$Summary_Destination);
-}
-
-# Create the general index file
-$INDEX = "$TO_DIR/index.html";
-print "Creating index file $INDEX.\n";
-open(IDX,">$INDEX") || die "Could not open index file $INDEX.\n";
-printf IDX "
-<HTML>
-<HEAD><TITLE>Server Summary for %s</TITLE></HEAD>
-<BODY BGCOLOR=\"#FFFFFF\">
-<CENTER><H1>Server Summary for %s</H1></CENTER>
-<P><UL type=square>
-",$date,$date;
-foreach $node ( @nodes_to_backup ) {
- printf IDX "<LI><A HREF=\"%s.html\">%s</A></LI>\n",$node,$node;
-}
-print IDX "</UL></P></BODY></HTML>";
-close(IDX);
-chmod(0644,$INDEX);
-
-chop ($time = `date +%H:%M:%S`);
-print "Backup for day $date finished at $time.\n";
diff --git a/src/contrib/mrtg-archiver/mrtg.archive.conf b/src/contrib/mrtg-archiver/mrtg.archive.conf
deleted file mode 100644
index 6d39694..0000000
--- a/src/contrib/mrtg-archiver/mrtg.archive.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-# Filename: mrtg.archive.conf
-# Configuration file for mrtg.archive.pl
-#
-# Place this file in the same directory as mrtg-archive.pl.
-# Default placement of these files is in /usr/local/sbin
-#
-# If you place them elsewhere, change the $Conf_File setting in mrtg.archive.pl.
-#
-
-#
-# User configuration section
-#
-
-# Define list of nodes to archive
-#@nodes_to_archive = ('router1','router2','router3','etc');
-@nodes_to_archive = ('192.168.1.1','192.168.99.16','192.168.17.1');
-
-# Define list of interfaces for summary files
-#@nodes_to_summary = ('router1.iface#','etc');
-@nodes_to_summary = ('192.168.1.1.2','192.168.1.17.1');
-
-# Define list of common gifs to link
-@common_gifs = ('mrtg-l.gif','mrtg-m.gif','mrtg-r.gif','mrtg-ti.gif');
-
-# Define working directories
-$MRTG_DIR = "/home/httpd/html/mrtg";
-$ARCHIVE_DIR = "$MRTG_DIR/archive";
-$TO_DIR = "$ARCHIVE_DIR/$date";
-
-#
-# End user configuration section
-#
-
-1; #do not remove this line
-
-# Eof: mrtg.archive.conf
diff --git a/src/contrib/mrtg-archiver/mrtg.archive.pl b/src/contrib/mrtg-archiver/mrtg.archive.pl
deleted file mode 100755
index d8bfb80..0000000
--- a/src/contrib/mrtg-archiver/mrtg.archive.pl
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Filename: mrtg.archive.pl
-# Archive mrtg gifs and summary files
-# Original author: Emanuele Leonardi <Emanuele.Leonardi@roma1.infn.it>
-# Modified by: Rawlin Blake <blake@nevada.edu>
-#
-# Default placement of mrtg.archive.* is in /usr/local/sbin
-# If you place them elsewhere, change the $Conf_File setting later in this file.
-#
-# The cron entry I use is:
-# 57 23 * * * /usr/local/sbin/mrtg.archive.pl 1>> /var/log/mrtg.archive.log 2>&1
-#
-# At 23:57 every night it copies the current gifs for the given list of router
-# interfaces to a directory named with the current date (e.g. 970717).
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.#
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-# USA.
-#
-# revision 1.1 09/10/1999
-# Improved error handling
-# Most configurations moved to separate file
-#
-# revision 1.0 07/01/1999
-# Named my version mrtg.archive.pl, allowing Emanuele to update his
-# software without confusion resulting :-)
-# Weekly archiving of week gifs, monthly archiving of month gifs, yearly
-# archiving of year gifs.
-# Specification of which interfaces summary files are saved for.
-# Terse log messages.
-# Creation of the archive directory if it doesn't exist.
-# Symlinking of the mrtg gifs instead of copying (I have limited disk space).
-#
-# backup.pl 07/17/97
-# Author: Emanuele Leonardi <Emanuele.Leonardi@roma1.infn.it>
-#
-
-use strict
-
-#
-# User configuration
-#
-# Change this setting if the mrtg.archive files are
-# not placed in /usr/local/sbin/
-#
-
-$Conf_File = "/usr/local/sbin/mrtg.archive.conf";
-
-#
-# End user configuration
-#
-
-# Check for configuration file
-open(CONF,"$Conf_File") ||
- die "Error opening configuration file $Conf_File: $!\n";
-close(CONF);
-
-# Get date and time of execution
-chomp ($date = `date +%y%m%d`);
-chomp ($time = `date +%H:%M:%S`);
-chomp ($week = `date +%w`);
-chomp ($month = `date +%d`);
-chomp ($year = `date +%m%d`);
-
-require "$Conf_File";
-
-print "===\nArchive $date at $time\n";
-
-# Create daily directory and copy default GIF files
-if (!-e $ARCHIVE_DIR) {
- mkdir($ARCHIVE_DIR, 0755) || die "Error creating $ARCHIVE_DIR: $!\n";
- chmod(0755, $ARCHIVE_DIR);
- print "Create $ARCHIVE_DIR\n";
-}
-mkdir($TO_DIR, 0755) || die "Error creating $TO_DIR: $!\n";
-chmod(0755, $TO_DIR);
-print "Create $TO_DIR\n";
-foreach $mgif ( @common_gifs ) {
- symlink("$MRTG_DIR" . "\/" . "$mgif", "$TO_DIR" . "\/" . "$mgif");
-}
-
-# For each node copy the daily gifs
-foreach $node ( @nodes_to_archive ) {
- system(sprintf("cp -a %s/%s.*-day.gif %s",$MRTG_DIR,$node,$TO_DIR));
-}
-# For each node copy the weekly gifs on Sunday
-if ($week == "0") {
- foreach $node ( @nodes_to_archive ) {
- system(sprintf("cp -a %s/%s.*-week.gif %s",$MRTG_DIR,$node,$TO_DIR));
- }
-}
-# For each node copy the monthly gifs on the first
-if ($month == "01") {
- foreach $node ( @nodes_to_archive ) {
- system(sprintf("cp -a %s/%s.*-month.gif %s",$MRTG_DIR,$node,$TO_DIR));
- }
-}
-# For each node copy the yearly gifs on January first
-if ($year == "0101") {
- foreach $node ( @nodes_to_archive ) {
- system(sprintf("cp -a %s/%s.*-year.gif %s",$MRTG_DIR,$node,$TO_DIR));
- }
-}
-
-# For each node copy the daily summary file and create the index file
-foreach $summary ( @nodes_to_summary ) {
- printf("%s\n",$summary);
- $Summary_Source = "$MRTG_DIR/$summary.html";
- $Summary_Destination = "$TO_DIR/$summary.html";
- open(SRC,"<$Summary_Source") || die "Error opening $Summary_Source: $!\n";
- open(DST,">$Summary_Destination") ||
- die "Error opening $Summary_Destination: $!\n";
- while (<SRC>) {
- s/<A HREF[^>]*>//g;
- s/<\/A>//g;
- s/Router Overview/Router Overview of $date/;
- s/<META HTTP-EQUIV=\"Refresh\" CONTENT=300 >//;
- print DST; }
- close(SRC);
- close(DST);
- chmod(0644, $Summary_Destination);
-}
-
-# Create the general index file
-$INDEX = "$TO_DIR/index.html";
-print "Create $INDEX\n";
-open(IDX,">$INDEX") || die "Could not open $INDEX: $!\n";
-printf IDX
-"<HTML>
-<HEAD>
-<TITLE>Router Summary for %s</TITLE>
-</HEAD>
-<BODY BGCOLOR=\"#FFFFFF\">
-<CENTER><H1>Router Summary for %s</H1></CENTER>
-<P>
-<UL TYPE=SQUARE>
-",$date,$date;
-foreach $summary ( @nodes_to_summary ) {
- printf IDX "<LI><A HREF=\"%s.html\">%s</A></LI>\n",$summary,$summary;
-}
-
-print IDX
-"</UL>
-</P>
-</BODY>
-</HTML>";
-close(IDX);
-chmod(0644, $INDEX);
-
-@common_gifs = "";
-chomp ($time = `date +%H:%M:%S`);
-print "Archive $date done at $time\n";
-exit(0);
-
-# Eof mrtg.archive.pl
diff --git a/src/contrib/mrtg-blast/COPYING b/src/contrib/mrtg-blast/COPYING
deleted file mode 100644
index e77696a..0000000
--- a/src/contrib/mrtg-blast/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/src/contrib/mrtg-blast/COPYRIGHT b/src/contrib/mrtg-blast/COPYRIGHT
deleted file mode 100644
index 269b541..0000000
--- a/src/contrib/mrtg-blast/COPYRIGHT
+++ /dev/null
@@ -1,27 +0,0 @@
-*************************************************
-* mrtg-blast *
-* Version 1.0 March 11 1997 *
-* Network Throughput Monitoring *
-*************************************************
- Add on for
- MRTG - The Multi Router Traffic Grapher
-
-
-Copyright (c) 1997 Balthasar Indermuehle <balthasar@indermuehle.com>
-All rights reserved.
-
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-675 Mass Ave, Cambridge, MA 02139, USA.
-
diff --git a/src/contrib/mrtg-blast/INSTALL b/src/contrib/mrtg-blast/INSTALL
deleted file mode 100644
index 63a60d4..0000000
--- a/src/contrib/mrtg-blast/INSTALL
+++ /dev/null
@@ -1,69 +0,0 @@
-*************************************************************************
-You need the following software installed on your system:
-
- - perl 5.003
- http://www.perl.com/perl/info/software.html
- - MRTG 2.1
- http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
- - gcc to successfully compile tcpblast.c
-
-*************************************************************************
-mrtg-blast has been tested successfully under:
-
- Linux 2.0.25 (S.u.S.E. 4.3)
-
- (other versions / OSes might work, but have not been tested.)
- -------------------------------------------------
- The latest version should always be available from
-
- ftp://ftp.inside.ch/pub/mrtg-blast
-
- If you create a new version, please send it to me so I
- can keep the archive up to date.
-*************************************************************************
-
-YOU NEED TO CHANGE THE FOLLOWING:
-tcpblast:
- 1 - Type 'make tcpblast' to compile the tcpblast executable
- 2 - Copy tcpblast to your mrtg binary directory
-
-In mrtg-blast:
- 1 - Line 1: Adjust perl path to your system
- 2 - Line 55: Adjust tcpblast path to where you put tcpblast
- 3 - Copy mrtg-blast to your mrtg binary directory
-
-Edit your mrtg-blast.cfg file to add statements for the devices you want to
-blast. See mrtg-blast.cfg for an example.
-
-PLEASE NOTE: Blasting causes traffic, which it inherently does. ;) So please
-don't flood the whole wide world, keep it as local as possible.
-Blasting can't be that bad though, considering internet radio and tv... at least
-it tells us something: How fast our next video conference will pass, for example.
-
-The program returns traffic estimates which can be off sometimes. Use with care,
-caution and much love.
-Here are some estimates I tested at our site locally. Your mileage will most
-definitely vary, but as a guideline I always use 500 packets if I'm close to
-the site being blasted otherwise 200 is good enough.
-
-Link: 256 kbps = 32 kB/s
-
-#of packets: bandwidth as estimated
- by tcpblast [kB/s]: Error in %:
-
- 100 50 +53 %
- 200 38 +16 %
- 300 35 +5 %
- 400 34 +4 %
- 500 32 0 %
- 800 32 0 %
-
-You should decide yourself how accurate you're trying to be. Once again:
-Your mileage will vary.
-
-Have fun!
-
-Balthasar Indermuehle <balthasar@indermuehle.com>, March 12, Early in the morning...
-
-
-
diff --git a/src/contrib/mrtg-blast/README b/src/contrib/mrtg-blast/README
deleted file mode 100644
index 5d1c790..0000000
--- a/src/contrib/mrtg-blast/README
+++ /dev/null
@@ -1,18 +0,0 @@
-Please read the INSTALL file after finishing this.
-
-I would like to express my thanks to
-
-Tobias Oetiker <oetiker@ee.ethz.ch> and Dave Rand <dlr@bungi.com>
-for writing MRTG. It's people like them that make me believe
-all software designed for hazardous environments such as
-missile and aircraft guidance systems should be run under GNU
-and Copyleft. This would have spared many lost lives and many
-to come.
-
-Many thanks also to Daniel Karrenberg <dfk@nic.eu.net> for porting
-tcpblast to Linux!
-
-And last - but definitely not least - Peter W. Osel <pwo@guug.de>
-who wrote mrtg-ping-probe which inspired me and helped
-getting along with perl regex syntax ;)
-
diff --git a/src/contrib/mrtg-blast/mrtg-blast b/src/contrib/mrtg-blast/mrtg-blast
deleted file mode 100755
index 1922f0c..0000000
--- a/src/contrib/mrtg-blast/mrtg-blast
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-##################################################################
-#
-# Copyright (c) 1997 by Balthasar Indermuehle <balthasar@indermuehle.com>
-# Currently supports Linux 2.0.25
-# All Rights Reserved.
-#
-# See the file COPYRIGHT in the distribution for the exact terms.
-# Based on the mrtg-ping-probe script Copyright 1997 by Peter W. Osel <pwo@guug.de>
-#
-##################################################################
-require 5.003;
-use Getopt::Std;
-use File::Basename;
-use Config;
-
-$ProgName = "mrtg-blast";
-$Usage = "Usage: $ProgName hostname portnumber packets\nTypically: $ProgName my.host.com 9 500\n";
-
-# Parse Command Line:
-die $Usage unless getopts('');
-
-if (@ARGV > 3) {
- print STDERR "$ProgName: WARNING: ignoring but the first three arguments\n";
- }
-
-if (@ARGV < 3) {
- print STDERR "$ProgName ERROR:\nPlease enter a hostname port number and packets to blast (e.g. 9 or 21) as argument\n";
- print STDERR "$Usage";
- exit(1);
- }
-
-
-($HostToBlast, $PortToBlast, $Packets) = @ARGV;
-
-($blastres) = blast($HostToBlast, $PortToBlast, $Packets);
-
-# The external mrtg probe returns up to 4 lines of output:
-# 1. Line: current state of the 'incoming bytes counter'
-# 2. Line: current state of the 'outgoing bytes counter'
-# 3. Line: string, telling the uptime of the target.
-# 4. Line: telling the name of the target.
-# We leave out line 3, and 4.
-
-print "$blastres\n$blastres\n";
-
-exit(0);
-
-##################################################################
-# Do the actual blasting
-#
-sub blast {
- my($host, $port, $packets) = @_;
-
- # The following path to tcpblast needs to be adjusted for your system
- unless (open(BLAST, "/home/netadmin/mrtg-2.1/tcpblast -r -t $host $packets -p$port|")) {
- print STDERR "${ProgName}: FATAL: Can't open tcpblast: $!";
- exit(1);
- }
-
- while (<BLAST>) {
- # Handle output from 'real' tcpblast which looks like this:
- # 100 KB in 1979 msec = 413946.4 b/s = 51743.3 B/s = 50.5 KB/s
- close(BLAST), return("$4.$5") if /^(\d+) KB in (\d+) msec = (\d+)\.\d b\/s = (\d+)\.\d B\/s = (\d+)\.\d KB\/s/;
- }
-
- #Could not get blast results, link may be down, return 0
- close(BLAST), return(0);
-}
-
diff --git a/src/contrib/mrtg-blast/mrtg-blast.cfg b/src/contrib/mrtg-blast/mrtg-blast.cfg
deleted file mode 100644
index af33007..0000000
--- a/src/contrib/mrtg-blast/mrtg-blast.cfg
+++ /dev/null
@@ -1,58 +0,0 @@
-##################################################################
-# Multi Router Traffic Grapher -- Example Configuration File
-# to integrate mrtg-blast
-##################################################################
-# This file is for use with mrtg-2.1
-#
-# Note:
-#
-# * Keywords must start at the begin of a line.
-#
-# * Lines which follow a keyword line which do start
-# with a blank are appended to the keyword line
-#
-# * Empty Lines are ignored
-#
-# * Lines starting with a # sign are comments.
-#
-##################################################################
-
-##################################################################
-# The directory where your files are kept
-WorkDir: /home/netadmin/traffic_stats/test
-
-##################################################################
-# Sample entry to blast a host named oktoberfest
-##################################################################
-
-Title[oktoberfest]: Network Throughput Analysis between Oktoberfest and Mouth
-PageTop[oktoberfest]: <H1>Network Throughput Analysis for Oktoberfest/Mouth link</H1>
- <P>We're measuring network throughput between the Oktoberfest and Mouth server
-
-##################################################################
-# We set MaxBytes to the throughput that we consider "normal" for
-# an unused link, so that the per-cent values show how much you
-# are off when the line is used more heavily. you also have to
-# set AbsMax, otherwise values greate than MaxBytes would be
-# ignored.
-# Values here reflect a 256 kbps frame relay link
-
-MaxBytes[oktoberfest]: 32768
-AbsMax[oktoberfest]: 40000
-
-##################################################################
-# Set gauge, to treat the values gathered from target as absolute
-# and not as counters.
-Options[oktoberfest]: gauge
-
-##################################################################
-# Call mrtg-blast. You must include arguments: hostname portnumber packetstoblast
-# experiments showed that blasting 500 packets (=500k!) shows the best results
-# i.e. it causes the least load while producing the best accuracy. See
-# INSTALL for more information on that.
-Target[oktoberfest]: `/home/netadmin/mrtg-2.1/mrtg-blast oktoberfest 23 500`
-
-##################################################################
-# You might want to include Peaks or not.
-WithPeak[oktoberfest]: ymwd
-
diff --git a/src/contrib/mrtg-blast/tcpblast.c b/src/contrib/mrtg-blast/tcpblast.c
deleted file mode 100644
index f4f47ed..0000000
--- a/src/contrib/mrtg-blast/tcpblast.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/* From FreeBSD: */
-/*
- * tcpblast - test and estimate TCP thruput
- *
- * Daniel Karrenberg <dfk@nic.eu.net>
- */
-
-/*
- * Changes: Rafal Maszkowski <rzm@pdi.net>
- *
- * ftp://ftp.torun.pdi.net/pub/blast/README
- */
-
-char *verstr="FreeBSD + rzm 961003";
-
-#include <getopt.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#define DEFBLKSIZE (1024)
-#define MAXBLKSIZE (32*1024)
-
-struct sockaddr_in sock_in;
-struct servent *sp;
-struct hostent *host;
-
-unsigned long starts, startms, stops, stopms, expms;
-struct timeval ti;
-struct timezone tiz;
-
-char greet[MAXBLKSIZE], *ind;
-int nblocks, f;
-int tcp=0, udp=0, randomb=0, blksize=DEFBLKSIZE, setbufsize=-1, port=9, dots=1;
-
-/* Long options. */
-static const struct option long_options[] =
-{
- { "help", no_argument, NULL, 'h' },
- { "version", no_argument, NULL, 'V' },
- { NULL, 0, NULL, 0 }
-};
-
-void usage(name)
-char *name;
-{
- fprintf(stderr, "\n");
- fprintf(stderr, "usage: %s [options] destination nblocks\n\n", name);
- fprintf(stderr, "tcpblast/udpblast is a simple tool for probing network and estimating its\n");
- fprintf(stderr, "throughoutput. It sends nblocks of %d B blocks of data to specified\n", blksize);
- fprintf(stderr, "destination host\n\n");
- fprintf(stderr, "Options:\n");
- fprintf(stderr, "-t use TCP (%s)\n", ind[0]=='t' ? "default" : "default if named tcpblast" );
- fprintf(stderr, "-u use UDP (%s)\n", ind[0]=='u' ? "default" : "default if named udpblast" );
- fprintf(stderr, "-p nnn use port # nnn instead of default %d\n", port);
- fprintf(stderr, "-r send random data\n");
- fprintf(stderr, "-s nnn block size (default %d bytes)\n", blksize);
- fprintf(stderr, "-b nnn socket buf size (default: %d, %s)\n", setbufsize, setbufsize==-1 ? "don't change" : "change");
- fprintf(stderr, "-d nnn print dot every nnn blocks, 0 disables (default %d)\n", dots);
- fprintf(stderr, "-V, --version version\n");
- fprintf(stderr, "-h, --help this help\n");
- fprintf(stderr, "destination host name or address\n");
- fprintf(stderr, "nblocks number of blocks (1..9999)\n");
- fprintf(stderr, "%s version: %s\n", name, verstr);
- exit(1);
-}
-
-void usage_small(name)
-char *name;
-{
- fprintf(stderr, "type %s --help for help\n", name);
-}
-
-/* randomize the buffer */
-void
-randbuff(blksize)
-int blksize;
-{
- int i;
- for (i=0; i<blksize; i++) {
- greet[i]=rand() % 256;
- }
-}
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{ register int i; char optchar;
-
- /* non-random data - is modem compressing it? */
- bzero(greet, MAXBLKSIZE);
- memset(greet, 'a', MAXBLKSIZE);
-
- /* find first letter in the name - usage() needs it */
- ind=rindex(argv[0], '/');
- if (ind==NULL) ind=argv[0]; else ind++;
-
- while ((optchar = getopt_long (argc, argv, "tup:rs:b:d:Vh", long_options, NULL)) != EOF)
- switch (optchar) {
- case '\0': break;
- case 't': if (tcp==0) tcp=1; break;
- case 'u': if (udp==0) udp=1; break;
- case 'r': srand(0 /* may be an option */); randomb=1; break;
- case 's': blksize=abs(atoi(optarg)); break;
- case 'b': setbufsize=abs(atoi(optarg)); break;
- case 'd': dots=abs(atoi(optarg)); break;
- case 'p': port=abs(atoi(optarg)); break;
- case 'V': printf("%s version: %s\n", argv[0], verstr); return 0; break;
- case 'h': usage(argv[0]);
- default: ;
- }
-
-/* correctness */
- if (tcp && udp) {
- printf("cannot use both TCP and UDP\n");
- usage_small(argv[0]);
- exit(2);
- }
-
- /* if neither -t nor -u is chosen use first character of the
- program name */
- if ( (tcp==0) && (udp==0) && (ind[0]=='t') ) tcp=1;
- if ( (tcp==0) && (udp==0) && (ind[0]=='u') ) udp=1;
-
- if (!tcp && !udp) {
- printf("must use either TCP or UDP\n");
- usage_small(argv[0]);
- exit(3);
- }
-
- /* after options processing we need two args left */
- if (argc - optind != 2) {
- if (argc - optind != 0) printf("give both hostname and block count\n");
- usage_small(argv[0]);
- exit(4);
- }
-
- nblocks = atoi(argv[optind+1]);
- if (nblocks<=0 || nblocks>=10000) {
- fprintf(stderr, "%s: 1 < nblocks <= 9999 \n", argv[0]);
- exit(5);
- }
-
-
- bzero((char *)&sock_in, sizeof (sock_in));
- sock_in.sin_family = AF_INET;
- if (tcp) f = socket(AF_INET, SOCK_STREAM, 0);
- else f = socket(AF_INET, SOCK_DGRAM, 0);
- if (f < 0) {
- perror("tcp/udpblast: socket");
- exit(6);
- }
-
- { unsigned int bufsize, size;
- /* get/setsockopt doesn't return any error really for SO_SNDBUF,
- at least on Linux, it limits the buffer only [256..65536] */
- if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1)
- printf("tcp/udpblast getsockopt: %s", strerror(errno));
- printf("read SO_SNDBUF = %d\n", bufsize);
- if (setbufsize!=-1) {
- if (setsockopt(f, SOL_SOCKET, SO_SNDBUF, &setbufsize, sizeof(setbufsize))==-1)
- printf("tcp/udpblast getsockopt: %s", strerror(errno));
- if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1)
- printf("tcp/udpblast getsockopt: %s", strerror(errno));
- printf("set SO_SNDBUF = %d\n", bufsize);
- }
- }
-
- if (bind(f, (struct sockaddr*)&sock_in, sizeof (sock_in)) < 0) {
- perror("tcp/udpblast: bind");
- exit(7);
- }
-
- host = gethostbyname(argv[optind]);
- if (host) {
- sock_in.sin_family = host->h_addrtype;
- bcopy(host->h_addr, &sock_in.sin_addr, host->h_length);
- } else {
- sock_in.sin_family = AF_INET;
- sock_in.sin_addr.s_addr = inet_addr(argv[optind]);
- if (sock_in.sin_addr.s_addr == -1) {
- fprintf(stderr, "%s: %s unknown host\n", argv[0], argv[optind]);
- exit(8);
- }
- }
- sock_in.sin_port = htons(port);
-
- if (connect(f, (struct sockaddr*)&sock_in, sizeof(sock_in)) <0)
- {
- perror("tcp/udpblast connect:");
- exit(9);
- }
-
- printf("Sending %s %s data using %d B blocks.\n",
- randomb ? "random":"non-random", tcp ? "TCP":"UDP", blksize);
-
- if (gettimeofday(&ti, &tiz) < 0)
- {
- perror("tcp/udpblast time:");
- exit(10);
- }
- starts = ti.tv_sec;
- startms = ti.tv_usec / 1000L;
-
-
- for (i=0; i<nblocks; i++)
- {
- if (randomb) randbuff(blksize);
- if (write(f, greet, (size_t)blksize) != blksize)
- perror("tcp/udpblast send:");
- if ( (dots!=0) && ( (dots==1) || (i%dots==1) ) ) write(1, ".", 1);
- }
-
- if (gettimeofday(&ti, &tiz) < 0)
- {
- perror("tcp/udpblast time:");
- exit(11);
- }
- stops = ti.tv_sec;
- stopms = ti.tv_usec / 1000L;
-
- expms = (stops-starts)*1000 + (stopms-startms);
- printf("\n%d KB in %ld msec", (nblocks*blksize)/1024, expms);
- printf(" = %.1f b/s", ((double) (nblocks*blksize))/expms*8000);
- printf(" = %.1f B/s", ((double) (nblocks*blksize))/expms*1000);
- printf(" = %.1f KB/s\n",
- (double) (nblocks*blksize) / (double) (expms*1024.0) * 1000 );
- return(0);
-}
diff --git a/src/contrib/mrtg-dynip/Changes b/src/contrib/mrtg-dynip/Changes
deleted file mode 100644
index 5af98e2..0000000
--- a/src/contrib/mrtg-dynip/Changes
+++ /dev/null
@@ -1,61 +0,0 @@
-Version 0.41b 25 October 1997
-Becomes a package again, minor code changes
-
-Version 0.41a 22 October 1997
-Merging of new configuration section for fixed IP into $interfaces
-Comments updated
-
-Version 0.41 21 October 1997
-Caters for static or fixed IP on all hosts
-
-Version 0.40Beta 21 October 1997
-Caters for static or fixed IP on localhost
-
-Version 0.35x 12 October 1997
-mrtg-dynip becomes a package instead of a single file. Minor changes to
-comments
-
-Version 0.35r 11 October 1997
-Minor corrections and changes to comments
-
-Version 0.35f 9 October 1997
-Capacity introduced to deal with hosts upon which interface IP addresses are
-the same on different hosts, such as on masquerading firewall hosts and on
-address translation hosts. Avoids need to run more than one copy for this
-situation.
-
-Version 0.35c 8 October 1997
-Capacity introduced to deal with sets of hosts with inconsistent names for
-public community. Avoids need to run more than one copy for this situation.
-
-Version 0.35 6 October 1997
-Capacity to Capacity to deal with information from multiple hosts
-introducedy for each host examined. This meant it was no longer necessary to
-run a copy for each host examined. 'Free form' configuration of interfaces
-introduced. Dropped option to use external snmpwalk.
-
-Version 0.32 5 October 1997
-Improved error handling
-
-Version 0.31 28 September 1997
-Changed name from regen to mrtg-dynip. Changed from 'all interfaces found
-on localhost' approach to deciding which interfaces to be included on a
-named host. Inactive interfaces labelled inactive instead of not being
-included. Free text descriptions of interfaces included. Reliance on ouput
-of 'ifconfig' dropped, this allows use of script by non UNIX machines and
-other hosts to be examined.
-
-Version 0.10 23 Sptember 1997
-Generalised use of pattern matching on snmpwalk command output to enable
-either UCD or CMU compiled versions found in path to work.
-Stats for multiple ethernet cards generated.
-
-Versions 0.03 to 0.05 September 1997
-Use of index page of interface stats page.
-General configuration options added.
-Added use of Simon Leinen's Perl 5 SNMP modules to query snmp daemon, as an
-alternative to using snmpwalk from a package other than mrtg.
-
-Version 0.01 to 0.02 28 August 1997
-Concept proven with a basic working script. Testing begins on home Linux PC
-and on SydNet Internet and Network Services.
diff --git a/src/contrib/mrtg-dynip/FAQ b/src/contrib/mrtg-dynip/FAQ
deleted file mode 100644
index f6ae5a7..0000000
--- a/src/contrib/mrtg-dynip/FAQ
+++ /dev/null
@@ -1,214 +0,0 @@
-FAQ for mrtg-dynip version 0.41b
-
-0. What are the problems that gave rise to mrtg-dynip?
- 0.1 What is dynamic IP
- 0.2 What is static or fixed IP
- 0.3 What is SNMP and what information can it provide?
- 0.4 What is MRTG?
- 0.5 Can the configuration file MRTG runs on remain unchanged?
-1. What does mrtg-dynip do?
- 1.1 Can mrtg-dynip act as a front end to MRTG?
- 1.2 Can mrtg-dynip monitor modem banks?
-2. What do I need to run mrtg-dynip and where can I get it?
-3. What platforms does mrtg-dynip run on?
-4. Are there special considerations to running mrtg-dynip?
- 4.1 How do I make mrtg-dynip executable?
- 4.2 How can I ensure mrtg-dynip can write to directories and files
-5. How do I prevent errors and interpret error messages?
- 5.0 What problems external to mrtg-dynip affect it?
- 5.0.1 Why am I getting losts of weird email from cron?
- 5.0.2 Why does the mrtg-dynip log have weird messages from snmp
- modules?
- 5.1 Why doesn't my email address and web page link show?
- 5.2 I have configured everything, yet my index page does not update
- 5.3 Your crontab example looks really odd, please explain.
-6. Why do the in and out graphs closely follow each other in my modem bank
- graphs?
-7. I cannot find a solution to my problem in the docmentation and web
- sites. What support exists and is there a mailing list?
-
-
-0. What are the problems that gave rise to mrtg-dynip?
-
-The initial problem that gave rise to the creation of mrtg-dynip is that
-MRTG relies on snmp target numbers having a fixed association with file
-names representing physical interfaces. In environments where the snmp
-target number of a physical interface can vary, such as in a PPP dial in
-environment, it is necessary to ensure that file names associated with real
-physical interfaces are associated with the current snmp target number for
-the device. This is what mrtg-dynip does.
-
-0.1 What is dynamic IP
-
-To someone dialling in, dynamic IP means when they dial a rotary
-number they do not get a consistent IP address. To the service provider it
-means a unique IP number is assinged to each telephone line/modem/port.
-
-0.2 What is static or fixed IP
-
-To someone dialling in, static or fixed IP means that their user name is
-approved to use a unique IP address, whether they dial into a rotary for a
-modem bank or into a non rotary number. To the service provider, it means
-if someone is dialling into a rotary for a modem pool, they allow the modem
-port use a unique approved IP number for that user, that overrides the IP
-address used when a dial in user does not request a fixed or static IP.
-
-0.3 What is SNMP and what information can it provide?
-
-SNMP stands for Simple Network Management Protocol. Like much relating to
-the Internet, it is described by a set of Internet Engineering Task Force
-documents known as RFCs (Requests for Comments). SNMP is a means by which
-network linked devices can have a wide variety of device status information
-reported from them, and have action performed on them, according to known
-protocols.
-
-0.4 What is MRTG?
-
-MRTG stands for 'Multi Router Traffic Grapher'. Among much else, it provides
-a means for graphing traffic quantity information through various
-interfaces, typically routers, in web acessible means, using information
-reurned from SNMP requests.
-
-0.5 Can the configuration file MRTG runs on remain unchanged?
-
-Not in environmants that the SNMP target number varies for physical
-interface devices you are interested in gathering information on.
-
-1. What does mrtg-dynip do?
-
-#Mrtg-dynip is a contribution to mrtg, enabling mrtg to generate multi
-#interface traffic graphs for IP interfaces on hosts that do not provide
-#consistent SNMP target numbers for their interfaces. Such IP interfaces
-#include IP active serial interfaces attached to modems in a PPP dial in
-#environment. The hosts must run snmp agents. For completeness, information
-#about interface devices with unvarying SNMP target numbers, such as
-#ethernet cards, can be configured to be included.
-
-#Mrtg-dynip's configuration is simplest where static (or fixed) IP is not
-#used for dial into a rotary modem pool.
-
-#Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-#capacity, when the modems carry PPP or SLIP traffic.
-
-#Regenerates a named 'mrtg.cfg' file to ensure snmp data remains with a
-#consistent IP number, or overridable IP number of a real physical device
-#in a dial in IP environment, rather than with an interface name which
-#can get assinged to different real physical devices, and runs mrtg on
-#the generated file.
-
-#Generates a web index file of stats web pages.
-
-#Please see the section 6 of this FAQ for this version for information on
-#for differences in interpreting graphs between some devices
-
-1.1 Can mrtg-dynip act as a front end to MRTG for traffic graphing?
-
-In a sense yes for interface or router traffic, but this is not ADVISABLE or
-necessarily efficient, see above. Future versions may make mrtg-dynip more
-suitable as a front end to MRTG for some purposes, see the TODO file.
-
-2. What do I need to run mrtg-dynip?
-
-You need the contribution to MRTG called mrtg-dynip. Latest version
-available from http://www.heenan.ironbark.id.au/mrtg-dynip.
-
-MRTG needs to be successfully installed. MRTG can be obtained from
-http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html. MRTG itself needs
-the GD graphics library, see the MRTG package for details.
-
-3. What platforms does mrtg-dynip run on?
-
-mrtg-dynip should run on all platforms MRTG runs on, including Windows NT.
-Mrtg-dynip's comments are oriented towards running on UNIX style systems.
-such as Linux. There are some comments on configuring directoy names for
-Windows NT. Issues involved in differences between running Perl scripts on
-UNIX systems and NT systems should be known to you, if you run run MRTG on
-an NT machine.
-
-4. Are there special considerations to running mrtg-dynip?
-
-Not really. You must of course ensure mrtg-dynip is executable and can
-write to directories and files it needs to when executed.
-
-4.1 How do I make mrtg-dynip executable?
-
-In UNIX the command
-chmod 744 mrtg-dynip
-will make the file executable to the owner of the file
-
-4.2 How can I ensure mrtg-dynip can write to directories and files
-
-You need to ensure directories (and files if they exist already) have
-appropriate write permissions. This is beyond the scope of this FAQ.
-Basically if you have mrtg working, you will be able to get mrtg-dynip
-working.
-
-5. How do I prevent errors and interpret error messages?
-
-Please see section 4 above. Set up log file generation as indicated in the
-install file. With regard to starup error messages from rateup, see MRTG.
-Confirm SNMP agents are running correctly. After a reboot I have found it
-sometimes necesary to stop and restart the snmp daemon. Changing order
-around in startup file may have fixed this problem. I have found running
-mrtg-dynip manually outside its crond schedule may alter graph data,
-starting anew on some.
-
-5.0 What problems external to mrtg-dynip have been experienced?
-
-Such is the burden of the system adminstrator to be the victim of cryptic
-error messages
-
-5.0.1 Why am I getting losts of weird email from cron?
-
-Check you only have one crond running. If more than one is running then
-expect weird mesages and data loss.
-
-5.0.2 Why does the mrtg-dynip log have weird messages from snmp modules?
-
-If you think your configuration is correct, try killing your snmp daemon,
-restarting it and wait to see if the messages come up again before worrying
-about the messages.
-
-5.2 Why doesn't my email address and web page link show?
-
-Did you remove the comment symbol '#' in the configuration file?
-
-5.3 I have configured everything, yet my index page does not update
-
-The default option is to die if there are any response problems. Try
-changing the $suicidal option. Examine the log file.
-
-5.4 Your crontab example looks really odd, please explain.
-
-First the script gets mrtg to run on the regenerated 'mrtg-dynip.cfg' file.
-The crontab entry is designed to send any error mwessages from standard
-output and error to a log file with a date and time indicator. If you don't
-do this you may end up perplexing/annoying/frightening those on the root
-email distribution list (who are automatically emailed unredirected standard
-output and error from cron jobs), if you run the script as user root. The
-error messages can be confusing to those inexperienced with mrtg and snmp,
-and can be lengthy and frequent!
-
-6. Why do the in and out graphs closely follow each other in my modem bank
-graphs?
-
-This has to do with the way information is reported by by the snmp agent for
-the interface devices. On mainstream ISDN router devices, 'in' appears to
-indicate incoming packets on one side and 'out' appears to be outgoing
-packets on the same side.
-
-For some interfaces, 'in' appears to indicate incoming packets to both sides
-and 'out' appears to mean the forwarded packet out of the interface from
-either sides.
-
-It appears as snmp counts both sides of an interface for counting on some
-devices but one side for other devices. This problem needs to be sorted
-out.
-
-7. I cannot find a solution to my problem in the docmentation and web
-sites. What support exists and is there a mailing list?
-
-This depends on the problem. For problems to do with mrtg there is an
-active mailing list and extensive archive. For problems specific to
-mrtg-dynip please send an email to me at john@heenan.ironbark.id.au.
-I will set up a mailing list if necessasry.
diff --git a/src/contrib/mrtg-dynip/Install b/src/contrib/mrtg-dynip/Install
deleted file mode 100644
index 13c8dca..0000000
--- a/src/contrib/mrtg-dynip/Install
+++ /dev/null
@@ -1,17 +0,0 @@
-Installation of the mrtg-dynip contribution to mrtg
-
-This contribution to mrtg runs independently of an existing running mrtg
-installation.
-
-Only one file is necessary, mrtg-dynip. It is necessary to have mrtg
-successfully installed first and to have an snmp daemon, the snmp agent
-server, running on target hosts. See the FAQ for information on obtaining
-mrtg-dynip and MRTG.
-
-Instructions for configuring mrtg-dynip are included in the mrtg-dynip file.
-To assist with configuration, the actual configuration file used in a live
-ISP is included in the mrtg-dynip-sydnet file
-
-Ensure mrtg-dynip has executable permission (for example, run command chmod
-744 mrtg-dynip) and can write to directories files it is configured to write
-to.
diff --git a/src/contrib/mrtg-dynip/README b/src/contrib/mrtg-dynip/README
deleted file mode 100644
index 11f1bd5..0000000
--- a/src/contrib/mrtg-dynip/README
+++ /dev/null
@@ -1,67 +0,0 @@
-#################################################################
- Multi Dynamic IP Traffic Grapher contibution to mrtg
-#################################################################
-
-Created by John Heenan <john@heenan.ironbark.id.au>
-
-Available from the mrtg-dynip web page at
-http://www.heenan.ironbark.id.au/mrtg-dynip
-
-#################################################################
-
-Distributed under the GPL copyleft of GNU
-
-mrtg-dynip, v 0.41b 1997/10/25
-
-Copyright John Heenan, with exception of datestr subroutine
-(copied from mrtg executable) and much of internal_walk
-subroutine (manner of using snmp modules copied from an example
-by Simon Lenine)
-
-##################################################################
-
-Mrtg-dynip is a contribution to MRTG, enabling MRTG to generate multi
-interface traffic graphs for IP interfaces on hosts that do not provide
-consistent SNMP target numbers for their interfaces. Such IP interfaces
-include IP active serial interfaces attached to modems in a PPP dial in
-environment. The hosts must run snmp agents. For completeness, information
-about interface devices with unvarying SNMP target numbers, such as
-ethernet cards, can be configured to be included.
-
-Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-capacity, when the modems carry PPP or SLIP traffic.
-
-Regenerates a named 'mrtg.cfg' file to ensure snmp data remains with a
-consistent IP number, or overridable IP number of a real physical device
-in a dial in IP environment, rather than with an interface name which
-can get assinged to different real physical devices, and runs mrtg on
-the generated file.
-
-Generates a web index file of stats web pages.
-
-Mrtg-dynip's configuration is simplest where static (or fixed) IP is not
-used for dial into a rotary modem pool.
-
-Please see the FAQ for more information.
-
-The names of the files packaged into mrtg-dynip-0.41b.tar.gz are
-
-README This file
-Install Install details
-FAQ 'Frequently Asked Questions'
-mrtg-dynip A full configuartion commented executable
-mrtg-dynip-sydnet The complete mrtg-dynip file in use at www.stats.syd.net.au
-Changes Change history
-TODO What the future might hold
-
-The package is oriented towards UNIX systems, there is no reason mrtg-dynip
-should nor run under Windows NT, some comments are made relevant to this.
-Please note the first task under Windows NT is to ensure the UNIX new lines
-are converted to DOS new lines or are readable.
-
-If you use this please let me know. If you would also like your site to be
-linked from the mrtg-dynip web page, please let me know.
-
-John Heenan
-john@heenan.ironbark.id.au
-www.heenan.ironbark.id.au/mrtg-dynip
diff --git a/src/contrib/mrtg-dynip/TODO b/src/contrib/mrtg-dynip/TODO
deleted file mode 100644
index ad31c88..0000000
--- a/src/contrib/mrtg-dynip/TODO
+++ /dev/null
@@ -1,32 +0,0 @@
-Investigate integration with terminal server software. such as the RADIUS
-server.
-
-The current release of mrtg-dynip, mrtg-dynip-0.41b, appears to be stable,
-robust and free of major problems arising from misconfiguration and lack of
-response.
-
-While it might seem rather trivial to introduce changes to make mrtg-dynip
-more suitable as a front end to MRTG, this in a sense is somewhat trivial
-in terms of the design goal of mrtg-dynip, namely to enable mrtg-dynip to
-work in environments with inconsistent snmp target names for the same
-phyical interface. This design goal has been achieved. The goal of having
-a convenient and efficient 'front end' to MRTG and mrtg-dynip is a different
-design goal in itself.
-
-It is planned to investigate and test use of the 'ifLastChange' snmp object.
-
-It is planned to introduce configuration to indicate if a host or router has
-unvarying SNMP target numbers for its interfaces, or not. Suitable coding
-will reduce processing demands and reduce the amount of snmp traffic
-generated. This may be trialed with tesing use of the 'ifLastChange' snmp
-object
-
-There are plans to try out terminal server software, such as RADIUS server
-software, with a RADIUS client Livingstone emulator, and see if there are
-any special issues or convenient outcomes involved.
-
-There is much scope for introducing a menu based configuration.
-
-
-
-
diff --git a/src/contrib/mrtg-dynip/mrtg-dynip b/src/contrib/mrtg-dynip/mrtg-dynip
deleted file mode 100755
index 8c38904..0000000
--- a/src/contrib/mrtg-dynip/mrtg-dynip
+++ /dev/null
@@ -1,668 +0,0 @@
-#!/usr/local/bin/perl
-##################################################################
-# Multi Dynamic IP Traffic Grapher contibution to mrtg
-##################################################################
-#
-# Created by John Heenan <john@heenan.ironbark.id.au>
-#
-# Available from http://www.heenan.ironbark.id.au/mrtg-dynip
-#
-##################################################################
-#
-# Distributed under the GPL copyleft of GNU
-#
-# mrtg-dynip, v 0.41b 1997/10/25
-#
-# Copyright John Heenan, with exception of datestr subroutine
-# (copied from mrtg executable) and much of internal_walk
-# subroutine (manner of using snmp modules copied from an example
-# by Simon Lenine)
-#
-###################################################################
-
-#Mrtg-dynip is a contribution to MRTG, enabling MRTG to generate multi
-#interface traffic graphs for IP interfaces on hosts that do not provide
-#consistent SNMP target numbers for their interfaces. Such IP interfaces
-#include IP active serial interfaces attached to modems in a PPP dial in
-#environment. The hosts must run snmp agents. For completeness, information
-#about interface devices with unvarying SNMP target numbers, such as
-#ethernet cards, can be configured to be included.
-
-#Mrtg-dynip's configuration is simplest where static (or fixed) IP is not
-#used for dial into a rotary modem pool.
-
-#Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-#capacity, when the modems carry PPP or SLIP traffic.
-
-#Regenerates a named 'mrtg.cfg' file to ensure snmp data remains with a
-#consistent IP number, or overridable IP number of a real physical device
-#in a dial in IP environment, rather than with an interface name which
-#can get assinged to different real physical devices, and runs mrtg on
-#the generated file.
-
-#Generates a web index file of stats web pages.
-
-#Please see the section 6 of the FAQ for this version for information on
-#for differences in interpreting graphs between some devices
-
-#Briefly, to someone dialling in, dynamic IP means when they dial a rotary
-#number they do not get a consistent IP address. To the service provider it
-#means a unique IP number is assinged to each telephone line/modem/port.
-
-#To someone dialling in, static or fixed IP means that their user name is
-#approved to use a unique IP address, whether they dial into a rotary for
-#a modem bank or into a non rotary number. To the service provider, it means
-#if someone is dialling into a rotary for a modem pool, they allow the modem
-#port use a unique approved IP number for that user, that overrides the IP
-#address used when a dial in user does not request a fixed or static IP.
-
-#The public community should be used, however the public community on a
-#particular host does not need to be named 'public'. This is catered for.
-
-#There is a large 'TODO' list for this contribution, including
-#testing use of the 'ifLastChange' snmp object.
-
-#SET UP
-
-#Runs independently of an existing configured mrtg installation. Following
-#the commented example will make the set up clearer. Examples for a live
-#ISP, using stats page http://www.stats.syd.net.au, are included in file
-#mrtg-dynip-sydnet. You must make appropriate changes
-
-# 0 Ensure the path to the perl binary is set correctly on first line
-# 1 $HTTP_Work_Dir ** Must set
-# 2 $HTTP_index_file Default index.html may be OK if unique
-# 3 $mrtg_Dir ** Must set
-# 4 $mrtgcfg_Dir Setting to $mrtgDir is probably OK
-# 5 $mrtgcfg_file Default mrtg-dynip.cfg should be OK
-# 6 $update Default will work (five minutes)
-# 7 $community_default Default for this default may be OK (public)
-# 8 $email Set to "" to show nothing
-# 9 $home_page Set to "" to show nothing
-# 10 $home_page_descr Set to "" to show nothing
-# 11 $suicidal Non zero: bomb out if there are problems
-# 12 $firewall_masq_tran_if Best to leave as 0 (zero) if sufficient
-# 13 $use_non_dyn_IP_for_tty Safe to set to 0 (the non set value)
-# 14 $Dir_PID Must set if 13 is non zero
-# 15 External settings if 13 is set to non zero
-# 16 $interfaces ** Must set
-
-#Ensure mrtg-dynip has executable permission. See below as to where
-#mrtg-dynip may need to be installed.
-
-#Place a crontab entry, consistent with update time, similar to
-#0,5,10,15,20,25,30,35,40,45,50,55 * * * * <next line continued here>
-#cd /usr/src/mrtg/mrtg-2.5/; date >>/var/log/mrtg-dynip.log;
-#<continues previous line> ./mrtg-dynip >>/var/log/mrtg-dynip.log 2>&1
-#
-#Redirecting standard output and error to a log file with an indication
-#of time from 'date' is valuable for sorting out errors and preventing
-#messages from being emailed to the root account.
-#
-#If Perl5 snmp modules are not installed in standard libraries and
-#the internal 'walk' is being used, then it is necessary to ensure
-#mrtg-dynip in installed in, and run from, a directory where the modules
-#are, typically the same directory the mrtg executable is in.
-
-#The most difficult part in a dynamic IP environment may be choosing the IP
-#addresses to use for the scaler constant $interfaces, as you must ensure
-#the IP address used will always correspond to the physical interface
-#device, unless exception facility configured in.
-
-#For Internet Service Providers running ppp dial in lines, the choice will
-#be clear. The IP addressess to use will be the 'remote' IP part of the
-#command line options for the real physical device (:remote_ip in
-#/etc/ppp/options.ttyXY file), unless static or fixed IP is allowed to
-#override this. For dial out lines that can get a variable 'remote' IP, you
-#should be able to control what remote IP you get, no matter who you dial
-#into and what remote IP they may offer you, by configuring a remote IP as
-#for a dial in line above.
-
-#If the final negotiated ppp address pair as seen by your machine,
-#local_ip:remote_ip, is equal to a_ip:b_ip, then the local_ip:remote_ip as
-#seen by the other machine is b_ip:a_ip. Since the remote IP seen by your
-#side of the line is the local IP as seen and negotiated by the machine on
-#the other side of the line, you can choose whatever remote IP address suits
-#your side of the connection. Specifying a 'remote' IP other than 0.0.0.0
-#will, by default with pppd, result in an IP the other machine will have to
-#accept as their local to succesfully negotiate a connection. However it is
-#two way: the other machine can do the same to you for its corresponding
-#'remote' IP. Hence mrtg-dynip can work on both machines.
-
-#Please note: If you have interface devices which register ppp10 or
-#above, your snmp daemon may not supply information. This is not due
-#to a bug in mrtg, the snmp modules or this mrtg-dynip.
-
-#Latest version of this software should be available from
-#http://www.heenan.ironbark.id.au/source/mrtg-dynip
-
-######## Start of configuration section, numbered 0 to 16.
-
-######## Set this, 0
-#Check the perl path is correct on the very first line!
-
-######## Set this, 1
-#Define $WorkDir to be the directory for web pages and data to be housed
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-$HTTP_Work_Dir='/var/lib/httpd/htdocs/mrtg/';
-
-######## Set this, 2
-#Define name of index html file, only condition is that it not the same name
-#as a html that will be regenerated. All names of generated files contain
-#an IP address.
-$HTTP_index_file='index.html';
-
-####### Set this, 3
-#Set to full directory path the mrtg executable is in. Place this file
-#it if that is where the Perl 5 snmp modules are and $use_internal_walk
-#will not be set to 1 (see below).
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-$mrtg_Dir="/usr/src/mrtg/mrtg-2.5/";
-
-####### Set this, 4
-#Set to full directory path the 'mrtg.cfg' file below is to be placed in.
-#The default choice is to choose same directory as for $mrtg_Dir above
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-###$mrtgcfg_Dir="/usr/src/mrtg/mrtg-2.5/";
-$mrtgcfg_Dir=$mrtg_Dir;
-
-####### Set this, 5
-#Set the name you would like the 'mrtg.cfg' file to be. By locating or
-#naming differently from existing 'mrtg.cfg' files, you can run this
-#software independently of your existing mrtg installation.
-$mrtgcfg_file="mrtg-dynip.cfg";
-
-####### Set this, 6
-#Set this to update interval in amount of minutes. Ensure when this file
-#is run from crond and that the cron run inteval matches this update
-#interval
-$update=5;
-
-######## Set this, 7
-#Default community "public" may be sufficient. The community defined here
-#is the default community to use if no community is defined in the
-#for a particular interface in configuration of $interface in section 12.
-$community_default="public";
-
-######## Set this, 8
-#Email address of network manager(s). Ensure a '\' appears before
-#'@' in email address, as in example.
-#$email=""; #No attempt to display if null
-$email="admin\@our.net";
-
-######## Set this, 9
-#Web address of home page for your system, do not include http:// at start
-#$home_page=""; #No attempt to display if null
-$home_page="www.our.net";
-
-######## Set this, 10
-#Text for clickable link to home page of your system
-#$home_page_descr=""; #No attempt to display if null
-$home_page_descr="Our Network";
-
-######## Set this, 11
-#Set to a non zero if you want the program to die if there are problems
-#with responses from agents or hosts. Useful in testing phase.
-#$suicidal = 0; #Program is to soldier on if there are no responses from a host
-$suicidal = 1; #Program is to bomb out if there are problems with reponses
-
-######## Set this, 12
-#Set this to a non zero if you have interfaces with the same IP number on
-#different masquerading firewall, or address translation, routers/hosts,
-#otherwise leave as 0. This adds the name of the host to all web page file
-#names as well as the IP addresses. Avoid using this option as its use make
-#it more difficult to keep track of interface data.
-#$firewall_masq_tran_if = 1;
-$firewall_masq_tran_if = 0;
-
-######## Set this, 13
-#If you have hosts upon which you do not make it a requirement that an
-#interface device uses a partciular IP number (that is you might provide
-#fixed IP address use into a rotary modem pool) then you can set this option
-#on and set item 17 appropriately. Set to zero not to use, non zero to use
-#$use_non_dyn_IP_for_tty=1;
-$use_non_dyn_IP_for_tty=0;
-
-######## Set this, 14
-#If you set option 13 above, then set to full directory path external
-#process will place a single line with the IP address into a file
-#with name that includes name of SNMP hsot and physical interface device
-#name.
-#
-#Ensure each directory path ends with a seperator. If intending to run on an
-#NT machine, then ensure the directory seperator is '\\' instead of '/'
-$Dir_PID="/var/run/";
-
-######## Set this, 15
-#If you haVe set option 13 above then you need to ensure
-#an external program provides required information from whatever
-#hosts you indicate in 16 are ports that can have their preferred
-#IP overridden.
-#
-#For UNIX style localhosts the following lines can be inserted in
-#/etc/ppp/ip-up and /etc/ppp/ipdown. Following a reboot stale
-#files should be removed automatically by startup, lest the machine
-#crashed. For hosts other than the host upon which this script is
-#running, ip-up and ip-down will need to be modified to ensure the
-#information goes to /var/run of appropriate host. This can be done
-#using remote shell or other mechanisms, such as remote copy, nfs,
-#auto processed email and special client/server networking.
-#
-#It is vital the 'host_name' for writing to /var/run/, as indicated in
-#/var/run/mrtg-dynip.host_name~~ttyXY, matches exactly the equivalent
-#host name in mrtg-dynip. This 'host_name' may be a single name,
-#a dotted name or a dotted numeric IP address.
-#
-#/etc/ppp/ip-up for a localhost running a bash shell can include
-#
-#tty_name="$2"
-#IP_remote="$5"
-#/bin/echo $IP_remote > /var/run/mrtg-dynip.localhost~~${tty_name##/*/}
-#
-#The name of the file must exactly matched that sought for.
-#
-#/etc/ppp/ip-down for a localhost running a bash shell can include
-#
-#tty_name=$2
-#/bin/rm -f /var/run/mrtg-dynip.localhost~~${tty_name##/*/}
-
-######## Set this, 16
-#A pair of lines between blank lines represents an interface on a
-#particular host.
-#
-#You can comment out a single pair of lines with a '#' or any non digit
-#(except whitespace) as the first character of a pair of lines.
-#
-#The first line has the following format
-#'n' 'IP-addr' 'if-speed' 'snmp host' 'snmp community'
-#
-#The second line has the following format
-# 'Any free text description of interface'
-#
-#The items must not be enclosed by '"' or '''. Plese see example
-#below before reading any further. Any whitespace or combination
-#of whitespace (tabs or spaces) can seperate the items. However it
-#is important the two lines with 'END_OF_INTERFACES' end without
-#whitespace.
-#
-#'n' is place this entry is to appear in the index of interfaces web file.
-#The number of digits should be the same for each interface, for example
-#use sequence 000 010 020 for successive numbers. You can temporarily
-#take an interface out of consideration by placing any non digit
-#(except whitespace) before these digits, for example replace 010
-#by N010 or #010
-#
-#'IP-addr' is a consistent IP address of a physical interface. Exceptions
-#can be catered for. If you allow fixed (or static) IP into the physical
-#interface to override, then you can ensure the line is still marked active
-#in addition to the static IP entry being marked active. To ensure this
-#occurs, append '~~ttyXY' to the IP address where ttyXY is the value
-#returned by ${tty_name##/*/} for the phyical device (or port) as indicated
-#in section 15. To keep a value in place, even if the port is not part of
-#an IP overridable rotary pool, append a '~' to the end, such that complete
-#appendage to the IP address is now '~~ttyXY~'. You can keep the appendages
-#even if you turn off, or do nor use, $use_non_dyn_IP_for_tty.
-#
-#'if-speed' is the interface speed in integer bits/sec. K and M multipliers
-#for Kb/s and Mb/s can be used (see example). If you want to use decimal
-#values then rewrite with a lower multiplier, for example write
-#33.3K as 34099 (integer portion of 33.3 multiplied by 1024).
-#
-#'snmp host' is a common and consistent DNS name, or IP address, for
-#interfaces that belong to a particular machine. For efficiency of snmp
-#agent use it is better all interfaces that belong to a particular machine
-#use a consistent name.
-#
-#'snmp community' is the community name of the 'public' community
-#for an interface (the public community does not have to be named
-#'public'). This value does not have to be set: if this value is
-#not set then the value of $community_default is used instead.
-#
-#'Any free text description of the interface ' on the second line
-#is as indicated. It need not begin with whitepace (tabs or spaces).
-#
-#For dynamic IP interfaces, you must use unvarying 'remote' IPs as indicated
-#above. Virtual interface devices should not be used, they provide the same
-#statistics as the real interface they are a virtual interface of.
-
-{
-$interfaces = <<END_OF_INTERFACES
-
-010 123.123.555.123 64K 123.123.444.21
- Router interface
-
-020 123.123.444.20 10M localhost
- Ethernet interface on machine for permanent links and dial up lines
-
-101 123.123.444.1~~ttyC1 33K localhost
- Rotary dial up line 1
-
-102 123.123.444.2 33K localhost
- Fixed dial up line 1
-
-103 123.123.444.3 33K localhost
- Fixed dial up line 2
-
-104 123.123.444.4~~ttyC4 33K localhost
- Rotary dial up line 2
-
-END_OF_INTERFACES
-}
-
-###### You have reached the end of the configuration section, there is no
-#need to make any adjustments below for normal operation.
-
-@lines = split(/\n/,$interfaces);
-$line=0;
-while ($line <= $#lines)
-{
- @elements = split (" ",$lines[$line]);
- if (defined ($elements[3]))
- {
- $order=$elements[0];
- ($ip,$tty) = split (/~~/,$elements[1]);
- $speed = $elements[2];
- $snmp_host = $elements[3];
- $community = defined ($elements[4]) ? $elements[4] : $community_default;
- $descr=$lines[$line+1];
- $descr =~ s/^\s*//;
- $ip_descr{$ip."@".$snmp_host} = [$order,$speed,$community,$descr];
- $snmp_comm_host{$community."@".$snmp_host}{$ip}=1;
- $dyn_port{$snmp_host."~~".$tty} = $ip if ($use_non_dyn_IP_for_tty && $tty && $tty !~ /~$/);
- $line=$line+2;
- }
- else
- {
- $line++;
- }
-}
-
-#Use Simon Leinen's Perl 5 snmp modules included with mrtg
-#consistent with manner Simon uses in examples
-{
-&snmp_get_response;
-}
-
-if ($use_non_dyn_IP_for_tty != 0)
-{
- foreach $tty (keys(%dyn_port))
- {
- if ( -e $Dir_PID."mrtg-dynip.".$tty )
- {
- ($snmp_host) = split (/~~/,$tty);
- if ( (defined($target{$dyn_port{$tty}."@".$snmp_host})) == 0)
- {
- $ip_active = `cat $Dir_PID"mrtg-dynip."$tty`;
- $ip_active =~ s/\s+$//;
- if (defined ( $target{$ip_active."@".$snmp_host}))
- {
-$target{$dyn_port{$tty}."@".$snmp_host} = $target{$ip_active."@".$snmp_host};
- }
- }
- }
- }
-}
-
-open MRTGCFG, ">$mrtg_Dir"."$mrtgcfg_file"
- || die "$mrtg_Dir"."$mrtgcfg_file file could not be opened\n";
-
-$ip_descr_ptr = \%ip_descr;
-
-foreach $ip_i (keys(%target))
-{
-if ($$ip_descr_ptr{$ip_i}->[0] =~ /^\d/)
-{
-($speed_fig,$speed_mult) = $$ip_descr_ptr{$ip_i}->[1] =~ /^(\d+)(\D*)/;
-if ($speed_mult =~ /M|m/)
-{
- $scale = int ( $speed_fig * 1024 * 1024 / 8 );
-}
-elsif ($speed_mult =~ /K|k/)
-{
- $scale = int ( $speed_fig * 1024 / 8 );
-}
-elsif ( $speed_mult eq "" )
-{
- $scale = int ( $speed_fig / 8 );
-}
-else
-{
- die("Incorrect speed format in scaler constant $interfaces\n");
-}
-
-($ip_if,$host) = split (/@/,$ip_i);
-if ($firewall_masq_tran_if != 0)
-{
-$snmp_target=$ip_i;
-}
-else
-{
-$snmp_target=$ip_if;
-}
-
-print MRTGCFG <<END
-Target[$snmp_target]: $target{$ip_i}:$$ip_descr_ptr{$ip_i}->[2]\@$host
-MaxBytes[$snmp_target]: $scale
-Title[$snmp_target]: Traffic Analysis through interface device with IP address $ip_if of host $host
-PageTop[$snmp_target]: <H1>Stats for interface device with description $$ip_descr_ptr{$ip_i}->[3]</H1>
-
-END
-}
-}
-{
-print MRTGCFG <<END
-
-WorkDir: $HTTP_Work_Dir
-END
-}
-close MRTGCFG;
-
-$interval = $update * 60;
-$expires = gmtime (time + $interval + 60);
-$now=&datestr(time);
-
-open MRTGCFGWEB, ">$HTTP_Work_Dir"."$HTTP_index_file"
- || die "Mrtg web index file could not be created\n";
-{
-print MRTGCFGWEB <<END
-<HTML><HEAD>
-<META HTTP-EQUIV=\"Refresh\" CONTENT=\"$interval\">
-<META HTTP-EQUIV=\"Expires\" CONTENT=\"$expires GMT\">
-
-<TITLE>Index of stats pages for interface devices on interfaces described below</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
-<FONT FACE="Arial,Helvetica">
-<H1>Active and inactive interace device stats on interfaces described below</H1>
-This page last updated on $now<p>
-END
-}
-
-if ($home_page && $home_page_descr)
-{
-print MRTGCFGWEB <<END
-<p>
-A network management service courtesy of <a href=\"http://$home_page\">
-$home_page_descr</a>
-<p>
-END
-}
-
-if ($email)
-{
-print MRTGCFGWEB <<END
-<p>
-Information and contact address: network management at email
-<a href=\"mailto:$email\">$email</a>
-<p>
-END
-}
-
-{
-print MRTGCFGWEB <<END
-<p>
-Static IP address and rotary line both marked active if line
-in use by a static IP address
-<p>
-END
-}
-
-{
-print MRTGCFGWEB <<END
-</FONT>
-<table>
-END
-}
-
-foreach $ip_i (keys %ip_descr)
-{
-$ip_order{$$ip_descr_ptr{$ip_i}->[0]} = $ip_i if ($$ip_descr_ptr{$ip_i}->[0] =~ /^\d/);
-}
-
-foreach $i (sort (keys %ip_order))
-{
-$ip_i = $ip_order{$i};
-
-if ($firewall_masq_tran_if != 0)
-{
-$file_name=$ip_i;
-}
-else
-{
-($file_name) = split (/@/,$ip_i);
-}
-
-if ( defined ($target{$ip_i}) )
-{
-print MRTGCFGWEB <<END
-<tr><td><FONT FACE="Arial,Helvetica">ACTIVE</FONT></td> <td><FONT FACE="Arial,Helvetica"><A HREF=\"$file_name.html\">$$ip_descr_ptr{$ip_i}->[3]</a></FONT></td></tr>
-END
-}
-else
-{
-print MRTGCFGWEB <<END
-<tr><td><FONT FACE="Arial,Helvetica">INACTIVE</FONT></td> <td><FONT FACE="Arial,Helvetica"><A HREF=\"$file_name.html\">$$ip_descr_ptr{$ip_i}->[3]</a></td></FONT></tr>
-END
-}
-}
-{
-print MRTGCFGWEB <<END
-</table>
-<FONT FACE="Arial,Helvetica">
-<p> This web page (but not the web pages above)
-generated by mrtg-dynip, version 0.41b, 1997/10/25
-created by <br>John Heenan, <a
-href="mailto:john\@heenan.ironbark.id.au">john\@heenan.ironbark.id.au</a>
-
-<P>Mrtg-dynip is a contribution to MRTG, enabling MRTG to generate multi
-interface traffic graphs for IP interfaces on hosts that do not provide
-consistent SNMP target numbers for their interfaces. Such IP interfaces
-include IP active serial interfaces attached to modems in a PPP dial in
-environment. The hosts must run snmp agents. For completeness, information
-about interface devices with unvarying SNMP target numbers, such as
-ethernet cards, can be configured to be included.<P>
-
-Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-capacity, when the modems carry PPP or SLIP traffic.<P>
-
-This web page and web pages above, auto update details, and refresh, every
-$update minutes.<p>
-
-Source code for the latest non beta version of the mrtg-dynip software
-contribution is available from <a
-href="http://www.heenan.ironbark.id.au/source/mrtg-dynip">
-http://www.heenan.ironbark.id.au/source/mrtg-dynip</a><p>
-END
-}
-
-print MRTGCFGWEB "</FONT></BODY></HTML>","\n";
-
-close MRTGCFGWEB;
-
-exec ("$mrtg_Dir"."mrtg $mrtgcfg_Dir"."$mrtgcfg_file");
-
-sub datestr {
-($time) = shift(@_) || return 0;
-($wday) = ('Sunday','Monday','Tuesday','Wednesday',
- 'Thursday','Friday','Saturday')[(localtime($time))[6]];
-($month) = ('January','February' ,'March' ,'April' ,
- 'May' , 'June' , 'July' , 'August' , 'September' ,
- 'October' ,
- 'November' , 'December' )[(localtime($time))[4]];
-($mday,$year,$hour,$min) = (localtime($time))[3,5,2,1];
-if ($min<10) {$min = "0$min";}
-return "$wday, $mday $month ".($year+1900)." at $hour:$min";
-}
-
-sub snmp_get_response
-{
-use BER;
-use SNMP_Session;
-
-SOLDIER_ON: foreach $comm_host (keys (%snmp_comm_host))
-{
-($community,$host) = split (/@/,$comm_host);
-if ($session = SNMP_Session->open ($host, $community, 161))
-{
-@ipRouteIfIndex = split ('\.', '1.3.6.1.2.1.4.21.1.2');
-@ipAdEntIfIndex = split ('\.', '1.3.6.1.2.1.4.20.1.2');
-$if_route_index_index = encode_oid (@ipRouteIfIndex);
-$if_index_index = encode_oid (@ipAdEntIfIndex);
-
- @oids = ($if_route_index_index);
- for (;;) {
- if ($session->getnext_request_response (@oids)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- @next_oids = ();
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- last unless BER::encoded_oid_prefix_p ($if_route_index_index, $oid);
- push @next_oids, $oid;
- ($ip_if) = pretty_print ($oid) =~ /.*\.(\d+\.\d+\.\d+\.\d+)$/;
- $target_i = pretty_print ($value);
- $target{$ip_if."@".$host} = $target_i if ( defined ($snmp_comm_host{$community."@".$host}{$ip_if}) );
- } else
- {
- die ("Suicide: no response from community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: no response from community $community on host $host","\n");
- $session->close ();
- last SOLDIER_ON;
- }
- @oids = @next_oids;
- }
-
- @oids = ($if_index_index);
- for (;;) {
- if ($session->getnext_request_response (@oids)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- @next_oids = ();
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- last unless BER::encoded_oid_prefix_p ($if_index_index, $oid);
- push @next_oids, $oid;
- ($ip_if) = pretty_print ($oid) =~ /.*\.(\d+\.\d+\.\d+\.\d+)$/;
- $target_i = pretty_print ($value);
- $target{$ip_if."@".$host} = $target_i if ( defined ($snmp_comm_host{$community."@".$host}{$ip_if}) );
- } else
- {
- die ("Suicide: no response from community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: no response from community $community on host $host","\n");
- $session->close ();
- last SOLDIER_ON;
- }
- @oids = @next_oids;
- }
-$session->close ();
-}
-else
- {
- die ("Suicide: unable to open SNMP session to community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: unable to open SNMP session to community $community on host $host","\n");
- }
-}
-}
diff --git a/src/contrib/mrtg-dynip/mrtg-dynip-sydnet b/src/contrib/mrtg-dynip/mrtg-dynip-sydnet
deleted file mode 100644
index addc14b..0000000
--- a/src/contrib/mrtg-dynip/mrtg-dynip-sydnet
+++ /dev/null
@@ -1,727 +0,0 @@
-#!/usr/local/bin/perl
-##################################################################
-# Multi Dynamic IP Traffic Grapher contibution to mrtg
-##################################################################
-#
-# Created by John Heenan <john@heenan.ironbark.id.au>
-#
-# Available from http://www.heenan.ironbark.id.au/mrtg-dynip
-#
-##################################################################
-#
-# Distributed under the GPL copyleft of GNU
-#
-# mrtg-dynip, v 0.41b 1997/10/25
-#
-# Copyright John Heenan, with exception of datestr subroutine
-# (copied from mrtg executable) and much of internal_walk
-# subroutine (manner of using snmp modules copied from an example
-# by Simon Lenine)
-#
-###################################################################
-
-#Mrtg-dynip is a contribution to MRTG, enabling MRTG to generate multi
-#interface traffic graphs for IP interfaces on hosts that do not provide
-#consistent SNMP target numbers for their interfaces. Such IP interfaces
-#include IP active serial interfaces attached to modems in a PPP dial in
-#environment. The hosts must run snmp agents. For completeness, information
-#about interface devices with unvarying SNMP target numbers, such as
-#ethernet cards, can be configured to be included.
-
-#Mrtg-dynip's configuration is simplest where static (or fixed) IP is not
-#used for dial into a rotary modem pool.
-
-#Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-#capacity, when the modems carry PPP or SLIP traffic.
-
-#Regenerates a named 'mrtg.cfg' file to ensure snmp data remains with a
-#consistent IP number, or overridable IP number of a real physical device
-#in a dial in IP environment, rather than with an interface name which
-#can get assinged to different real physical devices, and runs mrtg on
-#the generated file.
-
-#Generates a web index file of stats web pages.
-
-#Please see the section 6 of the FAQ for this version for information on
-#for differences in interpreting graphs between some devices
-
-#Briefly, to someone dialling in, dynamic IP means when they dial a rotary
-#number they do not get a consistent IP address. To the service provider it
-#means a unique IP number is assinged to each telephone line/modem/port.
-
-#To someone dialling in, static or fixed IP means that their user name is
-#approved to use a unique IP address, whether they dial into a rotary for
-#a modem bank or into a non rotary number. To the service provider, it means
-#if someone is dialling into a rotary for a modem pool, they allow the modem
-#port use a unique approved IP number for that user, that overrides the IP
-#address used when a dial in user does not request a fixed or static IP.
-
-#The public community should be used, however the public community on a
-#particular host does not need to be named 'public'. This is catered for.
-
-#There is a large 'TODO' list for this contribution, including
-#testing use of the 'ifLastChange' snmp object.
-
-#SET UP
-
-#Runs independently of an existing configured mrtg installation. Following
-#the commented example will make the set up clearer. The examples are for a
-#live ISP using web page http://www.stats.syd.net.au, you must change values
-#for your own use
-
-# 0 Ensure the path to the perl binary is set correctly on first line
-# 1 $HTTP_Work_Dir ** Must set
-# 2 $HTTP_index_file Default index.html may be OK if unique
-# 3 $mrtg_Dir ** Must set
-# 4 $mrtgcfg_Dir Setting to $mrtgDir is probably OK
-# 5 $mrtgcfg_file Default mrtg-dynip.cfg should be OK
-# 6 $update Default will work (five minutes)
-# 7 $community_default Default for this default may be OK (public)
-# 8 $email Set to "" to show nothing
-# 9 $home_page Set to "" to show nothing
-# 10 $home_page_descr Set to "" to show nothing
-# 11 $suicidal Non zero: bomb out if there are problems
-# 12 $firewall_masq_tran_if Best to leave as 0 (zero) if sufficient
-# 13 $use_non_dyn_IP_for_tty Safe to set to 0 (the non set value)
-# 14 $Dir_PID Must set if 13 is non zero
-# 15 External settings if 13 is set to non zero
-# 16 $interfaces ** Must set
-
-#Ensure mrtg-dynip has executable permission. See below as to where
-#mrtg-dynip may need to be installed.
-
-#Place a crontab entry, consistent with update time, similar to
-#0,5,10,15,20,25,30,35,40,45,50,55 * * * * <next line continued here>
-#cd /usr/src/mrtg/mrtg-2.5/; date >>/var/log/mrtg-dynip.log;
-#<continues previous line> ./mrtg-dynip >>/var/log/mrtg-dynip.log 2>&1
-#
-#Redirecting standard output and error to a log file with an indication
-#of time from 'date' is valuable for sorting out errors and preventing
-#messages from being emailed to the root account.
-#
-#If Perl5 snmp modules are not installed in standard libraries and
-#the internal 'walk' is being used, then it is necessary to ensure
-#mrtg-dynip in installed in, and run from, a directory where the modules
-#are, typically the same directory the mrtg executable is in.
-
-#The most difficult part in a dynamic IP environment may be choosing the IP
-#addresses to use for the scaler constant $interfaces, as you must ensure
-#the IP address used will always correspond to the physical interface
-#device, unless exception facility configured in.
-
-#For Internet Service Providers running ppp dial in lines, the choice will
-#be clear. The IP addressess to use will be the 'remote' IP part of the
-#command line options for the real physical device (:remote_ip in
-#/etc/ppp/options.ttyXY file), unless static or fixed IP is allowed to
-#override this. For dial out lines that can get a variable 'remote' IP, you
-#should be able to control what remote IP you get, no matter who you dial
-#into and what remote IP they may offer you, by configuring a remote IP as
-#for a dial in line above.
-
-#If the final negotiated ppp address pair as seen by your machine,
-#local_ip:remote_ip, is equal to a_ip:b_ip, then the local_ip:remote_ip as
-#seen by the other machine is b_ip:a_ip. Since the remote IP seen by your
-#side of the line is the local IP as seen and negotiated by the machine on
-#the other side of the line, you can choose whatever remote IP address suits
-#your side of the connection. Specifying a 'remote' IP other than 0.0.0.0
-#will, by default with pppd, result in an IP the other machine will have to
-#accept as their local to succesfully negotiate a connection. However it is
-#two way: the other machine can do the same to you for its corresponding
-#'remote' IP. Hence mrtg-dynip can work on both machines.
-
-#Please note: If you have interface devices which register ppp10 or
-#above, your snmp daemon may not supply information. This is not due
-#to a bug in mrtg, the snmp modules or this mrtg-dynip.
-
-#Latest version of this software should be available from
-#http://www.heenan.ironbark.id.au/source/mrtg-dynip
-#The configuration herein is provivded as an example only.
-#This file is used to generate http://www.stats.syd.net.au.
-
-######## Start of configuration section, numbered 0 to 16.
-
-######## Set this, 0
-#Check the perl path is correct on the very first line!
-
-######## Set this, 1
-#Define $WorkDir to be the directory for web pages and data to be housed
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-$HTTP_Work_Dir='/var/lib/httpd/htdocs/mrtg/';
-
-######## Set this, 2
-#Define name of index html file, only condition is that it not the same name
-#as a html that will be regenerated. All names of generated files contain
-#an IP address.
-$HTTP_index_file='index.html';
-
-####### Set this, 3
-#Set to full directory path the mrtg executable is in. Place this file
-#it if that is where the Perl 5 snmp modules are and $use_internal_walk
-#will not be set to 1 (see below).
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-$mrtg_Dir="/usr/src/mrtg/mrtg-2.5/";
-
-####### Set this, 4
-#Set to full directory path the 'mrtg.cfg' file below is to be placed in.
-#The default choice is to choose same directory as for $mrtg_Dir above
-#Ensure each directory path ends with a seperator. If intending to run on
-#an NT machine, then ensure the directory seperator is '\\' instead of '/'
-###$mrtgcfg_Dir="/usr/src/mrtg/mrtg-2.5/";
-$mrtgcfg_Dir=$mrtg_Dir;
-
-####### Set this, 5
-#Set the name you would like the 'mrtg.cfg' file to be. By locating or
-#naming differently from existing 'mrtg.cfg' files, you can run this
-#software independently of your existing mrtg installation.
-$mrtgcfg_file="mrtg-dynip.cfg";
-
-####### Set this, 6
-#Set this to update interval in amount of minutes. Ensure when this file
-#is run from crond and that the cron run inteval matches this update
-#interval
-$update=5;
-
-######## Set this, 7
-#Default community "public" may be sufficient. The community defined here
-#is the default community to use if no community is defined in the
-#for a particular interface in configuration of $interface in section 12.
-$community_default="public";
-
-######## Set this, 8
-#Email address of network manager(s). Ensure a '\' appears before
-#'@' in email address, as in example.
-#$email=""; #No attempt to display if null
-$email="admin\@syd.net.au";
-
-######## Set this, 9
-#Web address of home page for your system, do not include http:// at start
-#$home_page=""; #No attempt to display if null
-$home_page="www.syd.net.au";
-
-######## Set this, 10
-#Text for clickable link to home page of your system
-#$home_page_descr=""; #No attempt to display if null
-$home_page_descr="SydNet Internet and Network Services";
-
-######## Set this, 11
-#Set to a non zero if you want the program to die if there are problems
-#with responses from agents or hosts. Useful in testing phase.
-#$suicidal = 0; #Program is to soldier on if there are no responses from a host
-$suicidal = 1; #Program is to bomb out if there are problems with reponses
-
-######## Set this, 12
-#Set this to a non zero if you have interfaces with the same IP number on
-#different masquerading firewall, or address translation, routers/hosts,
-#otherwise leave as 0. This adds the name of the host to all web page file
-#names as well as the IP addresses. Avoid using this option as its use make
-#it more difficult to keep track of interface data.
-#$firewall_masq_tran_if = 1;
-$firewall_masq_tran_if = 0;
-
-######## Set this, 13
-#If you have hosts upon which you do not make it a requirement that an
-#interface device uses a partciular IP number (that is you might provide
-#fixed IP address use into a rotary modem pool) then you can set this option
-#on and set item 17 appropriately. Set to zero not to use, non zero to use
-$use_non_dyn_IP_for_tty=1;
-#$use_non_dyn_IP_for_tty=0;
-
-######## Set this, 14
-#If you set option 13 above, then set to full directory path external
-#process will place a single line with the IP address into a file
-#with name that includes name of SNMP hsot and physical interface device
-#name.
-#
-#Ensure each directory path ends with a seperator. If intending to run on an
-#NT machine, then ensure the directory seperator is '\\' instead of '/'
-$Dir_PID="/var/run/";
-
-######## Set this, 15
-#If you haVe set option 13 above then you need to ensure
-#an external program provides required information from whatever
-#hosts you indicate in 16 are ports that can have their preferred
-#IP overridden.
-#
-#For UNIX style localhosts the following lines can be inserted in
-#/etc/ppp/ip-up and /etc/ppp/ipdown. Following a reboot stale
-#files should be removed automatically by startup, lest the machine
-#crashed. For hosts other than the host upon which this script is
-#running, ip-up and ip-down will need to be modified to ensure the
-#information goes to /var/run of appropriate host. This can be done
-#using remote shell or other mechanisms, such as remote copy, nfs,
-#auto processed email and special client/server networking.
-#
-#It is vital the 'host_name' for writing to /var/run/, as indicated in
-#/var/run/mrtg-dynip.host_name~~ttyXY, matches exactly the equivalent
-#host name in mrtg-dynip. This 'host_name' may be a single name,
-#a dotted name or a dotted numeric IP address.
-#
-#/etc/ppp/ip-up for a localhost running a bash shell can include
-#
-#tty_name="$2"
-#IP_remote="$5"
-#/bin/echo $IP_remote > /var/run/mrtg-dynip.localhost~~${tty_name##/*/}
-#
-#The name of the file must exactly matched that sought for.
-#
-#/etc/ppp/ip-down for a localhost running a bash shell can include
-#
-#tty_name=$2
-#/bin/rm -f /var/run/mrtg-dynip.localhost~~${tty_name##/*/}
-
-######## Set this, 16
-#A pair of lines between blank lines represents an interface on a
-#particular host.
-#
-#You can comment out a single pair of lines with a '#' or any non digit
-#(except whitespace) as the first character of a pair of lines.
-#
-#The first line has the following format
-#'n' 'IP-addr' 'if-speed' 'snmp host' 'snmp community'
-#
-#The second line has the following format
-# 'Any free text description of interface'
-#
-#The items must not be enclosed by '"' or '''. Plese see example
-#below before reading any further. Any whitespace or combination
-#of whitespace (tabs or spaces) can seperate the items. However it
-#is important the two lines with 'END_OF_INTERFACES' end without
-#whitespace.
-#
-#'n' is place this entry is to appear in the index of interfaces web file.
-#The number of digits should be the same for each interface, for example
-#use sequence 000 010 020 for successive numbers. You can temporarily
-#take an interface out of consideration by placing any non digit
-#(except whitespace) before these digits, for example replace 010
-#by N010 or #010
-#
-#'IP-addr' is a consistent IP address of a physical interface. Exceptions
-#can be catered for. If you allow fixed (or static) IP into the physical
-#interface to override, then you can ensure the line is still marked active
-#in addition to the static IP entry being marked active. To ensure this
-#occurs, append '~~ttyXY' to the IP address where ttyXY is the value
-#returned by ${tty_name##/*/} for the phyical device (or port) as indicated
-#in section 15. To keep a value in place, even if the port is not part of
-#an IP overridable rotary pool, append a '~' to the end, such that complete
-#appendage to the IP address is now '~~ttyXY~'. You can keep the appendages
-#even if you turn off, or do nor use, $use_non_dyn_IP_for_tty.
-#
-#'if-speed' is the interface speed in integer bits/sec. K and M multipliers
-#for Kb/s and Mb/s can be used (see example). If you want to use decimal
-#values then rewrite with a lower multiplier, for example write
-#33.3K as 34099 (integer portion of 33.3 multiplied by 1024).
-#
-#'snmp host' is a common and consistent DNS name, or IP address, for
-#interfaces that belong to a particular machine. For efficiency of snmp
-#agent use it is better all interfaces that belong to a particular machine
-#use a consistent name.
-#
-#'snmp community' is the community name of the 'public' community
-#for an interface (the public community does not have to be named
-#'public'). This vale does not have to be set: if this value is
-#not set then the value of $community_default is used instead.
-#
-#'Any free text description of the interface ' on the second line
-#is as indicated. It need not begin with whitepace (tabs or spaces).
-#
-#For dynamic IP interfaces, you must use unvarying 'remote' IPs as indicated
-#above. Virtual interface devices should not be used, they provide the same
-#statistics as the real interface they are a virtual interface of.
-
-#The configuration herein is provivded as an example only.
-#This file is used to generate http://www.stats.syd.net.au.
-
-{
-$interfaces = <<END_OF_INTERFACES
-
-010 139.130.36.136 64K 203.35.74.100
- SydNet - Telstra Internet link: 64K ISDN router interface connected 14 October 1997
-
-020 203.35.74.101 10M localhost
- Ethernet interface on machine for permanent links and dial up lines
-
-040 203.35.74.9~~ttyC9~ 33K localhost
- Permanent link for user pmw
-
-050 203.35.74.120~~ttyC10~ 33K localhost
- Permanent link for machine chaosorb.syd.net.au
-
-060 203.35.74.11~~ttyC11~ 33K localhost
- Permanent link for domain arty.com.au
-
-073 203.35.74.108 33K localhost
- Static IP address for SydNet technical and sys admin staff member
-
-076 203.35.74.107 33K localhost
- Static IP address for SydNet security staff member
-
-079 203.35.74.105 33 localhost
- Static IP address for non permanent rotary dial in user foo
-
-081 203.35.74.109 33K localhost
- Static IP address for non permanent rotary dial in user kebo
-
-101 203.35.74.1~~ttyC1 33K localhost
- Rotary dial up line 1
-
-102 203.35.74.2~~ttyC2 33K localhost
- Rotary dial up line 2
-
-103 203.35.74.3~~ttyC3 33K localhost
- Rotary dial up line 3
-
-104 203.35.74.4~~ttyC4 33K localhost
- Rotary dial up line 4
-
-105 203.35.74.5~~ttyC5 33K localhost
- Rotary dial up line 5
-
-106 203.35.74.6~~ttyC6 33K localhost
- Rotary dial up line 6
-
-107 203.35.74.7~~ttyC7 33K localhost
- Rotary dial up line 7
-
-108 203.35.74.8~~ttyC8 33K localhost
- Rotary dial up line 8
-
-109 203.35.74.10~~ttyC0 33K localhost
- Rotary dial up line 9
-
-END_OF_INTERFACES
-}
-
-#Convenient record of tty to dynamic IP mappings on localhost
-#ttyC0 203.35.74.10
-#ttyC1 203.35.74.1
-#ttyC2 203.35.74.2
-#ttyC3 203.35.74.3
-#ttyC4 203.35.74.4
-#ttyC5 203.35.74.5
-#ttyC6 203.35.74.6
-#ttyC7 203.35.74.7
-#ttyC8 203.35.74.8
-#ttyC9~ 203.35.74.9
-#ttyC10~ 203.35.74.120
-#ttyC11~ 203.35.74.11
-#ttyC12 203.35.74.12
-#ttyC13 203.35.74.13
-#ttyC14 203.35.74.14
-#ttyC15 203.35.74.15
-
-###### You have reached the end of the configuration section, there is no
-#need to make any adjustments below for normal operation.
-
-@lines = split(/\n/,$interfaces);
-$line=0;
-while ($line <= $#lines)
-{
- @elements = split (" ",$lines[$line]);
- if (defined ($elements[3]))
- {
- $order=$elements[0];
- ($ip,$tty) = split (/~~/,$elements[1]);
- $speed = $elements[2];
- $snmp_host = $elements[3];
- $community = defined ($elements[4]) ? $elements[4] : $community_default;
- $descr=$lines[$line+1];
- $descr =~ s/^\s*//;
- $ip_descr{$ip."@".$snmp_host} = [$order,$speed,$community,$descr];
- $snmp_comm_host{$community."@".$snmp_host}{$ip}=1;
- $dyn_port{$snmp_host."~~".$tty} = $ip if ($use_non_dyn_IP_for_tty && $tty && $tty !~ /~$/);
- $line=$line+2;
- }
- else
- {
- $line++;
- }
-}
-
-#Use Simon Leinen's Perl 5 snmp modules included with mrtg
-#consistent with manner Simon uses in examples
-{
-&snmp_get_response;
-}
-
-if ($use_non_dyn_IP_for_tty != 0)
-{
- foreach $tty (keys(%dyn_port))
- {
- if ( -e $Dir_PID."mrtg-dynip.".$tty )
- {
- ($snmp_host) = split (/~~/,$tty);
- if ( (defined($target{$dyn_port{$tty}."@".$snmp_host})) == 0)
- {
- $ip_active = `cat $Dir_PID"mrtg-dynip."$tty`;
- $ip_active =~ s/\s+$//;
- if (defined ( $target{$ip_active."@".$snmp_host}))
- {
-$target{$dyn_port{$tty}."@".$snmp_host} = $target{$ip_active."@".$snmp_host};
- }
- }
- }
- }
-}
-
-open MRTGCFG, ">$mrtg_Dir"."$mrtgcfg_file"
- || die "$mrtg_Dir"."$mrtgcfg_file file could not be opened\n";
-
-$ip_descr_ptr = \%ip_descr;
-
-foreach $ip_i (keys(%target))
-{
-if ($$ip_descr_ptr{$ip_i}->[0] =~ /^\d/)
-{
-($speed_fig,$speed_mult) = $$ip_descr_ptr{$ip_i}->[1] =~ /^(\d+)(\D*)/;
-if ($speed_mult =~ /M|m/)
-{
- $scale = int ( $speed_fig * 1024 * 1024 / 8 );
-}
-elsif ($speed_mult =~ /K|k/)
-{
- $scale = int ( $speed_fig * 1024 / 8 );
-}
-elsif ( $speed_mult eq "" )
-{
- $scale = int ( $speed_fig / 8 );
-}
-else
-{
- die("Incorrect speed format in scaler constant $interfaces\n");
-}
-
-($ip_if,$host) = split (/@/,$ip_i);
-if ($firewall_masq_tran_if != 0)
-{
-$snmp_target=$ip_i;
-}
-else
-{
-$snmp_target=$ip_if;
-}
-
-print MRTGCFG <<END
-Target[$snmp_target]: $target{$ip_i}:$$ip_descr_ptr{$ip_i}->[2]\@$host
-MaxBytes[$snmp_target]: $scale
-Title[$snmp_target]: Traffic Analysis through interface device with IP address $ip_if of host $host
-PageTop[$snmp_target]: <H1>Stats for interface device with description $$ip_descr_ptr{$ip_i}->[3]</H1>
-
-END
-}
-}
-{
-print MRTGCFG <<END
-
-WorkDir: $HTTP_Work_Dir
-END
-}
-close MRTGCFG;
-
-$interval = $update * 60;
-$expires = gmtime (time + $interval + 60);
-$now=&datestr(time);
-
-open MRTGCFGWEB, ">$HTTP_Work_Dir"."$HTTP_index_file"
- || die "Mrtg web index file could not be created\n";
-{
-print MRTGCFGWEB <<END
-<HTML><HEAD>
-<META HTTP-EQUIV=\"Refresh\" CONTENT=\"$interval\">
-<META HTTP-EQUIV=\"Expires\" CONTENT=\"$expires GMT\">
-
-<TITLE>Index of stats pages for interface devices on interfaces described below</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
-<FONT FACE="Arial,Helvetica">
-<H1>Active and inactive interace device stats on interfaces described below</H1>
-This page last updated on $now<p>
-END
-}
-
-if ($home_page && $home_page_descr)
-{
-print MRTGCFGWEB <<END
-<p>
-A network management service courtesy of <a href=\"http://$home_page\">
-$home_page_descr</a>
-<p>
-END
-}
-
-if ($email)
-{
-print MRTGCFGWEB <<END
-<p>
-Information and contact address: network management at email
-<a href=\"mailto:$email\">$email</a>
-<p>
-END
-}
-
-{
-print MRTGCFGWEB <<END
-<p>
-Static IP address and rotary line both marked active if line
-in use by a static IP address
-<p>
-END
-}
-
-{
-print MRTGCFGWEB <<END
-</FONT>
-<table>
-END
-}
-
-foreach $ip_i (keys %ip_descr)
-{
-$ip_order{$$ip_descr_ptr{$ip_i}->[0]} = $ip_i if ($$ip_descr_ptr{$ip_i}->[0] =~ /^\d/);
-}
-
-foreach $i (sort (keys %ip_order))
-{
-$ip_i = $ip_order{$i};
-
-if ($firewall_masq_tran_if != 0)
-{
-$file_name=$ip_i;
-}
-else
-{
-($file_name) = split (/@/,$ip_i);
-}
-
-if ( defined ($target{$ip_i}) )
-{
-print MRTGCFGWEB <<END
-<tr><td><FONT FACE="Arial,Helvetica">ACTIVE</FONT></td> <td><FONT FACE="Arial,Helvetica"><A HREF=\"$file_name.html\">$$ip_descr_ptr{$ip_i}->[3]</a></FONT></td></tr>
-END
-}
-else
-{
-print MRTGCFGWEB <<END
-<tr><td><FONT FACE="Arial,Helvetica">INACTIVE</FONT></td> <td><FONT FACE="Arial,Helvetica"><A HREF=\"$file_name.html\">$$ip_descr_ptr{$ip_i}->[3]</a></td></FONT></tr>
-END
-}
-}
-{
-print MRTGCFGWEB <<END
-</table>
-<FONT FACE="Arial,Helvetica">
-<p> This web page (but not the web pages above)
-generated by mrtg-dynip, version 0.41b, 1997/10/25
-created by <br>John Heenan, <a
-href="mailto:john\@heenan.ironbark.id.au">john\@heenan.ironbark.id.au</a>
-
-<P>Mrtg-dynip is a contribution to MRTG, enabling MRTG to generate multi
-interface traffic graphs for IP interfaces on hosts that do not provide
-consistent SNMP target numbers for their interfaces. Such IP interfaces
-include IP active serial interfaces attached to modems in a PPP dial in
-environment. The hosts must run snmp agents. For completeness, information
-about interface devices with unvarying SNMP target numbers, such as
-ethernet cards, can be configured to be included.<P>
-
-Mrtg-dynip can be considred to have sophisticated modem bank monitoring
-capacity, when the modems carry PPP or SLIP traffic.<P>
-
-This web page and web pages above, auto update details, and refresh, every
-$update minutes.<p>
-
-Source code for the latest non beta version of the mrtg-dynip software
-contribution is available from <a
-href="http://www.heenan.ironbark.id.au/source/mrtg-dynip">
-http://www.heenan.ironbark.id.au/source/mrtg-dynip</a><p>
-END
-}
-
-print MRTGCFGWEB "</FONT></BODY></HTML>","\n";
-
-close MRTGCFGWEB;
-
-exec ("$mrtg_Dir"."mrtg $mrtgcfg_Dir"."$mrtgcfg_file");
-
-sub datestr {
-($time) = shift(@_) || return 0;
-($wday) = ('Sunday','Monday','Tuesday','Wednesday',
- 'Thursday','Friday','Saturday')[(localtime($time))[6]];
-($month) = ('January','February' ,'March' ,'April' ,
- 'May' , 'June' , 'July' , 'August' , 'September' ,
- 'October' ,
- 'November' , 'December' )[(localtime($time))[4]];
-($mday,$year,$hour,$min) = (localtime($time))[3,5,2,1];
-if ($min<10) {$min = "0$min";}
-return "$wday, $mday $month ".($year+1900)." at $hour:$min";
-}
-
-sub snmp_get_response
-{
-use BER;
-use SNMP_Session;
-
-SOLDIER_ON: foreach $comm_host (keys (%snmp_comm_host))
-{
-($community,$host) = split (/@/,$comm_host);
-if ($session = SNMP_Session->open ($host, $community, 161))
-{
-@ipRouteIfIndex = split ('\.', '1.3.6.1.2.1.4.21.1.2');
-@ipAdEntIfIndex = split ('\.', '1.3.6.1.2.1.4.20.1.2');
-$if_route_index_index = encode_oid (@ipRouteIfIndex);
-$if_index_index = encode_oid (@ipAdEntIfIndex);
-
- @oids = ($if_route_index_index);
- for (;;) {
- if ($session->getnext_request_response (@oids)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- @next_oids = ();
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- last unless BER::encoded_oid_prefix_p ($if_route_index_index, $oid);
- push @next_oids, $oid;
- ($ip_if) = pretty_print ($oid) =~ /.*\.(\d+\.\d+\.\d+\.\d+)$/;
- $target_i = pretty_print ($value);
- $target{$ip_if."@".$host} = $target_i if ( defined ($snmp_comm_host{$community."@".$host}{$ip_if}) );
- } else
- {
- die ("Suicide: no response from community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: no response from community $community on host $host","\n");
- $session->close ();
- last SOLDIER_ON;
- }
- @oids = @next_oids;
- }
-
- @oids = ($if_index_index);
- for (;;) {
- if ($session->getnext_request_response (@oids)) {
- $response = $session->pdu_buffer;
- ($bindings) = $session->decode_get_response ($response);
- @next_oids = ();
- ($binding,$bindings) = decode_sequence ($bindings);
- ($oid,$value) = decode_by_template ($binding, "%O%@");
- last unless BER::encoded_oid_prefix_p ($if_index_index, $oid);
- push @next_oids, $oid;
- ($ip_if) = pretty_print ($oid) =~ /.*\.(\d+\.\d+\.\d+\.\d+)$/;
- $target_i = pretty_print ($value);
- $target{$ip_if."@".$host} = $target_i if ( defined ($snmp_comm_host{$community."@".$host}{$ip_if}) );
- } else
- {
- die ("Suicide: no response from community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: no response from community $community on host $host","\n");
- $session->close ();
- last SOLDIER_ON;
- }
- @oids = @next_oids;
- }
-$session->close ();
-}
-else
- {
- die ("Suicide: unable to open SNMP session to community $community on host $host","\n") if ($suicidal != 0);
- print ("Soldiering on: unable to open SNMP session to community $community on host $host","\n");
- }
-}
-}
diff --git a/src/contrib/mrtg-ipacc/README b/src/contrib/mrtg-ipacc/README
deleted file mode 100644
index 27afd84..0000000
--- a/src/contrib/mrtg-ipacc/README
+++ /dev/null
@@ -1,58 +0,0 @@
-IPacc v0.1
-Using IP accounting kernel rules to feed mrtg.
-
-1. Abstract
- I am using the old ipfwadm style for doing this for backwards compatibility,
-and because it's enough for my purpose.
- For those who have kernels higher than 2.0 (using IPchains), like 2.1 or 2.2.
-I have included the ipfwadm-wrapper by Paul Russel.
-So if you if you are running on 2.2 (like me), you should copy this to
-/sbin/ipfwadm.
-It's a little slow, but it's done with sh.
-
- With this script you may generate trafic grahs for any IP, any networks or subnetworks.
- I haven't done support for icmp prot.
-
-2. Syntax
-
- You use the exact sintax as with ipfwadm
- ipacc [mode] [-S source_ip/net_bits [port1 port2 ...]] [-D dest_ip/net_bits [port1 port 2 ...]]
-
-where:
- mode - is either "in" or "out", if you don't specify any there will be
- included 2 rules in this fashion:
- in -S source_ip/net_bits sport1 sport2 -D dest_ip/net_bits port1 port2
- out -S dest_ip/net_bits dport1 dport2 -D source_ip/net_bits sport1 sprot2
-
-source_ip & dest_ip - are the dotted ip address of the source and the
- destination (IP address not hosts)
-net_bits - are number of bits used by the network+subnetwork if any
- (that is 24 for a whole class C or 25 for half a C class ...)
- you don't have to specify any if you are doing it for a host
-portN - the ports where the packet it comming from and is going to
-
-
-3. The printings
-
- If you are using one way
- ipacc will print
- inbytes, 0, uptime, server_name for an "in" mode rule
- or
- 0, outbytes, uptime, server_name for an "out" mode rule
- for both ways (in - out)
- it will print
- inbytes, outbytes, uptime, server_name
-
-inbytes, outbytes - the numbers read from the ipfwadm command
-uptime - is what the uptime command will print
-server_name - is what you'll write at the server name in the script
-
-So you will add something like
-
-Target[ipaddr]: `ipacc arguments`
-
-
-Cristian Caramida <brick@bbs.ro>
- and soon <brick@pcnet.ro>
-
-4. End
diff --git a/src/contrib/mrtg-ipacc/ipacc b/src/contrib/mrtg-ipacc/ipacc
deleted file mode 100755
index e307f71..0000000
--- a/src/contrib/mrtg-ipacc/ipacc
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/usr/bin/perl
-#
-# This is just a hack, but it works fine for me.
-# I'm using the ip accounting kernel rules to feed the mrtg.
-# You need to have IP accounting compiled in your kernel(2.0), or IPChains
-# support if you are running 2.1 or 2.2
-# Anyway I'm not using the ipchains in here as there's no need to.
-# The old ipfwadm will do just fine.
-# So for 2.1 or 2.2 you'll need the ipfwadm-wrapper.
-#
-#
-# Cristian Caramida <brick@bbs.ro>
-# but very soon <brick@pcnet.ro>
-#
-# Usage:
-#
-# You need to have IP accounting compiled in your kernel, and than just add
-# to the mrtg.cfg
-# Target[ip_addr]: `ipacc [mode] [-S aaa.bbb.ccc.ddd[/net_bits]] [port1 port2 ...] [-D aaa.bbb.ccc.ddd[/net_bits]] [port1 port2 ...]`
-# where
-# - mode - is one of "in" or "out" in lowercase
-# - aaa.bbb.ccc.ddd - is a dotted IP address (not a host/net name)
-# - net_bits - is the number of bits used by the network portion of the IP
-# (eg. 24 for a whole C class, or 25 for half of a C class)
-# - port1 port2 ... - the ports you want to plot trafic on
-# I haven't tryied to call it without any parameters!
-# It will probably make accounting for all trafic.
-
-$ipfwadm='/sbin/ipfwadm'; # <-------- ATTENTION
-$host="com.bbs.ro";
-#If you are running with ipchains (kernel 2.1, 2.2 or later) you may
-#either symlink the ipfwadm-wrapper to that location or simply modify the value
-
-
-
-#---------------------------------------------------------------------------
-# Modify this only if you know what you are doing !!! :-)
-$mode='both';
-$remote='';
-$port='8889';
-if(!($ARGV[0] =~ /^\-/)){ ($mode)=@ARGV; shift @ARGV;}
-if($mode eq 'in') {$mode='in ';}
-$mode=($mode eq 'in')?'in ':$mode;
-$source_ip='0.0.0.0/0';
-$source_port='';
-$dest_ip='0.0.0.0/0';
-$dest_port='';
-$prot='all';
-$inBytes=0;
-$outBytes=0;
-$upTime=0;
-
-while ($ARGV[0] =~ /^\-/)
-{
-
- if($ARGV[0] eq '-S')
- {
- shift @ARGV;
- ($source_ip)=@ARGV;
- shift @ARGV;
- while ($ARGV[0] =~ /[0123456789]+/)
- {
- $source_port.="$ARGV[0] ";
- shift @ARGV;
- }
- }
- elsif($ARGV[0] eq '-D')
- {
- shift @ARGV;
- ($dest_ip)=@ARGV;
- shift @ARGV;
- while ($ARGV[0] =~ /[0123456789]+/)
- {
-
- $dest_port.="$ARGV[0] ";
- shift @ARGV;
- }
- }
- else {
- die "Error: Unknown parameter $ARGV[0] \n";
-
- }
-}
-
-chop $source_port;
-chop $dest_port;
-
-if($source_port.$dest_port ne '') { $prot='tcp';}
-if($mode eq 'both')
-{
- $exec_line="$ipfwadm -A out -a -P $prot -S $source_ip $source_port -D $dest_ip $dest_port; $ipfwadm -A in -a -P $prot -S $dest_ip $dest_port -D $source_ip $source_port";
-}
-else {
- $exec_line="$ipfwadm -A $mode -a -P $prot -S $source_ip $source_port -D $dest_ip $dest_port";
-}
-$new_sp=($source_port eq '')?'*':join(',',split(/ /,$source_port));
-$new_dp=($dest_port eq '')?'*':join(',',split(/ /,$dest_port));
-$ports=($source_port.$dest_port eq '')?"\"n/a\"":"\"".$new_sp." -> ".$new_dp."\"";
-
-if($mode eq 'both')
-{
- $stats_line=($source_port.$dest_port eq '')?"$ipfwadm -A -l -x -n| grep $prot |grep $source_ip |grep $dest_ip | grep \"n/a\"":"$ipfwadm -A -l -x -n| grep $prot |grep $source_ip |grep $dest_ip | grep \"$new_sp\" | grep \"$new_dp\"";
-}
-else
-{
- $stats_line="$ipfwadm -A -l -x -n |grep \"$mode $prot $source_ip\" | grep $dest_ip | grep $ports ";
-}
-
-
-open(DATA,$stats_line."|");
-@info=<DATA>;
-close <DATA>;
-$probe=($mode eq 'both')?2:1;
-
-$mode=($mode eq 'in ')?'in':$mode;
-if(@info<$probe)
-{
- system($exec_line);
-}
-else
-{
- if($probe%2)
- {
- eval "\$$mode"."Bytes=(split(/ +/,\$info[0]))[2]";
- }
- else
- {
- if($info[0] =~ /in /) { $inBytes=(split(/ +/,$info[0]))[2]; }
- elsif($info[0] =~ /out /) { $outBytes=(split(/ +/,$info[0]))[2];}
- if($info[1] =~ /in /) { $inBytes=(split(/ +/,$info[1]))[2]; }
- elsif($info[1] =~ /out /) { $outBytes=(split(/ +/,$info[1]))[2];}
- }
-}
-open(UPTIME,"uptime |cut -b 13-26|");
-$upTime=<UPTIME>;
-close(UPTIME);
-printf "$inBytes\n$outBytes\n$upTime\n$host";
-
-
-
-
diff --git a/src/contrib/mrtg-ipacc/ipfwadm-wrapper b/src/contrib/mrtg-ipacc/ipfwadm-wrapper
deleted file mode 100755
index ddda4f4..0000000
--- a/src/contrib/mrtg-ipacc/ipfwadm-wrapper
+++ /dev/null
@@ -1,868 +0,0 @@
-#! /bin/bash
-
-# This is a wrapper script to simulate ipfwadm 2.3a. It ain't pretty,
-# but it should work (for valid commands). `-V' is translated to `-W'
-# or ignored if a `-W' option is already there, but always warned
-# about.
-
-# Paul ``Rusty'' Russell, Nov-1997. ipchains@rustcorp.com.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# Version: 1.0.1: Fixed -t (no longer de-hexizes).
-#
-# Version: 1.0.2: Fixed undocumented `-a masq'.
-# Should be OK now with bash v1.
-# If we can't find ip_fwnames, call /sbin/ipfwadm.real
-#
-# Version: 1.1: Fixed printing counts for accounting chains list.
-# Fixed -A -z and -A -f cases to do all 3 acct. rules.
-#
-# Version: 1.1.1: Fixed syntax error by escaping ( and ).
-#
-# Version: 1.1.2: Fixed REDIR thanks to Ambrose Li.
-# Fixed "printf --" thanks to Alain Knaff.
-# Fixed masquerade policy
-# Fixed bug report message unquoted `;'.
-# Fixed -k/-y and -S/-D options [ found by Charlie Brady ]
-# Barf on all ipchains failures.
-if [ -n "$DEBUG_IPFWADM" ]; then IPCHAINS=print_ipchains;
-else IPCHAINS=/sbin/ipchains;
-fi
-PROC_FIREWALL_NAMES="/proc/net/ip_fwnames"
-SPECIAL_CHAIN="IpFwAdM!"
-START_MARK=10000
-
-barf()
-{
- echo "$@"
- echo
- echo If this command worked with the original ipfwadm 2.3, please
- echo submit a bug report to \`ipchains@rustcorp.com\'. Note that you
- echo now need to be root, even to list the chains \(complain to Alan Cox\).
- echo
- echo The best way to do this is to submit the output of \`$0 --version\',
- echo the command used to obtain this error, any previous ipfwadm
- echo commands, and the output of \`ipchains-save\'.
- echo
- echo Then try flushing all the rules \`ipchains -F\; ipchains -X\',
- echo setting the DEBUG_IPFWADM variable \`export DEBUG_IPFWADM=1\' or
- echo \`setenv DEBUG_IPFWADM 1\' and rerunning the command\(s\) which
- echo caused this error.
- exit 1
-}
-
-print_ipchains()
-{
- echo ipchains "$@" 1>&2
- /sbin/ipchains "$@"
-}
-
-setup_chains()
-{
- if [ `wc -l < $PROC_FIREWALL_NAMES` != 3 -a -z "$DEBUG_IPFWADM" ]
- then
- echo You cannot mix the \`ipfwadm\' wrapper with ipchains. 1>&2
- echo You must delete all user chains and flush all built-in chains 1>&2
- echo if you want to use the \`ipfwadm\' wrapper. 1>&2
- exit 1
- fi
- $IPCHAINS -N acctin
- $IPCHAINS -N acctout
- $IPCHAINS -N acctboth
- $IPCHAINS -N inp
- $IPCHAINS -N out
- $IPCHAINS -N fwd
-
- # Let all fragments through like the old code used to.
- $IPCHAINS -A input -f -j ACCEPT
- $IPCHAINS -A output -f -j ACCEPT
- $IPCHAINS -A forward -f -j ACCEPT
-
- # Jump to accounting rules. Order of traversal of acct rules
- # doesn't matter.
- $IPCHAINS -A input -j acctin
- $IPCHAINS -A input -j acctboth
- $IPCHAINS -A output -j acctout
- $IPCHAINS -A output -j acctboth
-
- # Now go to `real' chains.
- $IPCHAINS -A input -j inp
- $IPCHAINS -A output -j out
- $IPCHAINS -A forward -j fwd
-
- # Create dummy chains to mark this as an ipfwadm-emulation firewall.
- $IPCHAINS -N $SPECIAL_CHAIN
- # Insert min and max mark values.
- $IPCHAINS -A $SPECIAL_CHAIN -m $START_MARK
- $IPCHAINS -A $SPECIAL_CHAIN -m $(($START_MARK + 1))
-}
-
-# SIGH. We use identical marks to indicate which rules are actually
-# the same rule (to simulate multiple ports, and -y without -P tcp).
-
-# We start the marks at 1,000,000, so we can insert before them or append
-# after them.
-
-# In the accounting chain, marks are unique between the three acct* chains,
-# so we can tell ordering.
-
-print_count()
-{
- count=$(($1))
- if let $(($count > 99999))
- then
- cntkb=$((($count + 500) / 1000))
- if let $((cntkb > 9999))
- then
- cntmb=$((($count + 500000) / 1000000))
- printf "%4sM " $cntmb
- else
- printf "%4sK " $cntkb
- fi
- else
- printf "%5s " $count
- fi
-}
-
-dump_rule()
-{
-# ARGS: $LIST_VERBOSE $EXPAND_NUMBERS $BIDIR $SYN_NO_PROTO $SRCPORTS $DSTPTS
-# $PCNT $BCNT $TARG $PROTO $FLAGS $TOSA $TOSX $IFNM $NUM $SRCIP $DSTIP $REDIR
-# $PRINT_COUNTS
-
-# The ipfwadm code looks like: (* = -e only)
-# * * * * * * *
-# pcnt bcnt kind proto bkyo TOSA TXOR IFNM IFADD SRC DST SPTs -> DPTs REDIR
- if [ -n "$1" -o -n "${19}" ]
- then
- # Packet and byte counts.
- if [ -n "$2" ]; then printf "%8u " $7; else print_count $7; fi
- if [ -n "$2" ]; then printf "%8u " $8; else print_count $8; fi
- fi
-
- # Kind
- case "$9" in
- in) printf "%-3s " "$9" ;;
- out) printf "%-3s " "$9" ;;
- i/o) printf "%-3s " "$9" ;;
- *) printf "%-5s " "$9" ;;
- esac
-
- # Proto
- printf "%-5s" "${10}"
-
- if [ -n "$1" ]
- then
- # Flags
- if [ "$3" != 0 ]; then printf "b"; else printf "%s" "-"; fi
- case "${11}" in
- *!y*) printf "k-" ;;
- *y*) printf "%s" "-y" ;;
- *) printf "%s" "--" ;;
- esac
- case "${11}" in
- *l*) printf "l " ;;
- *) printf "%s" "- " ;;
- esac
-
- # TOS
- printf "${12} ${13} "
-
- # Interface name
- printf "%-7.16s " "${14}"
-
- # Interface address
- if [ -n "${15}" ]; then printf "%-15s " 0.0.0.0;
- else printf "%-15s " any;
- fi
- fi
-
- # Source and dest.
- printf "%-20s " "${16}"
- printf "%-20s" "${17}"
-
- # Source Ports.
- if [ "${10}" != tcp -a "${10}" != udp -a "${10}" != icmp ]
- then
- echo " n/a"
- return
- fi
- printf " "
- printf "$5" | tr ' ' ','
-
- if [ "${10}" = icmp ]
- then
- echo
- return
- fi
-
- # Dest ports.
- if [ "$5" != "n/a" ]
- then
- printf " -> "
- printf "$6" | tr ' ' ','
- fi
-
- # redirect ports.
- if [ "$9" = "acc/r" ]
- then
- printf " => %s" "${18}"
- fi
- echo
-}
-
-get_policy() # CHAIN
-{
- case "`ipchains -L $1 | head -1`" in
- *ACCEPT*)
- echo accept;;
- *MASQ*)
- echo accept/masquerade;;
- *REJECT*)
- echo reject;;
- *DENY*)
- echo deny;;
- *)
- barf "Unknown policy for \`$1' - `ipchains -L $1 2>&1`"
- esac
-}
-
-list_chain() # $CHAIN $LIST_VERBOSE $NUMERIC $EXPAND_NUMBERS
-{
-# if (!(format & FMT_NOCOUNTS)) {
-# if (format & FMT_KILOMEGA) {
-# fprintf(fp, FMT("%5s ","%s "), "pkts");
-# fprintf(fp, FMT("%5s ","%s "), "bytes");
-# } else {
-# fprintf(fp, FMT("%8s ","%s "), "pkts");
-# fprintf(fp, FMT("%10s ","%s "), "bytes");
-# }
-# }
- IS_ACCT=""
- case "$1" in
- acct*) IS_ACCT="Y";;
- inp) printf "IP firewall input rules, default policy: "
- get_policy input
- ;;
- out) printf "IP firewall output rules, default policy: "
- get_policy output
- ;;
- fwd) printf "IP firewall forward rules, default policy: "
- get_policy forward
- ;;
- *) barf "Unknown chain for list_chain - \`$1'"
- ;;
- esac
-
- if [ -n "$2" -o -n "$IS_ACCT" ]
- then
- if [ -z "$4" ]
- then
- printf "%5s " pkts
- printf "%5s " bytes
- else
- printf "%8s " pkts
- printf "%10s " bytes
- fi
- fi
-
-# if (!(format & FMT_NOKIND)) {
-# if (chain == CHN_ACCT)
-# fprintf(fp, FMT("%-3s ","%s "), "dir");
-# else
-# fprintf(fp, FMT("%-5s ","%s "), "type");
-# }
- case "$1" in
- acct*) printf "%-3s " dir ;;
- *) printf "%-5s " type ;;
- esac
-
-# fputs("prot ", fp);
- printf "prot "
-
-# if (format & FMT_OPTIONS)
-# fputs("opt ", fp);
-# if (format & FMT_TOS)
-# fputs("tosa tosx ", fp);
-# if (format & FMT_VIA) {
-# fprintf(fp, FMT("%-7s ","(%s "), "ifname");
-# fprintf(fp, FMT("%-15s ","%s) "), "ifaddress");
-# }
- if [ -n "$2" ]
- then
- printf "opt tosa tosx %-7s %-15s " ifname ifaddress
- fi
-
-# fprintf(fp, FMT("%-20s ","%s "), "source");
-# fprintf(fp, FMT("%-20s ","%s "), "destination");
-# fputs("ports\n", fp);
-# }
- printf "%-20s %-20s ports" source destination
- echo
-
- case "$1" in
- acct*) shift;
- (list_chain_real acctin "$@" "1" "1"
- list_chain_real acctout "$@" "1" "1"
- list_chain_real acctboth "$@" "1" "1") | sort -n | cut -c11-;;
- *) list_chain_real "$@" ;;
- esac
-}
-
-list_chain_real() # $CHAIN $LIST_VERBOSE $NUMERIC $EXPAND_NUMBERS $PRINT_COUNTS $PREPEND_MARK
-{
- CHAIN="$1"
- LIST_VERBOSE="$2"
- NUMERIC="$3"
- EXPAND_NUMBERS="$4"
- PRINT_COUNTS="$5"
- PREPEND_MARK="$6"
-
- # The ipfwadm code looks like: (* = -e only)
- # * * * * * * *
- # pcnt bcnt kind proto bkyo TOSA TXOR IFNM IFADD SRC DST SPTs -> DPTs REDIR
- #
- # The ipchains code looks like: (* = -v only)
- # * * * * * * *
- # pcnt bcnt targ proto !yfl TOSA TXOR IFNM MARK SRC DST SPTs -> DPTs REDIR
- LAST_MARK=xxx
-
- BIDIR=0
- SYN_NO_PROTO=0
- SRCPORTS=""
- DSTPORTS=""
-
- [ -z "$NUMERIC" ] || NUMERIC="-n"
- $IPCHAINS -L $CHAIN -v -x $NUMERIC | tail +3 |
- while true
- do
- if ! read PCNT BCNT TARG PROTO FLAGS TOSA TOSX IFNM MARK SRCIP DSTIP SRCPTS IGN1 DSTPTS REDIR
- then
- # Dump last rule.
- if [ "$LAST_MARK" != "xxx" ]
- then
- [ -z "$PREPEND_MARK" ] || printf "%-10s " "$LAST_MARK"
- dump_rule "$LIST_VERBOSE" "$EXPAND_NUMBERS" $BIDIR $SYN_NO_PROTO "$SRCPORTS" "$DSTPORTS" $LAST_PCNT $LAST_BCNT $LAST_TARG $LAST_PROTO $LAST_FLAGS $LAST_TOSA $LAST_TOSX "$LAST_IFNM" "$NUMERIC" $LAST_SRCIP $LAST_DSTIP "$LAST_REDIR" "$PRINT_COUNTS"
- fi
- return
- fi
- [ -z "$DEBUG_IPFWADM" ] || echo RULE is "$PCNT $BCNT $TARG $PROTO $FLAGS $TOSA $TOSX "$IFNM" $MARK $SRCIP $DSTIP $SRCPTS $IGN1 $DSTPTS $REDIR" 1>&2
-
- if [ "$LAST_MARK" = "$MARK" ]
- then
-# Fold rules back together.
-
-# We combine for any of the following reasons:
-# -k or -y used with no protocol: first rule has proto TCP and 'y'.
-# -b used: SRC & DST reversed.
-# Multiple ports: all the same but for port.
-
-# Worst cases:
-# ipfwadm -I -a accept -b -P tcp -S 0/0 1 4 -D 1/1 5 9
-# => pcnt bcnt targ proto !yfl TOSA TXOR IFNM MARK SRC DST SPTs -> DPTs REDIR
-# ? ? ? TCP ? ? ? ? ? 0/0 1/1 1 5
-# ? ? ? TCP ? ? ? ? ? 1/1 0/0 5 1
-# ? ? ? TCP ? ? ? ? ? 0/0 1/1 1 9
-# ? ? ? TCP ? ? ? ? ? 1/1 0/0 9 1
-# ? ? ? TCP ? ? ? ? ? 0/0 1/1 4 5
-# ? ? ? TCP ? ? ? ? ? 1/1 0/0 5 4
-# ? ? ? TCP ? ? ? ? ? 0/0 1/1 4 9
-# ? ? ? TCP ? ? ? ? ? 1/1 0/0 9 4
-#
-# ipfwadm -I -a accept -b -y -S 0/0 -D 1/1
-# => pcnt bcnt targ proto !yfl TOSA TXOR IFNM MARK SRC DST SPTs -> DPTs REDIR
-# ? ? ? TCP ?y?? ? ? ? ? 0/0 1/1
-# ? ? ? TCP ?y?? ? ? ? ? 1/1 0/0
-# ? ? ? ANY ?-?? ? ? ? ? 0/0 1/1
-# ? ? ? ANY ?-?? ? ? ? ? 1/1 0/0
-# if [ -n "$DEBUG_IPFWADM" ]
-# then
-# echo LAST_PROTO = \`"$LAST_PROTO"\'
-# echo PROTO = \`"$PROTO"\'
-# echo LAST_SRCIP = \`"$LAST_SRCIP"\'
-# echo DSTIP = \`"$DSTIP"\'
-# echo LAST_DSTIP = \`"$LAST_DSTIP"\'
-# echo SRCIP = \`"$SRCIP"\'
-# echo LAST_SRCPTS = \`"$LAST_SRCPTS"\'
-# echo DSTPTS = \`"$DSTPTS"\'
-# echo LAST_DSTPTS = \`"$LAST_DSTPTS"\'
-# echo SRCPTS = \`"$SRCPTS"\'
-# fi
- if [ "$LAST_PROTO" = \!tcp -a "$PROTO" = tcp ]
- then
- [ -n "$DEBUG_IPFWADM" ] && echo "Found SYN rule."
- SYN_NO_PROTO=1
- PCNT=$(($LAST_PCNT + $PCNT))
- BCNT=$(($LAST_BCNT + $BCNT))
- PROTO="all"
- elif [ "$LAST_SRCIP" = "$DSTIP" -a "$LAST_DSTIP" = "$SRCIP" -a "$LAST_SRCPTS" = "$DSTPTS" -a "$LAST_DSTPTS" = "$SRCPTS" ]
- then
- [ -n "$DEBUG_IPFWADM" ] && echo "Found bidir rule."
- BIDIR=1
- LAST_PCNT=$(($LAST_PCNT + $PCNT))
- LAST_BCNT=$(($LAST_BCNT + $BCNT))
- # Don't transfer this rule to LAST_ vars - effectively ignore.
- continue;
- else
- [ -n "$DEBUG_IPFWADM" ] && echo "Found port rule."
- # For n source ports and m dest ports, there will be
- # n x m rules. So, we add to SRCPORTS when we see a new
- # SRCPTS, but only add to DSTPORTS for the first SRCPORTS.
- if [ "$SRCPTS" != "$LAST_SRCPTS" ]
- then
- SRCPORTS="$SRCPORTS $SRCPTS"
- fi
- if [ "$SRCPORTS" = "$SRCPTS" ]
- then
- DSTPORTS="$DSTPORTS $DSTPTS"
- fi
- PCNT=$(($LAST_PCNT + $PCNT))
- BCNT=$(($LAST_BCNT + $BCNT))
- fi
- else
- # Dump last rule.
- if [ "$LAST_MARK" != "xxx" ]
- then
- [ -z "$PREPEND_MARK" ] || printf "%-10s " "$LAST_MARK"
- dump_rule "$LIST_VERBOSE" "$EXPAND_NUMBERS" $BIDIR $SYN_NO_PROTO "$SRCPORTS" "$DSTPORTS" $LAST_PCNT $LAST_BCNT $LAST_TARG $LAST_PROTO $LAST_FLAGS $LAST_TOSA $LAST_TOSX "$LAST_IFNM" "$NUMERIC" $LAST_SRCIP $LAST_DSTIP "$LAST_REDIR" "$PRINT_COUNTS"
- fi
-
- BIDIR=0
- SYN_NO_PROTO=0
- SRCPORTS="$SRCPTS"
- DSTPORTS="$DSTPTS"
- fi
-
- # Save for next iteration, in case mark the same.
- LAST_PCNT=$PCNT
- LAST_BCNT=$BCNT
- LAST_PROTO=$PROTO
- LAST_FLAGS=$FLAGS
- LAST_TOSA=$TOSA
- LAST_TOSX=$TOSX
- LAST_IFNM="$IFNM"
- LAST_MARK=$MARK
- LAST_SRCIP=$SRCIP
- LAST_DSTIP=$DSTIP
- LAST_REDIR="$REDIR"
- LAST_SRCPTS="$SRCPTS"
- LAST_DSTPTS="$DSTPTS"
- case "$CHAIN" in
- acctin) LAST_TARG=in ;;
- acctout) LAST_TARG=out ;;
- acctboth) LAST_TART=i/o ;;
- *)
- case "$TARG" in
- REDIRECT) LAST_TARG="acc/r" ;;
- MASQ) LAST_TARG="acc/m" ;;
- ACCEPT) LAST_TARG="acc" ;;
- REJECT) LAST_TARG="rej" ;;
- DENY) LAST_TARG="deny" ;;
- *) barf Unknown target \`"$TARG"\'. ;;
- esac
- ;;
- esac
- done
-}
-
-############################################################################
-
-if [ ! -f $PROC_FIREWALL_NAMES ]
-then
- if [ -f /proc/net/ip_input -o -f /proc/net/ip_acct ]
- then
- # Old kernel. Let's play nice.
- [ -x /sbin/ipfwadm.real ] && exec /sbin/ipfwadm.real "$@"
- fi
- echo "Generic IP Firewall Chains not in this kernel" 1>&2
- exit 1
-fi
-
-while [ $# != 0 ]
-do
- case "$1" in
- -A)
- case x"$2" in
- x-*) CHAIN=acctboth ;;
- xboth) CHAIN=acctboth; shift ;;
- xin) CHAIN=acctin; shift ;;
- xout) CHAIN=acctout; shift ;;
- x) CHAIN=acctboth ;;
- *) barf Unknown option \`"$2"\' ;;
- esac
- ;;
- -I)
- CHAIN=inp
- ;;
- -O)
- CHAIN=out
- ;;
- -F)
- CHAIN=fwd
- ;;
- -M)
- MASQ_MODE=1
- ;;
- -a)
- COMMAND=-A
- case x"$2" in
- x-*) TARGET="" ;;
- x) TARGET="" ;;
- xr*) TARGET=REJECT; shift ;;
- xd*) TARGET=DENY; shift ;;
- xa*) TARGET=ACCEPT; shift ;;
- xm*) TARGET=ACCEPT; MASQ=1; shift ;;
- *) barf Unknown policy for append: \`"$2"\' ;;
- esac
- ;;
- -i)
- COMMAND="-I "
- case x"$2" in
- x-*) TARGET="" ;;
- x) TARGET="" ;;
- xr*) TARGET=REJECT; shift ;;
- xd*) TARGET=DENY; shift ;;
- xa*) TARGET=ACCEPT; shift ;;
- *) barf Unknown policy for insert: \`"$2"\' ;;
- esac
- ;;
- -d)
- COMMAND=-D
- case x"$2" in
- x-*) TARGET="" ;;
- x) TARGET="" ;;
- xr*) TARGET=REJECT; shift ;;
- xd*) TARGET=DENY; shift ;;
- xa*) TARGET=ACCEPT; shift ;;
- *) barf Unknown policy for delete: \`"$2"\' ;;
- esac
- ;;
- -l)
- LIST=1
- ;;
- -z)
- COMMAND=-Z
- ;;
- -f)
- COMMAND=-F
- ;;
- -p)
- COMMAND=-P
- case "$2" in
- r*) TARGET=REJECT; shift ;;
- d*) TARGET=DENY; shift ;;
- a*) TARGET=ACCEPT; shift ;;
- m*) TARGET=MASQ; shift ;;
- *) barf Unknown policy for -p: \`"$2"\' ;;
- esac
- ;;
-
- -s)
- COMMAND=-S
- OPTIONS="$2 $3 $4"
- shift 3
- ;;
- -c)
- COMMAND=-C
- ;;
- -h)
- print_help
- ;;
- -P)
- PROTOCOL="-p $2"
- shift
- ;;
- -S)
- SRC_OPTIONS="-s $2"
- shift
- while true
- do
- case x"$2" in
- x) break ;;
- x-*) break ;;
- x?*) SRC_PORTS="$2 $SRC_PORTS" ;;
- esac
- shift
- done
- ;;
- -D)
- DST_OPTIONS="-d $2"
- shift
- while true
- do
- case x"$2" in
- x) break ;;
- x-*) break ;;
- x?*) DST_PORTS="$2 $DST_PORTS" ;;
- esac
- shift
- done
- ;;
- -V)
- VIA_ADDR="$2"
- shift
- ;;
- -W)
- INTERFACE="$2"
- OPTIONS="$OPTIONS -i $2"
- shift
- ;;
- -b)
- OPTIONS="$OPTIONS -b"
- ;;
- -e)
- LIST_VERBOSE=1
- ;;
- -k)
- TCPSYN="! -y"
- ;;
- -m)
- MASQ=1
- ;;
- -n)
- NUMERIC=1
- ;;
- -o)
- OPTIONS="$OPTIONS -l"
- ;;
- -r)
- case x"$2" in
- x-*) REDIR=0 ;;
- x) REDIR=0 ;;
- x?*) REDIR="$2"; shift ;;
- esac
- ;;
- -t)
- TOSAND=$(($2 | 0x01))
- TOSXOR=$(($3 & 0xFE))
- OPTIONS="$OPTIONS -t "`printf "0x%02x 0x%02x" $TOSAND $TOSXOR`
- shift 2
- ;;
- -v)
- OPTIONS="$OPTIONS -v"
- ;;
- -x)
- EXPAND_NUMBERS=1;
- ;;
- -y)
- TCPSYN="-y"
- ;;
-
- --version)
- echo "ipfwadm wrapper version 1.1.2"
- exit 0
- ;;
-
- -??*)
- echo "ERROR: Please separate arguments, eg \`-Mle' => \`-M -l -e'." >&2
- exit 1
- ;;
-
- *) barf Unexpected argument \`"$1"\'.
- ;;
- esac
- shift
-done
-
-# Variables to worry about:
-# $CHAIN - actual chain to work on.
-# X$MASQ_MODE - set if -M given.
-# X$COMMAND - set if this is a simple command conversion.
-# X$TARGET - set for COMMAND of -A, -I, -D or -P (but see REDIR and MASQ).
-# X$LIST - set if they want a list.
-# X$NUMERIC - list with -n.
-# X$LIST_VERBOSE - list all info.
-# X$EXPAND_NUMBERS - list full numbers.
-# X$OPTIONS - miscellaneous easy-to-convert options.
-# X$SRC_OPTIONS - set if a source address is specified.
-# X$SRC_PORTS - space-separated list of specified source ports/ranges.
-# X$DST_OPTIONS - set if a dest address is specified.
-# X$DST_PORTS - space-separated list of specified dest ports/ranges.
-# $VIA_ADDR - an interface address if one is specified.
-# $INTERFACE - an interface name if one is specified.
-# X$TCPSYN - set if `-k' or `-y' is specified.
-# X$MASQ - set if `-m' is specified.
-# X$REDIR - set to the port if `-r port' is specified
-
-if [ -n "$MASQ_MODE" ]
-then
- if [ -n "$LIST" ]
- then
- $IPCHAINS -M -L $OPTIONS
- else
- $IPCHAINS $COMMAND $OPTIONS
- fi
-elif [ -n "$LIST" ]
-then
- if ! grep -q IpFwAdM! < $PROC_FIREWALL_NAMES
- then
- echo "Chains are empty. (ie. ipfwadm has not been used on them)." 1>&2
- exit 0
- fi
- # Construct a list.
- if [ x$COMMAND = x-Z ]
- then
- # We have to atomically zero and list a chain. This is
- # currently impossible, so we:
- # 1) stop all packets on the given chain.
- # 2) list the values.
- # 3) clear the counters.
- # 4) resume on the given chain.
- case "$CHAIN" in
- acct*)
- $IPCHAINS -I 1 input -j DENY
- $IPCHAINS -I 1 output -j DENY
- ;;
- inp)
- $IPCHAINS -I 1 input -j DENY
- ;;
- out)
- $IPCHAINS -I 1 output -j DENY
- ;;
- fwd)
- $IPCHAINS -I 1 forward -j DENY
- ;;
- *) barf Unknown chain to stop: \`"$CHAIN"\'.
- esac
-
- list_chain $CHAIN "$LIST_VERBOSE" "$NUMERIC" "$EXPAND_NUMBERS"
- $IPFWADM -Z $CHAIN
-
- case "$CHAIN" in
- acct*)
- $IPCHAINS -D 1 input
- $IPCHAINS -D 1 output
- ;;
- inp)
- $IPCHAINS -D 1 input
- ;;
- out)
- $IPCHAINS -D 1 output
- ;;
- fwd)
- $IPCHAINS -D 1 forward
- ;;
- *) barf Unknown chain to restart: \`"$CHAIN"\'.
- esac
- else
- list_chain $CHAIN "$LIST_VERBOSE" "$NUMERIC" "$EXPAND_NUMBERS"
- fi
-elif [ x"$COMMAND" = x"-F" -o x"$COMMAND" = x"-Z" -o x"$COMMAND" = x"-C" ]
-then
- if ! grep -q IpFwAdM! < $PROC_FIREWALL_NAMES
- then
- echo "Chains are empty. (ie. ipfwadm has not been used on them)." 1>&2
- exit 0
- fi
- if [ "$CHAIN" = acctboth ]
- then
- # Do it to all of them.
- $IPCHAINS $COMMAND acctin $OPTIONS
- $IPCHAINS $COMMAND acctout $OPTIONS
- fi
- $IPCHAINS $COMMAND $CHAIN $OPTIONS
-else
- grep -q IpFwAdM! < $PROC_FIREWALL_NAMES || setup_chains
-
- # Figure out what the target should be.
- if [ -n "$REDIR" ]
- then
- TARGET="REDIRECT $REDIR"
- elif [ -n "$MASQ" ]
- then
- TARGET=MASQ
- fi
-
- if [ x"$COMMAND" = x"-P" ]
- then
- case "$CHAIN" in
- inp) CHAIN=input ;;
- out) CHAIN=output ;;
- fwd) CHAIN=forward ;;
- *) barf Illegal chain for -P: \`"$CHAIN"\'.;;
- esac
- $IPCHAINS $COMMAND $CHAIN $TARGET $OPTIONS
- else
- # If they used -V, and not -W, then try to figure out interface
- # name. ALWAYS warn about difference.
- if [ -n "$VIA_ADDR" ]
- then
- if [ -n "$INTERFACE" ]
- then
- echo Warning: \`-V $VIA_ADDR\' option ignored\; using \`-W $INTERFACE\' only.
- else
- INTERFACE=`ifconfig | awk -v ADDR=$VIA_ADDR '/^[a-z0-9A-Z]/ { IFNAME=$1 } $0 ~ "^[^A-Za-z0-9:]*inet addr:" ADDR { print IFNAME}'`
- if [ -z "$INTERFACE" ]
- then
- echo Can\'t handle -V option: can\'t find interface name for the address \`$VIA_ADDR\'. 1>&2
- echo Please replace the -V with the appropriate -W option. 1>&2
- exit 1
- fi
- echo Replacing \`-V $VIA_ADDR\' with \`-W $INTERFACE\'.
- OPTIONS="$OPTIONS -i $INTERFACE"
- fi
- fi
-
- # Insert, append or delete.
- case $COMMAND in
- # For Insert, get (and decrement) minimal mark #.
- -I*) MARK=$(set $($IPCHAINS -L $SPECIAL_CHAIN -v | head -3 | tail -1); echo $9)
- $IPCHAINS -R $SPECIAL_CHAIN 1 -m $(($MARK - 1))
- MARK="-m $MARK"
- ;;
-
- # For Append, get (and increment) maximum mark #.
- -A) MARK=$(set $($IPCHAINS -L $SPECIAL_CHAIN -v | head -4 | tail -1); echo $9)
- $IPCHAINS -R $SPECIAL_CHAIN 2 -m $(($MARK + 1))
- MARK="-m $MARK"
- ;;
- esac
-
- # Only care about TCP SYN if -p TCP not specified.
- if [ -n "$TCPSYN" ]
- then
- case "$PROTOCOL" in
- *[Tt][Cc][Pp])
- OPTIONS="$OPTIONS $PROTOCOL $TCPSYN"
- TCPSYN=""
- ;;
- esac
- else
- OPTIONS="$OPTIONS $PROTOCOL"
- fi
-
- # Mangle source port and dest port args.
- if [ -z "$SRC_PORTS" ]; then SRC_PORTS="X"; fi
- if [ -z "$DST_PORTS" ]; then DST_PORTS="X"; fi
-
- [ -n "$TARGET" ] && TARGET="-j $TARGET"
- for SRC in $SRC_PORTS
- do
- if [ $SRC = "X" ]; then SRC=""; fi
- for DST in $DST_PORTS
- do
- if [ $DST = "X" ]; then DST=""; fi
- if [ -n "$TCPSYN" ]
- then
- $IPCHAINS $COMMAND $CHAIN $SRC_OPTIONS $SRC $DST_OPTIONS $DST $OPTIONS -p ! tcp $TARGET $MARK || barf "ipchains failed!"
- $IPCHAINS $COMMAND $CHAIN $SRC_OPTIONS $SRC $DST_OPTIONS $DST $OPTIONS -p tcp $TCPSYN $TARGET $MARK || barf "ipchains failed!"
- else
- $IPCHAINS $COMMAND $CHAIN $SRC_OPTIONS $SRC $DST_OPTIONS $DST $OPTIONS $TARGET $MARK || barf "ipchains failed!"
- fi
- done
- done
- fi
-fi
diff --git a/src/contrib/mrtg-ipget/README b/src/contrib/mrtg-ipget/README
deleted file mode 100644
index 7a1d04f..0000000
--- a/src/contrib/mrtg-ipget/README
+++ /dev/null
@@ -1,18 +0,0 @@
-Date: Fri, 17 Jan 1997 21:39:06 -0500
-From: Jim Willette <mailroom@ctec.net>
-
-Again I must state that this does no error checking what so ever. Just a
-quick hack to get me the results I needed.
-
-I have modified mrtgV2 to record stats based on interface ip address instead
-of Interface number. It does not do all the great errorchecking and no OS
-testing but it is functional for my needs.
-
-applie the patch by typing
-
-patch <contrib/mrtg-ipget/mrtg-ipget.patch
-
-example for the mrtg.cfg
-
-Target[ts.3]: 199.1.11.33:public@ts.ctec.net
-
diff --git a/src/contrib/mrtg-ipget/mrtg-ipget.patch b/src/contrib/mrtg-ipget/mrtg-ipget.patch
deleted file mode 100644
index c8f6d0d..0000000
--- a/src/contrib/mrtg-ipget/mrtg-ipget.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -u ../xxx/SNMP_util.pm ./SNMP_util.pm
---- ../xxx/SNMP_util.pm Tue Feb 23 23:01:32 1999
-+++ ./SNMP_util.pm Fri Mar 12 14:00:46 1999
-@@ -53,6 +53,7 @@
- #frame relay stuff ... see the docs for explanations
- 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9',
- 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7',
-+ 'ipRouteifIndex' => '1.3.6.1.2.1.4.21.1.2',
- # squid mib
- 'cacheServerRequests' => '1.3.6.1.4.1.3495.1.3.2.1.10',
- 'cacheServerErrors' => '1.3.6.1.4.1.3495.1.3.2.1.11',
-Only in .: diff
-diff -u ../xxx/mrtg ./mrtg
---- ../xxx/mrtg Tue Feb 23 23:01:32 1999
-+++ ./mrtg Fri Mar 12 14:02:35 1999
-@@ -616,8 +616,18 @@
- $target{$targ}{'oid1'} = "ifInOctets.$port";
- $target{$targ}{'oid2'} = "ifOutOctets.$port";
- } else {
-+ if (!$01 && !$02 && $port) {
-+ $target{$targ}{'port'} = "ipRouteifIndex.$port";
-+ ($port)=
-+ &snmpget($target{$targ}{'community'}."@".$target{$targ}{'router'},
-+ $target{$targ}{'port'});
-+
-+ $target{$targ}{'oid1'} = "ifInOctets.$port";
-+ $target{$targ}{'oid2'} = "ifOutOctets.$port";
-+ } else {
- my($o1, $o2) = split(/\&/, $port,2);
-- if (!$o1 || !$o2) {
-+
-+ if (!$o1 || !$o2) {
- warn ("\nERROR: If specifying the full OID, you must specify\n".
- "2 full OID's separated by '&'. Error found with\n".
- "\"$&\" in \"Target[$rou]\"\n");
-@@ -625,6 +635,7 @@
- }
- $target{$targ}{'oid1'} = $o1;
- $target{$targ}{'oid2'} = $o2;
-+ }
- }
- }
-
diff --git a/src/contrib/mrtg-mail/README b/src/contrib/mrtg-mail/README
deleted file mode 100644
index 81d2ad1..0000000
--- a/src/contrib/mrtg-mail/README
+++ /dev/null
@@ -1,260 +0,0 @@
- Using Mailstats with MRTG
-
-# 17/04/97: These files are based on a post
-# made to the MRTG discussion list.
-
-# I was then asked if I would contribute them to the distribution.
-# Now I've cleaned up one or two minor things, but the message below
-# is essentially the same as the distribution I have contributed.
-
-# I also posted this to comp.mail.sendmail some time back.
-
-# rachel polanskis <r.polanskis@nepean.uws.edu.au>
-
-
-
-
-This is some experimenting I have done using sendmail and mrtg.
-
-Currently I am using Solaris 2.5.1 as the mailhost, and then plotting
-the goodies using mrtg-2.0 on Linux 1.2.13 and displaying the graphs
-on the linux box.
-
-There are some caveats on my method for plotting these charts:
-
-1: I use a previously undefined port and run the Solaris
- /bin/mailstats program out of inetd.
- For this reason, I can only assume the mailstat on Solaris
- works - I have tried no other platforms.
-
-* Q: Is there a security risk involved in running Solaris Mailstat
- out of inetd?
-
-2: You must have Perl-5.002 or better installed on the plotting host.
-
-3: You must have MRTG-2.0 installed - you must know how to use it!
-
-4: I am only interested in SMTP connections, and my scripts only
- plot In and Out, since mrtg can only plot 2 lines per graph.
- If you want any more than that - experiment! And then tell me
- since I am only learning.
-
-Here goes:
-
-1: Ensure you have "/bin/mailstat" on your system.
-
-2: Enable "/etc/mail/sendmail.st"
- To do this you can just make sure the entry for "sendmail.st" in
- "sendmail.cf" is uncommented, and then do the command:
-
- # touch /etc/mail/sendmail.st
-
- And restart sendmail:
-
- # /etc/init.d/sendmail stop
- # /etc/init.d/sendmail start
-
-
-3: Create the following shell-script:
-
- #!/bin/sh
- # smtp-stats: exec Solaris mailstats
- #
- if [ -x "/bin/mailstats" ]
- then
- exec /bin/mailstats -f/etc/mail/sendmail.st
- fi
-
-I run this out of /opt/local/bin, and call it "smtp-stats"
-
-4: Now add the following to /etc/services:
-
- # /etc/services
- #
- smtp-stats 7256/tcp # smtp-stats
-
-I used port 7256 as it was undefined. You might like to select something
-else.
-
-5: Add the following to /etc/inetd.conf:
-
- # /etc/inetd.conf
- #
- smtp-stats stream tcp nowait root \
- /opt/local/bin/smtp-stats smtp-stats
-
-
-***Ensure that the above is all on *one* line. The sample above
-is broken on 2 lines for legibility!!
-
-
-6: Restart inetd
-
-
-7: Test the port. you should see the following:
-
-# telnet localhost 7256
-Trying 127.0.0.1...
-Connected to localhost.
-Escape character is '^]'.
-Statistics from Thu Feb 27 01:12:47 1997
- M msgsfr bytes_from msgsto bytes_to Mailer
- 0 0 0K 96 393K prog
- 3 34 94K 0 0K local
- 5 93 474K 31 47K esmtp
-========================================
- T 127 568K 127 440K
-Connection closed by foreign host.
-
-
-OK!!
-
-The line we are interested in is line 5: The "esmtp" line.
-This is the line we will use to get our stats.
-
-You might want to adjust this depending on how many mailer progs
-you use...
-
-I find the Totals to be useless, since it includes a lot of filtering
-from procmail. I am only interested in SMTP connections...
-
-####################################
-Stage 2: MRTG
-
-
-Here is a perl script I wrote to glom the values of the "esmtp" line (5)
-and massage them into something mrtg understands.
-
-A file called "mailstats.old" is written to /tmp
-to allow for doing my sums.
-
-I am a Perl Newbie - please don't be offended at my code.
-I would like it if someone can help me with better methods one day!
-
-#!/usr/bin/perl
-#
-# rachel polanskis - 240297
-# this script relies on the sendmail.st file being activated.
-# the data is called via "mailstats" which comes with SunOS/Solaris.
-# mailstats is run out of inetd, on port 7256.
-#
-require 5.002;
-use strict;
-use Socket;
-
-my ($remote, $port, $iaddr, $paddr, $proto, $line, $count, $oldfrm, $oldto, $curfrm, $curto, $msgsfrm, $msgsto, $a, $b, $c, $d);
-
-##
-# open the old stats file for reading - we use this to get the differences
-#
-open (OLD,"</tmp/mailstat.old") or die "can't open file!\n";
-
-# read the old data
-#
-while (<OLD>) {
- if ($. == "1") {
- $count = $_;
- }
- ($oldfrm, $oldto) = split (' ',$count);
-}
-close (OLD);
-
-##
-# Straight out of the blue Camel - pp. 349
-#
-# Change these next 2 lines to suit yourself.
-#
-$remote = "juno";
-$port = "7256";
-
-#
-if ($port =~ /\D/) {$port = getservbyname ($port, 'tcp')}
-die "No port" unless $port;
-
-$iaddr = inet_aton($remote) or die "no host: $remote";
-$paddr = sockaddr_in($port, $iaddr);
-
-$proto = getprotobyname ('tcp');
-
-socket (SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
-connect (SOCK, $paddr) or die "connect: $!";
-
-##
-# munge the output data
-#
-while (<SOCK>) {
-
- if ($. == "5" ) {
- $line = $_;
- ($a, $curfrm, $b, $curto, $c, $d) = split(' ',$line);
-
-# do some sums
-$msgsfrm = $curfrm - $oldfrm;
-$msgsto = $curto - $oldto;
-chomp $msgsfrm;
-chomp $msgsto;
-
-# open the old file for overwrite
-open (OLD,">/tmp/mailstat.old") or die "can't open file!\n";
-
-# print the data for mrtg
- print "$msgsfrm\n$msgsto\n1\njuno\n";
-
-# print the data to the old file
- print OLD "$curfrm $curto\n";
-
- } #endif
-
-}
-
-close (SOCK) or die "close: $!";
-exit;
-
-
-##########################
-
-Now, Here is my mrtg.cfg file for mail.
-I call it "mail.cfg"
-I run mrtg from cron on my Linux box every 10 minutes to plot the stats.
-It is up to the individual what they do with their own setup.
-
-#
-# Mail: MRTG.cfg file for sendmail stats on mailhost.
-#
-
-WorkDir: /usr/local/etc/httpd/htdocs/stats/mrtg
-Interval: 10
-#---------------------------------------------------------------
-Target[mail]: `/usr/local/bin/mrtg/mailstats`
-MaxBytes[mail]: 150
-Options[mail]: gauge
-Title[mail]: Juno Sendmail Statistics
-PageTop[mail]: Juno Sendmail Statistics</H1>
-XSize[mail]: 500
-Supress[mail]: my
-YSize[mail]: 200
-WithPeak[mail]: dwmy
-YLegend[mail]: No. of messages
-ShortLegend[mail]: messages
-LegendI[mail]: &nbsp;Incoming:
-LegendO[mail]: &nbsp;Outgoing:
-
-
-
-That's it!!
-
-You should have no problems running this stuff if you follow my
-instructions.
-
-Any comments, advice or interesting suggestions
-would be much appreciated.
-
-Do with my little hack as you like, as long as the developers
-of sendmail, perl, and mrtg get some credit, as well as lil ol me
-for dreaming this up!!!
-
-
-have fun...
-
-rachel polanskis <r.polanskis@nepean.uws.edu.au> 17/04/97
-
diff --git a/src/contrib/mrtg-mail/inetd.conf-dist b/src/contrib/mrtg-mail/inetd.conf-dist
deleted file mode 100644
index 207ab7b..0000000
--- a/src/contrib/mrtg-mail/inetd.conf-dist
+++ /dev/null
@@ -1,5 +0,0 @@
-# smtp stats for mrtg
-# you can add this simply by doing "cat inetd.conf-dist >>/etc/inetd.conf"
-
-smtp-stats stream tcp nowait root /opt/local/bin/smtp-stats smtp-stats
-
diff --git a/src/contrib/mrtg-mail/mailstats b/src/contrib/mrtg-mail/mailstats
deleted file mode 100755
index e75bb8a..0000000
--- a/src/contrib/mrtg-mail/mailstats
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/local/bin/perl
-#
-# Author: Petter Reinholdtsen <pere@td.org.uit.no>
-# Date: 1997-07-09
-# The original was written by Rachel Polanskis <rachel@juno.virago.org.au>
-#
-# Fetches output from mailstats(1) either via TCP or via exec and
-# feeds changes on smtp to mrtg.
-#
-# Irix 6.x seems to lack mailstats
-#
-# Usage mailstats [host]
-# if host is missing, localhost is used
-
-use strict;
-use Socket;
-
-my($datafile, $source, $sourceport, @mailstatspaths,
- $oldfrm, $oldto,
- $newfrm, $newto, $uptime);
-
-# Adjust this to your own mailserver. Uses local `mailstats` if set
-# to 'localhost'
-$source = $ARGV[0] || "localhost";
-$sourceport = "7256";
-
-$datafile = "/tmp/mailstat-$source.old";
-@mailstatspaths = ( "/usr/sbin/mailstats", "/usr/bin/mailstats" );
-
-($oldfrm, $oldto) = getOldStats($datafile);
-
-($newfrm, $newto, $uptime) = getStats($source, $sourceport);
-
-putOldStats($datafile, $newfrm, $newto) || warn "$0: Unable to save stats to $datafile";
-
-print $newfrm-$oldfrm,"\n",$newto-$oldto,"\n","$uptime\n$source\n" if ($oldfrm);
-
-##
-# Returns first line of file given as param splittet on space
-sub getOldStats {
- my($filename) = @_;
- open(OLD, $filename) || warn "$0: Unable to open $filename for reading";
- my($line) = <OLD>;
- close(OLD);
- return split(/ /, $line);
-}
-
-sub findFirstExecutable {
- my($filename);
- foreach $filename (@_) {
- return $filename if ( -x $filename && ! -d $filename );
- }
-}
-
-sub getStats {
- my($source, $sourceport) = @_;
- my(@output, $port, $proto, $iaddr, $paddr);
- if ( $source eq "localhost" ) {
- my($progpath) = findFirstExecutable(@mailstatspaths);
- @output = `$progpath`;
- chomp(@output);
- } else {
- $port = getservbyname ($sourceport, 'tcp') if ($sourceport =~ /\D/);
- die "$0: Bad port \"$sourceport\"" unless ($port);
- $proto = getprotobyname ('tcp') || die "$0: Bad prototype tcp";
-
- $iaddr = inet_aton($source) or die "$0: no host \"$source\"";
- $paddr = sockaddr_in($port, $iaddr);
-
- socket (SOCK, PF_INET, SOCK_STREAM, $proto) or die "$0: socket error $!";
- connect (SOCK, $paddr) or die "$0: connect error $!";
-
- while (<SOCK>) {
- push(@output);
- }
- close(SOCK) || warn "$0: socket close error $!";
- }
- my($curfrm, $curto, $uptime);
- foreach (@output) {
- ($curfrm, $curto) = (split(/ +/))[2,4] if (/e?smtp/);
- ($uptime) = m/Statistics from (.*)/ if (/Stati/);
- }
- return ($curfrm, $curto, $uptime);
-}
-
-sub putOldStats {
- my($filename, $frm, $to) = @_;
- open(STAT, ">$filename") || return "";
- print STAT "$frm $to\n";
- close(STAT);
- return "1";
-}
diff --git a/src/contrib/mrtg-mail/mailstats-alternate b/src/contrib/mrtg-mail/mailstats-alternate
deleted file mode 100644
index 7443e36..0000000
--- a/src/contrib/mrtg-mail/mailstats-alternate
+++ /dev/null
@@ -1,29 +0,0 @@
-# use this method if you think it is better...
-# I did this one after I learnt a bit more perl!
-
-
-##
-# munge the output data
-#
-while (<SOCK>) {
- $line = $_;
- ($a, $curfrm, $b, $curto, $c, $d) = split(' ',$line);
-}
-if ($a = "T") {
-# do some sums
-$msgsfrm = $curfrm - $oldfrm;
-$msgsto = $curto - $oldto;
-chomp $msgsfrm;
-chomp $msgsto;
-
-# open the old file for overwrite
-open (OLD,">/tmp/mailstat.old") or die "can't open file!\n";
-# print the data for mrtg
- print "$msgsfrm\n$msgsto\n1\n$remote\n";
-
-# print the data to the old file
-print OLD "$curfrm $curto\n";
- } #endif
-
-close (SOCK) or die "close: $!";
-exit;
diff --git a/src/contrib/mrtg-mail/mailstats-horowitz b/src/contrib/mrtg-mail/mailstats-horowitz
deleted file mode 100644
index 82dec14..0000000
--- a/src/contrib/mrtg-mail/mailstats-horowitz
+++ /dev/null
@@ -1,522 +0,0 @@
-#!/usr/bin/perl
-#
-# Author by Rick Horowitz <rick@techstop.com> 1998-12-16
-# Inspired by, and may show remnants of code from:
-# "mailstats" by Petter Reinholdtsen <pere@td.org.uit.no>
-# dated 1997-07-09 and part of mrtg2.54c dist
-# Petter credits Rachel Polanskis <rachel@juno.virago.org.au> for
-# the original.
-# Type "perldoc mrtg-mailstat" from a shell prompt for more information
-# on this script and its use.
-#
-
-use strict;
-use Socket;
-use Getopt::Long;
-
-# IMPORTANT: THIS NEXT LINE ENSURE THAT CASE MATTERS ON OPTIONS!!!
-$Getopt::Long::ignorecase = 0;
-
-use vars qw($datafile $server $sourceport $oldfrm $oldto $help
- $newfrm $newto $uptime $mailtype $logbase);
-
-# Assign options. ("Illegal" options will be possible,
-# but we'll warn about them via Usage().)
-# h = runs the perldoc program to show the mrtg-mailstat manual
-# m = specifies the type of mail we're checking for
-# p = specifies the port for reaching the mailstats on the mailserver
-# s = specifies the location of the mailserver
-# See the mrtg-mailstat man page for details.
-GetOptions("help" => \$help,
- "logbase=s" => \$logbase,
- "mailtype=s" => \$mailtype,
- "port=i" => \$sourceport,
- "server=s" => \$server,
- "<>" => \&Usage);
-
-# HARDCODING SECTION -- MODIFY THESE ONLY IF YOU KNOW WHAT YOU ARE DOING!!!
-# Set these ONLY if you don't wish to use command line options. For more
-# information, type 'mrtg-mailstat -h' or 'perldoc mrtg-mailstat' from a
-# shell prompt.
-$logbase = '/tmp' unless $logbase;
-$mailtype = '' unless $mailtype;
-$server = '' unless $server;
-$sourceport = '' unless $sourceport;
-
-# Location for keeping mail statistics. The numbers stored here are
-# compared to the new numbers at each run of this script.
-$datafile = "$logbase/${mailtype}-mailstat.old";
-
-# Core portions of the program. Most of retained code from original
-# comes into play here.
-GetHelp() if $help;
-Usage() unless ($mailtype && $server && $sourceport);
-
-($oldfrm, $oldto) = GetOldStats($datafile);
-($newfrm, $newto, $uptime) = GetNewStats($server, $sourceport);
-
-PutOldStats($datafile, $newfrm, $newto) || warn "$0: Unable to save stats to $datafile";
-
-print $newfrm-$oldfrm,"\n",$newto-$oldto,"\n","$uptime\nthe mail server\n" if ($oldfrm);
-
-##
-# Returns first line of file given as param split on (a single) space
-sub GetOldStats {
- my($datafile) = @_;
-
- if (-e $datafile) {
- open(OLD, $datafile) || warn "$0: Unable to open $datafile for reading";
- my($line) = <OLD>;
- close(OLD);
- return split(/ /, $line);
- } else {
- return(0, 0);
- }
-
-}
-
-sub GetNewStats {
- my($server, $sourceport) = @_;
- my(@output, $port, $proto, $iaddr, $paddr, $tempuptime, $curfrm, $curto, $uptime);
- if ( $server eq "localhost" ) {
- @output = `/usr/sbin/mailstats`;
- chomp(@output);
- } else {
- if ($sourceport =~ /\D/) {
- $port = getservbyname ($sourceport, 'tcp');
- } else {
- $port = $sourceport;
- }
- die "$0: Bad port \"$sourceport\"" unless ($port);
- $proto = getprotobyname ('tcp') || die "$0: Bad prototype tcp";
-
- $iaddr = inet_aton($server) or die "$0: no host \"$server\"";
- $paddr = sockaddr_in($port, $iaddr);
-
- socket (SOCK, PF_INET, SOCK_STREAM, $proto) or die "$0: socket error $!";
- connect (SOCK, $paddr) or die "$0: connect error $!";
-
- while (<SOCK>) {
- push(@output, $_);
- }
- close(SOCK) || warn "$0: socket close error $!";
- }
-
- # Parse only the interesting lines.
- foreach (@output) {
- ($curfrm, $curto) = (split(/ +/))[2,4] if (/$mailtype/);
- if (/UPTIME.*?up\s*(.*?), [0-9]* user/) {
- $uptime = $1;
- $uptime =~ s/:([0-9]*)/ hours, $1 minutes/;
- }
- }
-
- # This line ensures no negative numbers. See "perldoc mrtg-mailstat".
- ($curfrm, $curto) = noNeg($curfrm, $curto);
-
- return ($curfrm, $curto, $uptime);
-
-} # End GetNewStats().
-
-# Saves the information to the log file. (Note: Overwrites old contents
-# which aren't needed anymore, anyway.)
-sub PutOldStats {
- my($datafile, $frm, $to) = @_;
- open(STAT, ">$datafile") || return "";
- print STAT "$frm $to\n";
- close(STAT);
- return "1";
-} # End PutOldStats().
-
-# Negative values should only occur the first time the script is ever run.
-# These must be converted to positives so subsequent runs of the script
-# correctly compute new values.
-sub noNeg {
-
- my ($frm, $to) = @_;
-
- $frm = -($frm) if ($frm < 0);
- $to = -($to) if ($to < 0);
-
- return($frm, $to);
-
-} # End noNeg().
-
-# Usage() simply checks to see that no "illegal" options
-# have been entered. If the program is thus improperly
-# called, it issues a notice explaining how to read the
-# man page for this program.
-sub Usage {
-
- my $option = shift;
-
- print STDERR "You may wish to read the documentation \n";
- print STDERR "(type \"perldoc mrtg-mailstat\" or \"mrtg-mailstat -h\")\n";
-
- exit(5);
-
-} # End Usage().
-
-sub GetHelp {
-
- system("perldoc mrtg-mailstat");
- exit(0);
-
-} # End GetHelp().
-
-__END__
-
-=head1 NAME
-
-mrtg-mailstat - Mail Statistics Collector for MRTG
-
-=head1 SYNOPSIS
-
-mrtg-mailstat S<[B<-h>]> S<[B<-m> I<mailtype>]> S<[B<-p> I<sourceport>]>
- S<[B<-s> I<server>]>
-
-=head1 DESCRIPTION
-
-The B<mrtg-mailstat> program retrieves statistical information from the
-mail server. It does not matter whether the script is run on the mail
-server itself, or on a machine remote from the mail server.
-
-=head1 S< Running mrtg-mailstat >
-
-S< >
-The proper way to run B<mrtg-mailstat> is to call it from an MRTG configuration
-file. The following provides an example of a valid configuration file entry:
-
-=over 2
-
-=item
-
-C<S<Target[smtp-mail]: `mrtg-mailstat -m smtp -p 7258 -s mail.techstop.com`>
-S<MaxBytes[smtp-mail]: 150 >
-S<Options[smtp-mail]: gauge >
-S<Title[smtp-mail]: TechStop Support Services SMTP Mail Statistics>
-S<PageTop[smtp-mail]: E<lt>H1E<gt>TechStop SMTP Mail Statistics E<lt>/H1E<gt>>
-S<XSize[smtp-mail]: 500 >
-S<YSize[smtp-mail]: 200 >
-S<WithPeak[smtp-mail]: dwmy>
-S<YLegend[smtp-mail]: No. of messages>
-S<ShortLegend[smtp-mail]: messages>
-S<LegendI[smtp-mail]: &nbsp;Incoming:>
-S<LegendO[smtp-mail]: &nbsp;Outgoing: > >
-
-=back
-
-This makes certain assumptions which are outlined below under I<Dependencies>.
-
-=head1 S< Switches >
-
-S< >
-
-=head2 Hardcoding versus Using Switches
-
-It is not necessary to provide switches to the program, if you prefer to "hardcode"
-the information in the script itself. "Hardcoding" allows you to call the script
-with less (or no) flags; information needed by the script, and not provided by a
-flag, must be "hardcoded" by you before this will work. (This was provided for
-diehards who hate the flexibility of switches. I provided enough flexibility for
-them to be inflexible. ;))
-
-To "hardcode" your information into the script, look for the section near the
-top of the script labeled "HARDCODING SECTION". Change the "null" entries
-represented by the double double quotes ("") so that they contain the appropriate
-values.
-
-Example:
-
-
-=over 4
-
-=item
-
-C<$server = "" unless $server; >
-
-=back
-
-becomes
-
-=over 4
-
-=item
-
-C<$server = "mail.techstop.com" unless $server; >
-
-=back
-
-As stated, this is not necessary; it is not even preferred. You may,
-and probably should, use the switches in the next subsection.
-
-=head2 Invoking Switches
-
-B<mrtg-mailstat> switches adhere to the POSIX syntax for command-line
-options. This means options can take a variety of forms.
-For example, to specify running B<mrtg-mailstat> against port C<7258>
-of the mail server to obtain reports on smtp mail (see "I<mailtype>
-under I<Available Switches> below) you could use any of the following forms:
-
-=over 5
-
-=item
-
-C<% mrtg-mailstat -m smtp -p 7258>
-
-=item
-
-C<% mrtg-mailstat -m=smtp -p=7258>
-
-=item
-
-C<% mrtg-mailstat -mailtype smtp -port 7258>
-
-=item
-
-C<% mrtg-mailstat -mailtype=smtp -port=7258>
-
-=item
-
-C<% mrtg-mailstat --m smtp --p 7258>
-
-=item
-
-C<% mrtg-mailstat --m=smtp --p=7258>
-
-=item
-
-C<% mrtg-mailstat --mailtype smtp --port 7258>
-
-=item
-
-C<% mrtg-mailstat --mailtype=smtp --port=7258>
-
-=back
-
-Any of the last four forms are preferred. One way of doing options
-which is I<not> possible is:
-
-=over 5
-
-=item
-
-C<% mrtg-mailstat --msmtp --p7258>
-
-=back
-
-Use of that last form may cause results other than you expected.
-(Important Note: The above examples would also require that the
-server be "hardcoded" into the script as noted in the subsection on
-I<Hardcoding versus Using Switches> above.)
-
-=head2 Available Switches
-
-The following switches are available:
-
-=over 2
-
-=item B<--h[elp]>
-
-The B<-h> flag causes B<mrtg-mailstat> to print this manual to
-standard output. For obvious reasons, this is not normally included in an
-MRTG configuration file, nor invoked by cron.
-
-=item B<--l[ogbase]>
-
-The B<-l> flag can be used to specify the directory in which to store the
-file that holds the values from each run. By default, this file is created
-in I</tmp>, but if you need to store it in another directory, this is the
-flag for you. By the way, if the file doesn't exist, one is created. A side-effect
-of this is that if you try to use one "logbase" one time, and another the next,
-the program has no way of warning you. It simply creates a new file, and uses zero
-values to begin its calculations. This can have strange consequences for your
-mail statistics. Try to remember where you store your log, or use the hardcoding
-option (see I<Hardcoding versus Using Switches> above).
-
-=item B<--m[ailtype]>
-
-The B<-m> flag is used to specify the mail type. The two
-types reported by I</usr/bin/mailstat> are "esmtp" and "local". The
-"esmtp" line reports traffic between the mail server and other systems.
-The "local" line reports traffic between users on the mail server. For
-most smaller networks, this likely means that "esmtp" reports mail between
-their network and the Internet, and "local" reports mail between users
-within the small network's organization. Possible values for this flag are
-"smtp" and "local". B<Note the flag takes "smtp" and not "esmtp".>
-
-=item B<--p[ort]>
-
-The B<-p> flag specifies the port whence the statistics are obtained. See
-the I<Dependencies> section below.
-
-=item B<--s[erver]>
-
-The B<-s> flag specifies the mail server. This can be either a DNS name,
-or an IP number.
-
-=back
-
-=head1 DEPENDENCIES
-
-The B<mrtg-mailstat> program makes certain assumptions. The following is
-quoted with a few changes from the documentation for the original B<mailstat> script
-upon which B<mrtg-mailstat> is based. In particular, it is important to note that
-the original instructions were Solaris-centric. Your system may have different commands
-for starting and stopping the mail server, and your paths may be different (i.e., may
-use /usr/local instead of /opt, or whatever). You are assumed to be able to figure that
-out yourself.
-
-=over 2
-
-=item 1: Ensure you have I</bin/mailstat> (or I</usr/sbin/mailstat>)on your system.
-
-=item 2: Enable I</var/log/sendmail.st>
-
- To do this you can just make sure the entry for "sendmail.st" in
- "sendmail.cf" is uncommented. On the BSD/OS 3.1 system mrtg-mailstat was
- tested on, the /etc/sendmail.cf entries look like this:
-
- OS/var/log/sendmail.st
- O StatusFile=/var/log/sendmail.st
-
-
- Then do the command:
-
- # touch /var/log/sendmail.st
-
- And restart sendmail:
-
- # /etc/init.d/sendmail stop
- # /etc/init.d/sendmail start
-
-
-=item 3: Create the following shell-script (B<Note!> This section is different than the original version!):
-
- #!/bin/sh
- #
- # smtp-stats: invoke mailstats from a wrapper for use in inetd.
- #
- PATH=/bin:/sbin
- if [ -x "/usr/sbin/mailstats" ]
- then
- temp1=`/usr/sbin/mailstats -f/var/log/sendmail.st`
- fi
-
- if [ -x "/usr/bin/uptime" ]
- then
- temp2=`/usr/bin/uptime`
- fi
-
- echo -e "$temp1\nUPTIME: $temp2"
-
-I run this out of /usr/local/bin, and call it "smtp-stats"
-
-=item 4: Now add the following to /etc/services:
-
- # /etc/services
- #
- smtp-stats 7256/tcp # smtp-stats
-
-I used port 7256 as it was undefined. You might like to select something
-else.
-
-=item 5: Add the following to /etc/inetd.conf:
-
- # /etc/inetd.conf
- #
- smtp-stats stream tcp nowait root \
- /usr/local/bin/smtp-stats smtp-stats
-
-
-***Ensure that the above is all on *one* line. The sample above
-is broken on 2 lines for legibility!!
-
-
-=item 6: Restart inetd
-
-
-=item 7: Test the port. you should see the following:
-
-S< >
-S<unixhost: {26} % telnet mailserver 7258 >
-S<Trying 192.168.1.8... >
-S<Connected to mailserver.yourdomain.com. >
-S<Escape character is '^]'. >
-S<Statistics from Wed Jan 14 03:10:34 1998 >
-S< M msgsfr bytes_from msgsto bytes_to Mailer >
-S< 3 79372 3623347K 143989 6954437K local >
-S< 5 9941 483230K 6669 652586K esmtp >
-S<======================================== >
-S< T 89313 4106577K 150658 7607023K >
-S<UPTIME: 9:02AM up 52 days, 48 mins, 2 users, load averages: 0.57, 0.56, 0.43>
-S<Connection closed by foreign host. >
-
-
-=back
-
-=head1 FILES
-
-Strictly speaking, you needn't worry about the files. If you've created
-the smtp-stats script noted above, and made the appropriate changes, the
-only other I<file> you need to be concerned with is B<mrtg-mailstat> itself.
-
-For completeness sake, I list all the files with which B<mrtg-mailstat> may
-depend upon, utilize, create, or use.
-
-=over 5
-
-=item
-
-I<mrtg-mailstat>
-
-=item
-
-I</etc/sendmail.cf>
-
-=item
-
-I</usr/local/bin/smtp-stats>
-
-=item
-
-I</usr/sbin/mailstats>
-
-=item
-
-I</usr/bin/uptime>
-
-=item
-
-I</var/log/sendmail.st>
-
-=item
-
-I<$logbase/${mailtype}-mailstat.old>
-
-=back
-
-
-=head1 AUTHOR
-
-This B<mrtg-mailstat> program was written by Rick Horowitz <rick@techstop.com>,
-tested, and released to the MRTG mailing list on December 16, 1998. It was
-inspired by, and contains remnants of code from:
-
-=over 10
-
-=item
-
- "mailstats" by Petter Reinholdtsen <pere@td.org.uit.no>
- dated 1997-07-09 and part of mrtg2.54c dist
-
-=back
-
-Petter credits Rachel Polanskis <rachel@juno.virago.org.au> for
-the original.
-
-=cut
-
-
-
-
diff --git a/src/contrib/mrtg-mail/mailstats.cfg b/src/contrib/mrtg-mail/mailstats.cfg
deleted file mode 100644
index 33fc6ef..0000000
--- a/src/contrib/mrtg-mail/mailstats.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Mail.cfg: Mailstats plotting with MRTG
-#
-
-WorkDir: /usr/local/etc/httpd/htdocs/stats/mrtg
-Interval: 10
-#---------------------------------------------------------------
-Target[mail]: `/usr/local/bin/mrtg/mailstats`
-MaxBytes[mail]: 150
-# AbsMax[mail]: 1800
-#Unscaled[mail]: dwmy
-Options[mail]: gauge
-Title[mail]: Juno Sendmail Statistics
-PageTop[mail]: Juno Sendmail Statistics</H1>
-XSize[mail]: 500
-#Supress[mail]: my
-YSize[mail]: 200
-WithPeak[mail]: dwmy
-YLegend[mail]: No. of messages
-ShortLegend[mail]: messages
-LegendI[mail]: &nbsp;Incoming:
-LegendO[mail]: &nbsp;Outgoing:
diff --git a/src/contrib/mrtg-mail/mqueue b/src/contrib/mrtg-mail/mqueue
deleted file mode 100755
index fa30105..0000000
--- a/src/contrib/mrtg-mail/mqueue
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/store/bin/perl
-# simple mqueue done with find2perl
-
-$hostname = "apollo";
-
-require "find.pl";
-# Traverse desired filesystems
-$counter = 0;
-&find('/var/spool/mqueue/');
-sub wanted {
- /^qf.*$/ &&
-$counter++;
-}
-chomp $counter;
-print "0\n$counter\n1\n$hostname\n";
diff --git a/src/contrib/mrtg-mail/mqueue.cfg b/src/contrib/mrtg-mail/mqueue.cfg
deleted file mode 100644
index d7c7802..0000000
--- a/src/contrib/mrtg-mail/mqueue.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-Interval: 5
-#---------------------------------------------------------------
-Target[mq]: `/opt/mrtg/bin/mqueue`
-MaxBytes[mq]: 32000
-AbsMax[mq]: 64000
-Options[mq]: gauge
-Title[mq]: Sendmail Statistics
-PageTop[mq]: <H2>Sendmail MailQueue Statistics</H2>
-XSize[mq]: 500
-Supress[mq]: y
-YSize[mq]: 128
-WithPeak[mq]: my
-YLegend[mq]: No. of messages in mailq
-ShortLegend[mq]: Mailq
-LegendO[mq]: &nbsp;Mailq:
-LegendI[mq]:
diff --git a/src/contrib/mrtg-mail/services-dist b/src/contrib/mrtg-mail/services-dist
deleted file mode 100644
index 84de5ba..0000000
--- a/src/contrib/mrtg-mail/services-dist
+++ /dev/null
@@ -1,3 +0,0 @@
-# You can add this simply by doing "cat services-dist >> /etc/services"
-
-smtp-stats 7256/tcp # smtp-stats
diff --git a/src/contrib/mrtg-mail/smtp-stats b/src/contrib/mrtg-mail/smtp-stats
deleted file mode 100755
index e3dfaaf..0000000
--- a/src/contrib/mrtg-mail/smtp-stats
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# smtp-stats: invoke mailstats from a wrapper for use in inetd.
-#
-PATH=/bin:/sbin
-if [ -x "/bin/mailstats" ]
- then
- exec /bin/mailstats -f/etc/mail/sendmail.st
- fi
diff --git a/src/contrib/mrtg-startup-script/README b/src/contrib/mrtg-startup-script/README
deleted file mode 100644
index f8eaefa..0000000
--- a/src/contrib/mrtg-startup-script/README
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Stefan <stefan@sf-net.com>
-Date: Thu, 3 Aug 2006 14:47:59 +0200
-Subject: mrtg startup script
-
-Hi,
-
-while discussing on a fedora irc channel about a startup script
-(/etc/init.d/mrtg) for the mrtg daemon we came to a conclussion that it
-would be the best to include such a script in the main sourcecode
-distribution. Many people don't run mrtg through cron and a startup script
-is very handy. But we don't want to confuse them while installing a startup
-script + a cron file. The best sollution we came out would be to include a
-startup file in the contrib directory of mrtg. There is also a bugzilla
-entry for the file and a little conclussio. Maybe you could add the file to
-the contrib directory so that it's easier to run mrtg as a daemon.
-
-Best regards,
-Stefan
diff --git a/src/contrib/mrtg-startup-script/mrtg b/src/contrib/mrtg-startup-script/mrtg
deleted file mode 100644
index 42d49aa..0000000
--- a/src/contrib/mrtg-startup-script/mrtg
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-#
-# mrtg This shell script starts mrtg
-#
-# Author: Stefan SF <stefan@sf-net.com>
-#
-# chkconfig: 345 90 35
-#
-# description: mrtg The Multi Router Traffic Grapher
-# processname: mrtg
-# config: /etc/mrtg/mrtg.conf
-#
-### BEGIN INIT INFO
-# Provides: mrtg
-# Required-Start: $network
-# Default-Stop: 0 1 6
-# Short-Description: Starts the The Multi Router Traffic Grapher
-# Description: The Multi Router Traffic Grapher (MRTG) is a tool to monitor \
-# the traffic load on network-links. MRTG generates HTML pages \
-# containing GIF/PNG images which provide a live visual \
-# representation of this traffic.
-### END INIT INFO
-
-# source function library
-. /etc/rc.d/init.d/functions
-
-MRTG="/usr/bin/mrtg"
-CONFIG="/etc/mrtg/mrtg.cfg"
-PIDFILE="/var/run/mrtg.pid"
-LOCKFILE="/var/lock/mrtg/mrtg"
-OPTIONS="--daemon"
-
-RETVAL=0
-
-start() {
- echo -n $"Enabling MRTG: "
- rm -f ${LOCKFILE} 2> /dev/null
- env LANG=C ${MRTG} --pid-file=${PIDFILE} --lock-file=${LOCKFILE} ${OPTIONS} ${CONFIG}
- RETVAL=$?
- echo
-}
-
-stop() {
- echo -n $"Disabling MRTG: "
- kill `cat ${PIDFILE}` && rm -f ${LOCKFILE}
- RETVAL=$?
- echo
-}
-
-restart() {
- stop
- start
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart|force-reload)
- restart
- ;;
- status)
- if [ -f $LOCKFILE ]; then
- echo $"MRTG is enabled."
- RETVAL=0
- else
- echo $"MRTG is disabled."
- RETVAL=3
- fi
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|force-reload}"
- exit 1
-esac
-
-exit $RETVAL
diff --git a/src/contrib/mrtg.php/README.txt b/src/contrib/mrtg.php/README.txt
deleted file mode 100644
index 804df86..0000000
--- a/src/contrib/mrtg.php/README.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-===============================
-MRTG-PHP
- The MTRG log file lister
-===============================
-Version 1.021
- Written by
- David Boyer &
- Jo Joseph
-===============================
-
-* Intro *
-
-MRTG-PHP is a php based web page that will look for log files from MRTG
-and list them on a single page. It also grabs certain bits of information
-from the linked log file to show a description of what file is linked.
-
-The way is was written allows it to automatically find and update itself
-if any new log files appear. It will list them and add the proper links
-and text. Hopefully it will also work with any future versions of MRTG.
-
-It was written because I wanted a way to list MRTG log files, and didn't
-want to always come back and update it. I've found it very handy, I hope
-someone out there does too.
-
-* Requirements *
-
-Web server (IIS,Apache etc..)
-PHP 3 or higher
-
-* Compatibility *
-
-This is know to work with MRTG V2.9.7 running on a linux apache server.
-It's unknown if it'll work with other versions as I've been unable to
-try it out on any others. If you have a different versions of MRTG or
-run it on a Windows machine, let me know if it works. If it doesn't I
-will try and fix it, if you fix the code send me some info on what you
-changed so I can update the next release and credit you with the bug fix.
-
-* Contact *
-
-David Boyer
-E-Mail : crazydave@ntlworld.com
-WebSite : http://www.efsection31.com
-
-Jo Jeseph
-E-Mail : joseph_j@glan-hafren.ac.uk
diff --git a/src/contrib/mrtg.php/mrtg.php b/src/contrib/mrtg.php/mrtg.php
deleted file mode 100644
index e382150..0000000
--- a/src/contrib/mrtg.php/mrtg.php
+++ /dev/null
@@ -1,178 +0,0 @@
-<?php
-//This is the only variable you might need to change.
-$dir = "/home/httpd/html/mrtg";
-
-//These variables can be used to change some of the colors
-
-//Colors for the log file tables
-$topcol = "bgcolor=#eeeeee";
-$namew = "bgcolor=#f4f4f4";
-$valw = "bgcolor=#ffffff";
-
-//Background colors for alternate tables
-$bigback1 = "bgcolor=#EEFFFF";
-$bigback2 = "bgcolor=#F2FFF2";
-
-
-
-
-//Please do not edit any of the code below unless you know what your doing
-$version = "V 1.021";
-$first=1;
-$extime = gmDate("D") . "," . gmDate("d M Y H:i:s") . "GMT";
-?>
-
-<html>
-<head>
-<META HTTP-EQUIV="Refresh" CONTENT="300">
-<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
-<META HTTP-EQUIV="Expires" CONTENT="<?php echo $extime; ?>">
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<title>Welcome to MRTG-PHP</title>
-<style fprolloverstyle>A:hover {color: #33CCFF; text-decoration: underline}
-</style>
-</head>
-
-<body link="#808080" vlink="#000080" alink="#C0C0C0" bgcolor=#ffffff>
-
-
-<p align="center"><b><font size=+2 color="#808080">- MRTG-PHP <?php echo $version; ?>, the MRTG log file veiwer -</font></b></p>
-<div align="center">
- <center>
-
-<b><font color=#aaaaaa><a name=top>Page jumps</a></font></b><br>
-<?php
-
-chdir($dir);
-if(!($dp = opendir($dir))) die("Can't open $dir.");
-$count=-1;
-$files="";
-$names="";
-
-while($file = readdir($dp)) {
- if(is_dir($file)) {
- if($file != '.' && $file != '..' ) {
- echo "/$file<BR>";
- traverse_dir("$dir/$file");
- chdir($dir);
- }
- }
- else if (stristr($file,"html") <> "" AND stristr($file,"~") <> "~") {
- $j =0;
- $oldfile=$namefile;
- $namefile = "";
- While ($file[$j] <> "_") { $namefile = $namefile . $file[$j]; $j++ ;}
- $count++;
- $filearray[$count][0] = $file;
- $filearray[$count][1] = $namefile;
- if ($oldfile!=$namefile and $first=1)
- echo "<a href=#$namefile>$namefile</a><br>";
- $first=0;
- }
-}
-
-echo "<br>";
-$first=1;
-$namefile="";
-$tablestart = 1;
-$alt = 1;
-
-for ($counter=0; $counter<=$count; $counter++) {
- if ($counter>0) $oldfile = $filearray[$counter-1][1];
- if ($oldfile!=$filearray[$counter][1] and $first=1) {
- if ($tablestart == 1) $tablestart = 0;
- else echo "</td></tr></table>";
- echo "<table border=1 width=100% cellspacing=0 cellpadding=2 bordercolor=#C0C0C0 ";
- if ($alt == 1) {
- $alt = 0;
- echo $bigback1;
- } else {
- $alt = 1;
- echo $bigback2;
- }
- echo "><tr>
- <td width=100%>
- <p align=center>
- <a name=" . $filearray[$counter][1] . "></a>
- <b><font size=+2 color=#808080>" . $filearray[$counter][1] . "</font></b><br>";
- }
- $first=0;
- $j =0;
- $ifname="";
- $iftype="";
- $system="";
- $maintain="";
- $des="";
- $speed="";
- $log=file($filearray[$counter][0]);
- while (strchr($log[$j],"<H1>")=="") $j++;
- $logline=$log[$j];
-
- $i=strpos($logline,"ifName")+21;
- While ($logline[$i] <> "<") {$ifname=$ifname.$logline[$i]; $i++;}
- If (!$ifname) $ifname = "<font color=#ff0000>Not set</font>";
-
- $i=strpos($logline,"ifType")+21;
- While ($logline[$i] <> "<") {$iftype=$iftype.$logline[$i]; $i++;}
- If (!$iftype) $iftype = "<font color=#ff0000>Not set</font>";
-
- $i=strpos($logline,"System")+21;
- While ($logline[$i] <> "<") {$system=$system.$logline[$i]; $i++;}
- If (!$system) $system = "<font color=#ff0000>Not set</font>";
-
- $i=strpos($logline,"Maintain")+21;
- While ($logline[$i] <> "<") {$maintain=$maintain.$logline[$i]; $i++;}
- If (!$maintain) $maintain = "<font color=#ff0000>Not set</font>";
-
- $i=strpos($logline,"Description")+21;
- While ($logline[$i] <> "<") {$des=$des.$logline[$i]; $i++;}
- If (strlen($des)<4) $des = "<font color=#ff0000>Not set</font>";
-
- $i=strpos($logline,"Max Speed")+21;
- While ($logline[$i] <> "<") {$speed=$speed.$logline[$i]; $i++;}
- If (!$speed) $speed = "<font color=#ff0000>Not set</font>";
-
-
-?>
-
- <table width="750" border="1" cellspacing="0" cellpadding="3" bordercolor="#808080">
- <tr>
- <td width="100%" colspan="2" <?php echo $topcol; ?>>
- <p align="center"><a href="mrtg/<?php echo $filearray[$counter][0];?>"><font size=+1><?php echo $filearray[$counter][1]; ?></font></a></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">Description </td>
- <td width=80% <?php echo $valw; ?>><?php echo $des; ?></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">Maintainer </td>
- <td width=80% <?php echo $valw; ?>><?php echo $maintain; ?></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">System </td>
- <td width=80% <?php echo $valw; ?>><?php echo $system; ?></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">Connection Name </td>
- <td width=80% <?php echo $valw; ?>><?php echo $ifname; ?></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">Connection Type </td>
- <td width=80% <?php echo $valw; ?>><?php echo $iftype; ?></td>
- </tr>
- <tr>
- <td width=20% <?php echo $namew; ?> align="right">Max Speed </td>
- <td width=80% <?php echo $valw; ?>><?php echo $speed; ?></td>
- </tr>
- </table>
- <font size=-1 color=#808080><a href=#top>-Back to top-</a></font>
-<?php } ?>
-</td></tr></table>
- </center>
-</div>
-
-<p align="center"><font size="1" color="#808080">MRTG-PHP <?php echo $version; ?> Written by <a href="mailto:crazydave@ntlworld.com">David
-Boyer</a> and <a href=mailto:joseph_j@glan-hafren.ac.uk>Jo Joseph</a></font></p>
-
-</body>
-</html>
diff --git a/src/contrib/mrtg_php_portal/conf/config.inc.php b/src/contrib/mrtg_php_portal/conf/config.inc.php
deleted file mode 100644
index 5c8346d..0000000
--- a/src/contrib/mrtg_php_portal/conf/config.inc.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?
-// Path to perl executable
-$perl_exe = "c:\\perl\\bin\\perl.exe";
-// Path to mrtg base dir
-$mrtg_path = "e:\\mrtg\\";
-// Path to mrtg script (default install)
-$mrtg_exe = $mrtg_path."bin\\mrtg";
-
-// Path to Indexmaker script (default install)
-$indexmaker_exe = $mrtg_path."bin\\indexmaker";
-// Path to Cfgmaker script (default install)
-$cfgmaker_exe = $mrtg_path."bin\\cfgmaker";
-
-// Enter the path where the html file are generated
-$mrtg_html_dir = "e:\\mrtg\\www\\";
-// Enter the path where the .cfg are generated
-$mrtg_config_dir = "e:\\mrtg\\conf\\";
-// Enter the path of the Mrtg images (logo)
-$mrtg_icon_dir = "/mrtg/images/";
-
-// Admin password
-$admin_password1 = "bilbao";
-$admin_password2 = "mrtg";
-?> \ No newline at end of file
diff --git a/src/contrib/mrtg_php_portal/readme.txt b/src/contrib/mrtg_php_portal/readme.txt
deleted file mode 100644
index 7c1d064..0000000
--- a/src/contrib/mrtg_php_portal/readme.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Mrtg PHP 'Portal'
------------------
-
-Intro:
-I've made these quick hacks to provide a 'user-friendly' web interface for adding, removing and updating the mrtg polled hosts.
-The PHP scripts grab the parameters from html forms and run cfgmaker, indexmaker and mrtg with these parameters.
-
-Requirement:
-Web server with PHP4
-Perl
-
-Configuration of the script:
-Desarchive the mrtg_php_portal.zip file in your mrtg and put the perl script 'Update.pl' in the mrtg folder (e.g.: c:\mrtg), put the Php script config file 'config.inc.php' in the conf folder (e.g.: c:\mrtg\conf), put the 6 remaining php script in the www folder (e.g.: c:\mrtg\www).
-Summary of the script usage:
-- update.pl, this script takes all the .cfg file in conf and update the Mrtg stats for these configs. You can run this script with MrtgSvc or 5mrtg.
-- config.inc.php, this is the file were all paths and passwords for the script are configured.
-- index.php, this script generates a single index with a link to all the .html file located in e:\mrtgwww.
-- login.php, this script protect the admin section with a password configured in the config.inc.php file.
-- setup.php, this script generate the mrtg config file with cfgmaker, create a index file for the new host and run mrtg with the parameters from the form.
-- remove.php, this script delete the config file, html file and index file of a host that need to be removed.
-- admin.php, this script create a html page with the admin choice (add, remove, update).
-- Update.php, this script re-run mrtg for the selected host.
-Edit the config.inc.php and configure the path for the environment and configure the admin password also.
-
-
-Thanks:
-To 'Putzi' (he will recognize himself) for the help with Perl.
-
-Contact:
-Damien Hauser
-damien@detonate.net
diff --git a/src/contrib/mrtg_php_portal/update.pl b/src/contrib/mrtg_php_portal/update.pl
deleted file mode 100644
index cff2835..0000000
--- a/src/contrib/mrtg_php_portal/update.pl
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/perl
-#
-#
-
-my ($filelist,$file,$result);
-my @f_list;
-
-# Change the path to the folder where you store the mrtg .cfg files
-$deleted=`del /F /Q c:\\mrtg\\conf\\*_l`; # this is to remove the _l files before running Mrtg
-$filelist=`dir /B c:\\mrtg\\conf\\*.cfg`; # Get the list of the cfg files
-@f_list=split(/\n/,$filelist);
-
-foreach $file (@f_list){
- if($file||($file ne "File not Found")||($file=~/\.cfg$/)){
- $result=`perl.exe e:\\mrtg\\bin\\mrtg e:\\mrtg\\conf\\$file`; # Run Mrtg for each host with a cfg file.
- }
-}
diff --git a/src/contrib/mrtg_php_portal/www/admin.php b/src/contrib/mrtg_php_portal/www/admin.php
deleted file mode 100644
index 0c0359d..0000000
--- a/src/contrib/mrtg_php_portal/www/admin.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>MRTG remove switch:</title>
-</head>
-
-<body>
-
-<p><u><b>Configuration:</b></u></p>
-<ul>
- <li><a href="setup.php">Add a switch</a></li>
- <li><a href="remove.php">Remove a switch</a></li>
- <li><a href="update.php">Update MRTG statistics</a></li>
-</ul>
-<br><a href=./>Back to index</a>
-</body>
-
-</html> \ No newline at end of file
diff --git a/src/contrib/mrtg_php_portal/www/index.php b/src/contrib/mrtg_php_portal/www/index.php
deleted file mode 100644
index 2ba6799..0000000
--- a/src/contrib/mrtg_php_portal/www/index.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>Mrtg statistics</title>
-</head>
-
-<body>
-<p><u><b>Configuration:</b></u></p>
-<ul>
- <li><a href="login.php">Administration (password requiered)</a></li>
-</ul>
-<p><u><b>Switch list:</b></u></p>
-<?
-
-// Replace this path with the path to the config.inc.php file
-include ("c:\\mrtg\\conf\\config.inc.php");
-
-$dir = dir($mrtg_html_dir);
-echo "<ul>";
-while($filename=$dir ->read()) {
- if (eregi("\.(html)$",$filename))
- echo "<li><a href=".$filename.">".substr($filename, 0, -5)."</a></li>";;
-}
-$dir ->close();
-echo "</ul>";
-?>
-
-</body>
-
-</html>
diff --git a/src/contrib/mrtg_php_portal/www/login.php b/src/contrib/mrtg_php_portal/www/login.php
deleted file mode 100644
index e183fe6..0000000
--- a/src/contrib/mrtg_php_portal/www/login.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<html>
-<script>
-<!--
-function setfocus() { document.login.form_password.focus(); }
--->
-</script>
-
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>MRTG Admin login</title>
-</head>
-
-<body onLoad=setfocus()>
-<p><b><u>MRTG Admin login</u></b></p>
-<FORM name=login ACTION=login.php METHOD=POST>
- <table border="0" width="100%">
- <tr>
- <td width="12%">Admin Password:</td>
- <td width="88%"><input type="password" name="form_password" size="20" tabindex="1"></td>
- </tr>
- </table>
- <p><input type="submit" value="Login" name="B1" tabindex="2"></p>
-</form>
-
-</body></html>
-
-<?php
-
-// Replace this path with the path to the config.inc.php file
-include ("e:\\mrtg\\conf\\config.inc.php");
-
-if ($pass_wrong == "1"){
- echo "Wrong password !!!<br>";
-}
-if($REQUEST_METHOD == "POST"){
-if($form_password){
- if($form_password == $admin_password1 or $form_password == $admin_password2){
- ?>
- <script language="JavaScript">
- location="./admin.php";
- </script>
- <?php
- }else{
- ?>
- <script language="JavaScript">
- location="./login.php?pass_wrong=1";
- </script>
- <?php
- }
-}
-}
-?>
diff --git a/src/contrib/mrtg_php_portal/www/remove.php b/src/contrib/mrtg_php_portal/www/remove.php
deleted file mode 100644
index 26c3de1..0000000
--- a/src/contrib/mrtg_php_portal/www/remove.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>MRTG remove switch:</title>
-</head>
-
-<body>
-
-<p><b><u>MRTG remove switch:</u></b></p>
-<FORM ACTION=remove.php METHOD=POST>
- <table border="0" width="100%">
- <tr>
- <td width="12%">Switch:</td>
- <td width="88%"><select size="1" name="switch">
- <?
- // Include config file with path variable, etc...
- include ("c:\\mrtg\\conf\\config.inc.php");
- $dir = dir($mrtg_config_dir);
- // echo "<ul>";
- while($filename=$dir->read()) {
- if (eregi("\.(cfg)$",$filename))
- echo "<option value=".substr($filename, 0, -4).">".substr($filename, 0, -4)."</option>";
- }
- $dir->close();
- //echo "</ul>";
- ?>
- </select></td>
- </tr>
- <tr>
- <td width="12%">Option:</td>
- <td width="88%"><input type="checkbox" name="del_config" value="ON">Delete
- config file</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%"><input type="checkbox" name="del_html" value="ON">Delete
- stats</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%"><input type="checkbox" name="del_index" value="ON">Delete
- html index</td>
- </tr>
- </table>
- <input type="submit" value="Delete" name="B1"><input type="reset" value="Reset" name="B2">
-</form>
-<hr>
-</body>
-
-</html>
-<?
-
-// Include config file with path variable, etc...
-include ("e:\\mrtg\\conf\\config.inc.php");
-
-
-if($REQUEST_METHOD == "POST"){
- if (file_exists($mrtg_config_dir.$switch.".cfg") && $del_config == "ON") {
- echo " $switch config files removed...<br>";
- unlink($mrtg_config_dir.$switch.".cfg");
- unlink($mrtg_config_dir.$switch.".ok");
- }
- if (file_exists($mrtg_html_dir.$switch) && $del_html == "ON") {
- echo " $switch html files removed...<br>";
- exec( "rmdir /s /q ".$mrtg_html_dir.$switch);
- }
- if (file_exists($mrtg_html_dir.$switch.".html") && $del_index == "ON") {
- echo " $switch index files removed...<br>";
- unlink($mrtg_html_dir.$switch.".html");
- }
-}
-echo "<br><a href=./>Back to index</a>";
-
-?> \ No newline at end of file
diff --git a/src/contrib/mrtg_php_portal/www/setup.php b/src/contrib/mrtg_php_portal/www/setup.php
deleted file mode 100644
index 8eca344..0000000
--- a/src/contrib/mrtg_php_portal/www/setup.php
+++ /dev/null
@@ -1,140 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>MRTG New Switch configuration</title>
-</head>
-
-<body>
-
-<p><b><u>MRTG New Switch configuration</u></b></p>
-<FORM ACTION=setup.php METHOD=POST>
- <table border="0" width="100%">
- <tr>
- <td width="12%">Switch IP or Hostname:</td>
- <td width="88%"><input type="text" name="switch_ip" size="20"></td>
- </tr>
- <tr>
- <td width="12%">Snmp community:</td>
- <td width="88%"><input type="text" name="snmp_community" size="20" value="public"></td>
- </tr>
- <tr>
- <td width="12%">Option:</td>
- <td width="88%"><input type="checkbox" name="run_cfgmaker" value="ON" checked>Generate
- config</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%"><input type="checkbox" name="run_mrtg" value="ON" checked>Run
- mrtg</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%"><input type="checkbox" name="run_indexmaker" value="ON" checked>Create
- html index</td>
- </tr>
- <tr>
- <td width="12%">Cfgmaker options:</td>
- <td width="88%" align="left" valign="top">
- <input type="checkbox" name="nodown" value="--no-down">Query down
- interface (--no-down)</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%" align="left" valign="top">
- <input type="checkbox" name="noreverse" value="--noreversedns">No
- reverse Dns (--noreversedns)</td>
- </tr>
- <tr>
- <td width="12%">Mrtg Options:</td>
- <td width="88%" align="left" valign="top">
- <p align="left"><input type="checkbox" name="growright" value="growright" checked>Right
- starting graph (growright)</td>
- </tr>
- <tr>
- <td width="12%"></td>
- <td width="88%"><input type="checkbox" name="bits" value="bits" checked>Graph
- in Bits (bits)</td>
- </tr>
- <tr>
- <td width="12%">Interface Name:</td>
- <td width="88%"><select size="1" name="interface_desc">
- <option selected value="nr">Interface Number</option>
- <option value="ip">Ip Address</option>
- <option value="eth">Ethernet Number</option>
- <option value="descr">Interface Description</option>
- <option value="name">Interface Name</option>
- <option value="alias">Interface Alias</option>
- <option value="type">Interface Type</option>
- </select></td>
- </tr>
- </table>
- <p><input type="submit" value="Add switch" name="B1"><input type="reset" value="Reset" name="B2"></p>
-</form>
-<hr>
-
-<?
-
-if($REQUEST_METHOD == "POST"){
-
-// Replace this path with the path to the config.inc.php file
-include ("e:\\mrtg\\conf\\config.inc.php");
-
-// Build Cfgmaker options from the html form
-$cfgmaker_option = " ".$nodown." ".$noreverse;
-
-// Build Cfgmaker options from the html form
-$cfgmaker_global_option = $growright.",".$bits;
-$cfgmaker_param = "--global \"WorkDir: ".$mrtg_html_dir.$switch_ip."\""." --global \"Icondir: ".$mrtg_icon_dir."\""
- ." --global \"Options[_]: ".$cfgmaker_global_option."\""
- ." --ifdesc=".$interface_desc." --community "
- .$snmp_community
- .$cfgmaker_option." --output=".$mrtg_config_dir
- .$switch_ip.".cfg";
-$indexmaker_option = " --output=".$mrtg_html_dir.$switch_ip.".html"." --prefix=./".$switch_ip."/"." ".$mrtg_config_dir.$switch_ip.".cfg";;
-
-
-// Test if the host answer telnet ('cause UDP querie is always successfull :-()
-$fp = fsockopen ($switch_ip, 23, $errno, $errstr, 1);
-if (!$fp) {
- echo "The host:".$switch_ip." did not respond...";
- echo "<hr><a href=./>Back to index</a>";
- exit();
-}
-
-// Creating dir for Switch config files and stats files
-if (!file_exists($switch_ip) && $switch_ip <> "") {
-mkdir ($switch_ip,700);
-}
-
-// Run Cfg maker and mrtg script with argument from the form
-if ($switch_ip <> "") {
- if ($run_cfgmaker == "ON") {
- //echo $mrtg_html_dir."<br>";
- //echo $perl_exe." ".$cfgmaker_exe." ".$cfgmaker_param." ".$switch_ip;
- system($perl_exe." ".$cfgmaker_exe." ".$cfgmaker_param." ".$switch_ip);
- echo "Mrtg config for <b><a href=".$switch_ip.".html".">".$switch_ip."</a></b> created...<br>";
- }
- if ($run_mrtg == "ON") {
- //echo $perl_exe." ".$mrtg_exe." ".$mrtg_config_dir.$switch_ip.".cfg"."<br>";
- system ($perl_exe." ".$mrtg_exe." ".$mrtg_config_dir.$switch_ip.".cfg");
- echo "1st run Mrtg stats generated...<br>";
- }
- if ($run_indexmaker == "ON") {
- system ($perl_exe." ".$indexmaker_exe." ".$indexmaker_option);
- echo "Mrtg html index generated...<br>";
- }
-
-}
-}
-echo "<br><a href=./>Back to index</a>";
-?>
-</body>
-
-</html>
-
-
-
diff --git a/src/contrib/mrtg_php_portal/www/update.php b/src/contrib/mrtg_php_portal/www/update.php
deleted file mode 100644
index 68bf3fc..0000000
--- a/src/contrib/mrtg_php_portal/www/update.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<title>MRTG remove switch:</title>
-</head>
-
-<body>
-
-<p><b><u>MRTG update switch stats:</u></b></p>
-<FORM ACTION=update.php METHOD=POST>
- <table border="0" width="100%">
- <tr>
- <td width="12%">Switch:</td>
- <td width="88%"><select size="1" name="switch">
- <?
- include ("e:\\mrtg\\conf\\config.inc.php");
- $dir = dir($mrtg_config_dir);
- // echo "<ul>";
- while($filename=$dir->read()) {
- if (eregi("\.(cfg)$",$filename))
- echo "<option value=".substr($filename, 0, -4).">".substr($filename, 0, -4)."</option>";
- }
- $dir->close();
- //echo "</ul>";
- ?>
- </select></td>
- </tr>
- </table>
- <br>
- <input type="submit" value="Update" name="B1">
-</form>
-<hr>
-</body>
-
-</html>
-<?
-
-// Include config file with path variable, etc...
-include ("e:\\mrtg\\conf\\config.inc.php");
-
-if($REQUEST_METHOD == "POST"){
- system ($perl_exe." ".$mrtg_exe." ".$mrtg_config_dir.$switch.".cfg");
- echo "Mrtg stats for <b><a href=".$switch.".html".">".$switch."</a></b> updated...<br>";
-}
-echo "<br><a href=./>Back to index</a>";
-
-?> \ No newline at end of file
diff --git a/src/contrib/mrtgidx/mrtgidx b/src/contrib/mrtgidx/mrtgidx
deleted file mode 100755
index 575bd49..0000000
--- a/src/contrib/mrtgidx/mrtgidx
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/tardis/local/gnu/bin/perl5
-
-# mrtgidx - generate html index page based on mrtg.cfg
-#
-# Syntax: mrtgidx <pathname-of-mrtg.cfg>
-#
-# v0.1 1996-11 by Axel Dunkel (ad@Dunkel.de)
-#
-
-# --- start of configuration section ---
-
-$include_inactive = 1; # include interfaces that are commented out
-
-# --- eof of configuration section ---
-
-if ($#ARGV < 0) {
- print "mrtgidx: generate HTML index page based on MRTG config file\n";
- print "\nUsage: mrtgidx <pathname-of-mrtg.cfg-file>\n";
- exit 2;
-}
-
-while ($line = <>) {
- chop $line;
- if ($line =~ /^(#*).*Title\[(\S+)\]:\s*([^:]*):\s*(.*)$/) {
- $cmt = $1;
- $itf = $2;
- $title = $3;
- $title_if = $4;
- if ($cmt ne "#" || $include_inactive) {
- if ($itf =~ /(.*)\.([0-9]+)/) {
- $router{$1,$2} = $title_if;
- $router_f{$1,$2} = $itf;
- $router_n{$1} = $title;
- $active{$1,$2} = $cmt;
- } else {
- print STDERR "Warning: can not interpret : $itf\n";
- }
- }
- }
-}
-
-# print HTML header
-
-print "<HTML><HEAD><TITLE>MRTG Index</TITLE></HEAD>\n";
-print "<BODY>\n";
-print "<H1>MRTG - Index</H1>\n";
-print "<FONT SIZE=-2>generated by mrtgidx by <A HREF=\"mailto:ad\@dunkel.de\">Axel Dunkel</A></FONT>\n";
-print "<UL>\n";
-
-foreach $r (sort keys %router_n) {
- print "<P><LI><H2>$r</H2><UL>\n";
- foreach $i (0..200) {
- if (defined $router{$r,$i}) {
- print "<LI>";
- if ($active{$r,$i} ne "#") { print "<A HREF=\"$router_f{$r,$i}.html\">"; }
- print "$router{$r,$i}";
- if ($active{$r,$i} ne "#") { print "</a>\n"; }
- }
- }
- print "</UL>\n";
-}
-
-print "</UL></BODY></HTML>\n";
-
diff --git a/src/contrib/mrtgindex.cgi/README b/src/contrib/mrtgindex.cgi/README
deleted file mode 100644
index 3164dfd..0000000
--- a/src/contrib/mrtgindex.cgi/README
+++ /dev/null
@@ -1,19 +0,0 @@
-Date: Fri, 14 Mar 1997 14:40:56 +0000
-From: Mick Ghazey <mick@lowdown.com>
-
-My program, mrtgindex.cgi, is similar to indexmaker. There are
-some signficant differences however.
-
-Mrtgindex.cgi graphs update every 5 minutes.
-
-Mrtgindex.cgi *graphs* are clickable. Indexmaker's *text* is
-clickable.
-
-Mrtgindex.cgi supports multiple config files.
-
-Mrtgindex.cgi graphs are in the same order as targets in config
-files. Indexmaker graphs are ordered alphabetically by title.
-
-Perhaps mrtgindex.cgi will run on more servers because it doesn't
-require SSI. OTOH, it requires CGI.pm. Between the two we should
-have a program that works on all servers. :=)
diff --git a/src/contrib/mrtgindex.cgi/mrtgindx.cgi b/src/contrib/mrtgindex.cgi/mrtgindx.cgi
deleted file mode 100755
index 34420df..0000000
--- a/src/contrib/mrtgindex.cgi/mrtgindx.cgi
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/local/bin/perl
-
-# mrtgindex.cgi v 1.1
-# (c) 1997, Mick Ghazey mick@lowdown.com
-# Thanks to Dave Rand, Peter W. Osel and Tobias Oetiker.
-
-# Why CGI?
-# Mrtgindx.cgi has features that only CGI can provide.
-
-# Runtime index:
-# The index page is built every time the page is requested.
-# Changes to config files are visible on the next update.
-
-# Clickable graphs:
-# Each graph is a clickable hyperlink to more information.
-
-# Automatic updates:
-# The index page automatically updates every 5 minutes.
-# Modify $interval to adjust this period.
-
-# Timely updates:
-# Mrtgindx.cgi predicts when to update based on when the
-# current graphs were completed.
-# Updates occurs shortly after the graphs are completed
-# regardless of when the page was initially requested.
-# Modify $guardband to adjust this period.
-# If the guardband is too small you run the risk of attempting
-# an update while a graph is under construction.
-
-# Predictable graph order:
-# Graphs appear in the same order as Titles in the config files.
-# If there are multiple config files graphs from the first config
-# file appear before those from the second, etc.
-
-# Customizable graph order:
-# If you want your index ordered differently than your
-# config files you can use a dummy config file. Mrtgindex.cgi is
-# only interested in "Title" statements. You could, for example,
-# have different dummy config files for different arangements
-# of graphs.
-
-# Web based graph order selection:
-# Click Top, Up, Down, or Bot to change the position of a graph.
-
-# Multiple config files:
-# Mrtgindex.cgi supports multiple config files. Some users
-# run mrtg with more than one config file. The reason may be
-# because certain events are run on a different schedules,
-# 5 and 10 minute intervals for example.
-# Or perhaps multiple instances of mrtg are run
-# to assure completion within a 5 minute interval.
-# Ping-probes have longer run times than measuring traffic
-# on local routers, for example. However, CPU load is similar.
-# Modify the @config_files array below to suit your environment.
-
-# Runs fast:
-# Mrtgindx.cgi is fast because it doesn't create graph files or
-# maintain log files. In addition, web based graph order changes
-# benefit from browser cacheing of graphs.
-
-# Index.cgi:
-# You might want to rename this file "index.cgi". Then it
-# will load automatically when when the directory is browsed -
-# much as index.html loads automatically. You might have to
-# modify "DirectoryIndex" in srm.conf if you're using Apache
-# to allow CGI programs to be index files.
-
-# CGI.pm required:
-# Mrtgindex.cgi requires CGI.pm by Lincoln Stein
-# http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
-
-#-------------------------------------------------------
-# Modify this statement to match your configuration
-@config_files = ('mrtg.cfg'); # Single config file
-
-#@config_files = ('mrtg.cfg', 'mrtg-ping.cfg'); # Two config files
-#@config_files = ('mrtg.cfg', 'yahoo.ping', 'netscape.ping', 'msn..ping',
- 'att.ping'); # anal retentive
-
-#-------------------------------------------------------
-
-require 'stat.pl';
-use CGI ':all';
-use CGI::Carp qw(fatalsToBrowser);
-#use diagnostics;
-
-$gifdone = 0; # Scan for newest graph and save info for later
-while(@config_files > 0){
- open(In, $cfg = shift @config_files) ||
- die "Can't open $cfg. Check \@config_files array.\n";
- while(<In>){
- next unless /^Title\[(.*)\]:\s*(.+)$/; # Look for a title keyword
-
- $router = lc $1;
- Stat("$router-day.png");
- @$router = ($st_mtime, $2); # Save the mod date and title
- push @routers, $router; # Remember the router name so we can find above info
- $gifdone = $st_mtime if $st_mtime > $gifdone; # Find the newest file
- }
- close In;
-}
-
-# Time the next update to occur a little while after the next interval completes
-$interval = 300; # 5 min update interval
-$guardband = 15; # updates occur this many seconds after predicted gif completion
-$refresh = $interval + $guardband + $gifdone - time; # predict how long until next update
-$refresh = $interval if $refresh <= $guardband;
-$expires = gmtime (time + $interval * 2 + $guardband);
-
-print header, start_html(-TITLE=>'Daily Stats', -BGCOLOR=>'#e6e6e6'),
- "\n",
- "<meta http-equiv=\"expires\" content=\"$expires GMT\">\n",
- "<meta http-equiv=\"refresh\" content=$refresh>\n",
-
- table({-width=>"100\%"}, TR(
-#-------------------------------------------------------
- # Uncomment the following line if you have Count.cgi installed.
- td({-align=>left, width=>"25\%"}, img({-src=>"/cgi-bin/Count.cgi?display=clock"})),
-#-------------------------------------------------------
-
- td("Click graph for more info")));
-
-@router_order = (0..$#routers);
-@router_order = split /:/, param('ord') if defined param('ord');
-$selfurl = url;
-$selfurl =~ s/\?.*//; # Remove arguments
-
-for $index (0..$#routers){
- @spliced = @router_order;
- $router_num = splice @spliced, $index, 1; # Router removed
- $router = $routers[$router_num];
- $time = localtime $$router[0]; # $st_mtime saved in above loop
- ($time) = $time =~ /(\d+:\d+:\d+)/; # Just the time
- print hr, "\n";
-
- print a({-name=>$index});
- # Print re-ordering links top, bot, up, dn
- $mv_dn = $mv_up = "";
- $" = ':';
- if($index > 0){
- @top = ($router_num, @spliced);
- @up = @spliced;
- $indxup = $index - 1;
- splice @up, $indxup, 0, $router_num;
-
- $mv_up = sprintf "%s %s ", a({-href=>"$selfurl?ord=@top#0"}, "Top"), # move to top
- a({-href=>"$selfurl?ord=@up#$indxup"}, "Up"); # move up
- }
- if($index < $#routers){
- @bot = (@spliced, $router_num);
- @down = @spliced;
- $indxdn = $index + 1;
- splice @down, $indxdn, 0, $router_num;
-
- $indxbot = @routers - 3;
- while($indxbot < 0){$indxbot += 1}
- $mv_dn = sprintf "%s %s ", a({-href=>"$selfurl?ord=@down#$indxdn"}, "Down"), # move down
- a({-href=>"$selfurl?ord=@bot#$indxbot"}, "Bot"); # move to bottom
- }
- undef $";
-
- print table({-width=>"100\%"},
- TR(td({-align=>"left",-width=>"20\%"}, "$mv_up $mv_dn"),
- td({-align=>"left"}, b($$router[1]), " $time")));
-
- print a({-href=>"$router.html"}, img{-src=>"$router-day.png"});
-
-}
-
-print "\n",hr,"Direct questions and feedback to Mick Ghazey: ",
- a({-href=>"mailto:mick\@lowdown.com"}, "mick\@lowdown.com"),
- end_html;
diff --git a/src/contrib/mrtglog/README b/src/contrib/mrtglog/README
deleted file mode 100644
index 152a3e4..0000000
--- a/src/contrib/mrtglog/README
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************
- ** woho's MRTG Logfile cgi **
- *****************************/
-
-This is a very simple MRTG logfile summarizer.
-I don't give any warranties at all. I wrote and use it under Linux (SuSE
-Distribution).
-
-How to use:
-At first you should read and correct the enclosed mrtglog.h,
-e.g. for english language, if necessary. Then compile the code, using
-
- gcc -o <your cgi directory>/mrtglog.cgi ./mrtglog.c
-
-The usage is simple, e.g.:
-
- ./mrtglog 01/05/03 31/05/03 mrtg.log
-
-counts all traffic in May 2003. B-)
-I use a simple PHP3 script for calling it from my stats.php3 page:
-
- <?
- printf("<A HREF=\"http://www.yourserver.at/cgi-bin/mrtglog.cgi?START=1.1.%s&STOP=%s&LOG=/stats/mrtg/mymrtglog.log\">LOG</A>",
- date("y",time()),date("d.m.y",time()));
- ?>
-
-If you have questions, please send me an e-mail: woho@netpark.at
-Wolfgang Hoffmann, Austria, http://www.woho.at
-# \ No newline at end of file
diff --git a/src/contrib/mrtglog/mrtglog.c b/src/contrib/mrtglog/mrtglog.c
deleted file mode 100644
index 3fc7624..0000000
--- a/src/contrib/mrtglog/mrtglog.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*****************************
- ** woho's MRTG Logfile cgi **
- *****************************/
-#define VERSION "1.2"
-#include "./mrtglog.h"
-#include <time.h>
-#include <stdio.h>
-
-typedef struct
-{
-time_t t;
-float in;
-float out;
-} mrtg;
-
-int str2time(char *s);
-signed long runden(float zahl);
-
-/************************************/
-int main(int argc, char *argv[])
-{
-mrtg ar[3000];
-int i, y, a1, a2, a3, a4 , a5, diff,
- newmon, oldmon=13, year;
-char s[128], *str, *ctmp, *start, *stop, *log,
- ch, ch2, ch3, hex[8];
-time_t t1, t2;
-struct tm *zeit;
-float IN, OUT, ISUM=0, OSUM=0;
-FILE *fp;
-
-if (argc==4)
- {
- start = argv[1];
- stop = argv[2];
- log = argv[3];
- }
-else
- {
- ctmp = (char *) getenv("QUERY_STRING");
-//printf("%sQUERY_STRING: '%s'\n",HTMLHEAD,ctmp);
- if (ctmp)
- {
- y = strlen(ctmp) + 1;
- str = (char *)malloc (y * sizeof(char));
- *str = '\0';
- for (i = 0; i < strlen(ctmp); i++)
- {
- ch = ctmp[i];
-// fflush (stdout);
- if (ctmp[i] == '+') ch = ' ';
- if (ctmp[i] == '%')
- {
- ch2 = ctmp[i+1];
- ch3 = ctmp[i+2];
- i += 2;
- snprintf (hex, sizeof(hex), "%c%c", ch2, ch3);
- ch = strtol (hex, NULL, 16);
- if ((ch == 10) || (ch == 13)) ch = ' ';
- }
- snprintf (&str[strlen(str)], y-strlen(str),"%c",ch);
- }
- while (str)
- {
- ctmp = str;
- while (*ctmp != '=' && *ctmp != '&') { *ctmp = tolower (*ctmp); ctmp++; }
- if ((char *)strstr(str,"start") == str)
- {
- start = ctmp+1;
- ctmp = (char *) strchr(start, '&');
- }
- else if ((char *)strstr(str,"stop") == str)
- {
- stop = ctmp+1;
- ctmp = (char *) strchr(stop, '&');
- }
- else if ((char *)strstr(str,"log") == str)
- {
- log = ctmp+1;
- ctmp = (char *) strchr(log, '&');
- }
- else { printf("%sParameter '%s' Fehlerhaft\n",HTMLHEAD,str); exit(1); }
- if (ctmp) { str = ctmp+1; *ctmp = '\0'; }
- else str = NULL;
- }
- }
- }
-
-if (!start || !stop || !log)
- {
- printf("%sUsage: mrtglog 01/05/03 31/05/03 mrtg.log # Count all traffic in May 2003\n",HTMLHEAD);
- exit(1);
- }
-
-i = y = IN = OUT = 0;
-t1 = str2time(start);
-t2 = str2time(stop);
-sprintf(s,"%s%s.log",PFAD,log);
-fp = fopen(s,"r");
-if (fp)
- {
- while (fgets(s, 100, fp))
- {
- if (sscanf(s, "%d %d %d %d %d\n", &a1, &a2, &a3, &a4, &a5) == 5)
- {
- ar[y].t = a1;
- ar[y].in = a2;
- ar[y].out = a3;
- y++;
- }
- }
- fclose(fp);
- }
-else { printf("%scan't open '%s'!\n",HTMLHEAD,s); exit(1); }
-
-str = (char *) strrchr(log,'/');
-if (str) *str++;
-else str = log;
-if (ctmp = (char *) strstr(str,".log")) *ctmp=0;
-
-printf("%s<HTML>\n<HEAD>\n<TITLE>%s %s %s %s %s %s</TITLE>\n"
-"<STYLE TYPE=\"text/css\">\n<!--\n\
-body {font-family:Arial,Helvetica; font-size:10pt;}\n\
-table,tr,td,th {font-family:Arial,Helvetica; font-size:10pt;}\n\
-pre {font-family:Courier; font-size:10pt;}\n\
-p {font-family:Arial,Helvetica; font-size:10pt;}\n\
-ul,ol,li {font-family:Arial,Helvetica; font-size:10pt;}\n\
-dt {font-family:Arial,Helvetica; font-size:10pt;}\n\
-dd {font-family:Arial,Helvetica; font-size:10pt;}\n\
-address {font-family:Arial,Helvetica; font-size:8pt; font-style:italic;}\n\
-h1 { font-family:Avantgarde,Arial,Helvetica; font-size:24pt; font-weight:bold;}\n\
-h2 { font-family:Avantgarde,Arial,Helvetica; font-size:18pt; font-weight:bold;}\n\
-h3 { font-family:Avantgarde,Arial,Helvetica; font-size:12pt; font-weight:bold;}\n\
-h4 { font-family:Avantgarde,Arial,Helvetica; font-size:10pt; font-weight:bold;}\n\
-h5,h6 { font-family:Avantgarde,Aria,Helvetical; font-size:10pt; font-style:italic;}\n\
-.small {font-family:Arial,Helvetica; font-size:8pt;}\n\
-.normal {font-family:Arial,Helvetica; font-size:10pt;}\n\
-#rot { color:#FF0000; }\n\
-#gruen { color:#00a000; }\n\
-#normal { color:#000000; }\n\
--->\n</STYLE>\n</HEAD>\n\
-<BODY BGCOLOR=\"#FFFFFF\">\n\
-<TABLE CELLSPANNING=10 CELLPADDING=5 CELLSPACING=0 BGCOLOR=#D5FFD5 BORDER=1>\n\
-<TR><TD COLSPAN=4 ALIGN=CENTER><H1 ID=\"rot\">%s</H1>\n\
-<H3>%s %s %s %s %s</H3></TD></TR>\n\
-<TR><TH COLSPAN=2 ALIGN=RIGHT>IN</TH><TH ALIGN=RIGHT>OUT</TH><TH ALIGN=RIGHT>TOTAL</TH></TR>\n",
-HTMLHEAD,str,STATS,FROM,start,TO,stop,str,STATS,FROM,start,TO,stop);
-
-for (i = 0; i < y; i++)
- {
- if ((t1 <= ar[i].t) && (ar[i].t <= t2))
- {
- zeit = gmtime((const time_t *)&ar[i].t);
- newmon = zeit->tm_mon;
- if ((oldmon != 13 && newmon != oldmon) || i+1 == y)
- {
- if (i+1 == y)
- {
- diff = ar[i].t - ar[i+1].t;
- IN = IN + ar[i].in * diff;
- OUT = OUT + ar[i].out * diff;
- }
- if (IN == 0 && OUT == 0) break;
- ISUM += IN; OSUM += OUT;
- printf("<TR><TD ALIGN=RIGHT>%04i/%i</TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD></TR>\n",
- year+1900,oldmon+1,runden(IN/1024/1024),runden(OUT/1024/1024),runden((IN+OUT)/1024/1024));
- IN = OUT = 0;
- }
- if (i+1 < y)
- {
- oldmon = newmon;
- year = zeit->tm_year;
- diff = ar[i].t - ar[i+1].t;
- IN = IN + ar[i].in * diff;
- OUT = OUT + ar[i].out * diff;
- }
- }
- }
-/*if (IN != 0 || OUT != 0)
- {
- ISUM += IN; OSUM += OUT;
- printf("<TR><TD ALIGN=RIGHT>%04i/%i</TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD></TR>\n",
- year+1900,oldmon+1,runden(IN/1024/1024),runden(OUT/1024/1024),runden((IN+OUT)/1024/1024));
- }*/
-printf("<TR><TD ALIGN=RIGHT><B>TOTAL</B></TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD><TD ALIGN=RIGHT>%d MB</TD></TR>\n\
-<TR><TD COLSPAN=4 WIDH=100\%>\n<FORM ACTION=\"%s\" method=\"GET\">\n\
-von <INPUT NAME=\"START\" TYPE=\"text\" VALUE=\"%s\" SIZE=\"10\" MAXLENGTH=\"8\">\n\
-bis <INPUT NAME=\"STOP\" TYPE=\"text\" VALUE=\"%s\" SIZE=\"10\" MAXLENGTH=\"8\">\n\
-<INPUT NAME=\"LOG\" TYPE=\"hidden\" VALUE=\"%s\">\n\
-<INPUT TYPE=\"submit\" VALUE=\"Aktualisieren\">\n\
-</FORM>\n<P ALIGN=JUSTIFY CLASS=\"small\">%s</TD></TR>\n</TABLE>\n\
-<CLASS=\"small\">mrtglog %s, copyleft 2000 by <A HREF=\"http://www.netpark.at\">http://www.netpark.at</A>\n</BODY>\n</HTML>",
-runden(ISUM/1024/1024),runden(OSUM/1024/1024),runden((ISUM+OSUM)/1024/1024),
-argv[0],start,stop,log,INFOTEXT,VERSION);
-return 0;
-}
-
-/************************************/
-int str2time(char *s)
-{
- struct tm tim;
- int d, m, y;
- if (sscanf(s, "%d.%d.%d", &d, &m, &y) != 3)
- { printf("%scant convert %s to date\n",HTMLHEAD, s); exit(10); }
- if (y < 100) y = y + 2000;
- tim.tm_sec = tim.tm_min = tim.tm_hour = 0;
- tim.tm_mday = d;
- tim.tm_mon = m - 1;
- tim.tm_year = y - 1900;
- return mktime(&tim);
-}
-
-/************************************/
-signed long runden(float zahl)
-{
-signed long basis, nachkomma;
-
-if (!zahl) return 0;
-basis = zahl;
-if ((nachkomma = labs((zahl-basis)*10)) == 0) return basis;
-if (nachkomma > 5) { if (basis > 0) return ++basis; else return --basis; }
-else
- if (nachkomma < 5) return basis;
- else
- {
- nachkomma = labs((zahl-basis)*100);
- if (nachkomma > 50) { if (basis > 0) return ++basis; else return --basis; }
- else
- if (nachkomma < 50) return basis;
- else
- {
- nachkomma = labs((zahl-basis)*1000);
- if (nachkomma > 500) { if (basis > 0) return ++basis; else return --basis; }
- else
- if (nachkomma < 500) return basis;
- else
- {
- nachkomma = labs((zahl-basis)*10000);
- if (nachkomma > 5000) { if (basis > 0) return ++basis; else return --basis; }
- else if (nachkomma < 5000) return basis;
- else return basis;
- }
- }
- }
-}
-// and in the end, the love you take, is equal to the love you make. (John Lennon) \ No newline at end of file
diff --git a/src/contrib/mrtglog/mrtglog.h b/src/contrib/mrtglog/mrtglog.h
deleted file mode 100644
index a031085..0000000
--- a/src/contrib/mrtglog/mrtglog.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************
- ** woho's MRTG Logfile cgi **
- *****************************/
-
-// define the path to your htmldocs here:
-#define PFAD "/usr/local/httpd/htdocs"
-
-// default HTML header:
-#define HTMLHEAD "Content-type: text/html\n\n"
-
-// in english you'd write "Statistics" here:
-#define STATS "Auswertung"
-
-// just replace the german word, if necessary:
-#define FROM "von"
-
-// just replace the german word, if necessary:
-#define TO "bis"
-
-// This is the information at the end of the page. It tells that those month,
-// where no data exists, are skipped.
-// More info would be usefull, e.g. that mrtg logfiles only collect averages.
-#define INFOTEXT "ACHTUNG: Hier sind lediglich Durchschnittswerte der Messzeitr&auml;ume (je 5 Min.) aufsummiert.<BR>Diese Statististik ist somit nicht sehr genau!<BR>Monate, f&uuml;r die keine Mengenaufzeichnungen existieren, werden automatisch ausgeblendet."
-
-// and in the end, the love you take, is equal to the love you make. (John Lennon) \ No newline at end of file
diff --git a/src/contrib/mrtgmk/cfg/192.168.10.1.cfg b/src/contrib/mrtgmk/cfg/192.168.10.1.cfg
deleted file mode 100644
index 236f079..0000000
--- a/src/contrib/mrtgmk/cfg/192.168.10.1.cfg
+++ /dev/null
@@ -1,79 +0,0 @@
-
-Target[192.168.10.1.1]: 1:public@192.168.10.1
-MaxBytes[192.168.10.1.1]: 1250000
-Title[192.168.10.1.1]: : Serial0
-PageTop[192.168.10.1.1]: <H1>Traffic Analysis for Serial0
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial0 (1)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-Target[192.168.10.1.2]: 2:public@192.168.10.1
-MaxBytes[192.168.10.1.2]: 1250000
-Title[192.168.10.1.2]: : Serial1
-PageTop[192.168.10.1.2]: <H1>Traffic Analysis for Serial1
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial1 (2)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-Target[192.168.10.1.3]: 3:public@192.168.10.1
-MaxBytes[192.168.10.1.3]: 1250000
-Title[192.168.10.1.3]: : Serial2
-PageTop[192.168.10.1.3]: <H1>Traffic Analysis for Serial2
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial2 (3)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-Target[192.168.10.1.4]: 4:public@192.168.10.1
-MaxBytes[192.168.10.1.4]: 1250000
-Title[192.168.10.1.4]: : Serial3
-PageTop[192.168.10.1.4]: <H1>Traffic Analysis for Serial3
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial0 (1)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-Target[192.168.10.1.5]: 5:public@192.168.10.1
-MaxBytes[192.168.10.1.5]: 1250000
-Title[192.168.10.1.5]: : Serial4
-PageTop[192.168.10.1.5]: <H1>Traffic Analysis for Serial4
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial4 (5)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
diff --git a/src/contrib/mrtgmk/cfg/EXAMPLE1 b/src/contrib/mrtgmk/cfg/EXAMPLE1
deleted file mode 100755
index 012d94a..0000000
--- a/src/contrib/mrtgmk/cfg/EXAMPLE1
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-../mrtgmk convert.cfg
diff --git a/src/contrib/mrtgmk/cfg/a.cfg b/src/contrib/mrtgmk/cfg/a.cfg
deleted file mode 100644
index 36a6b23..0000000
--- a/src/contrib/mrtgmk/cfg/a.cfg
+++ /dev/null
@@ -1,21 +0,0 @@
-# We have here cfg/ appended in front of each file path because
-# all this files are relative to the directory from where we
-# start the mrtgmk.
-
-0 MRTG.CFG cfg/mrtg.cfg cfg/mrtg_cfg
-0 INCLUDE cfg/alias.cfg
-0 INCLUDE cfg/misc.cfg
-0 MKD 192.168.10.1.cfg cfg/today.html
-0 INCLUDE cfg/hosts.cfg
-
-0 MSG
-0 MSG I create the thml pages
-0 INCLUDE cfg/page1.cfg
-0 INCLUDE cfg/page2.cfg
-
-0 MSG
-0 MSG I create a special directory in cfg,
-0 MSG with links through pcn's graphs for admin of pcn
-0 INCLUDE cfg/links.cfg
-
-0 MSG
diff --git a/src/contrib/mrtgmk/cfg/alias.cfg b/src/contrib/mrtgmk/cfg/alias.cfg
deleted file mode 100644
index b361c3e..0000000
--- a/src/contrib/mrtgmk/cfg/alias.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-0 CHECK4ALIAS yes
-0 ALIAS date 07/12/1999
-0 ALIAS time 12:25 am
-0 ALIAS author Iulian Radu (iulian_r@starnets.ro) \ No newline at end of file
diff --git a/src/contrib/mrtgmk/cfg/convert.cfg b/src/contrib/mrtgmk/cfg/convert.cfg
deleted file mode 100644
index 5bf5806..0000000
--- a/src/contrib/mrtgmk/cfg/convert.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-# We have here cfg/ appended in front of each file path because
-# all this files are relative to the directory from where we
-# start the mrtgmk.
-
-0 MRTG.CFG mrtg.cfg mrtg_cfg
-0 MSG
-0 MSG I change the files name
-0 CONVIP2NAME /usr/tardis/pub/www/stats/mrtg/
-0 CHNGTRGNAME yes
-0 INCLUDE hosts.cfg
-0 MSG
diff --git a/src/contrib/mrtgmk/cfg/hosts.cfg b/src/contrib/mrtgmk/cfg/hosts.cfg
deleted file mode 100644
index 831bc46..0000000
--- a/src/contrib/mrtgmk/cfg/hosts.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-0 CFGDIR cfg
-0 DEFHOST pc1 192.168.10.1.cfg serial0
-0 DEFHOST pc2 192.168.10.1.cfg serial2
-0 DEFHOST pc3 192.168.10.1.cfg serial3
diff --git a/src/contrib/mrtgmk/cfg/links.cfg b/src/contrib/mrtgmk/cfg/links.cfg
deleted file mode 100644
index a26e37a..0000000
--- a/src/contrib/mrtgmk/cfg/links.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-# use the same directory like the one defined in mrtg_cfg
-0 MKLINK cfg/link_pc1 pc1 /usr/tardis/pub/www/stats/mrtg
-0 MKLINK cfg/link_pc2 pc2 /usr/tardis/pub/www/stats/mrtg
-0 MKLINK cfg/link_pc3 pc3 /usr/tardis/pub/www/stats/mrtg
diff --git a/src/contrib/mrtgmk/cfg/misc.cfg b/src/contrib/mrtgmk/cfg/misc.cfg
deleted file mode 100644
index 005e95e..0000000
--- a/src/contrib/mrtgmk/cfg/misc.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-0 MSG cfg file made by %author%
-0 BASE traffic.isp.ro
-
-0 MSG pc1 is %HOST_pc1%
-0 MSG pc2 is %HOST_pc2%
-0 MSG pc3 is %HOST_pc3%
diff --git a/src/contrib/mrtgmk/cfg/mrtg.cfg b/src/contrib/mrtgmk/cfg/mrtg.cfg
deleted file mode 100644
index 5a471bd..0000000
--- a/src/contrib/mrtgmk/cfg/mrtg.cfg
+++ /dev/null
@@ -1,583 +0,0 @@
-######################################################################
-# Multi Router Traffic Grapher -- Example Configuration File
-######################################################################
-#
-# * copy this file to ../run and call it mrtg.cfg
-# * consider using ../run/cfgmaker to build your initial mrtg.cfg file
-#
-# This file is for use with mrtg-2.x
-#
-# Note:
-#
-# * Keywords must start at the begin of a line.
-#
-# * Lines which follow a keyword line which do start
-# with a blank are appended to the keyword line
-#
-# * Empty Lines are ignored
-#
-# * Lines starting with a # sign are comments.
-
-
-# ####################
-# Global Configuration
-# ####################
-
-# Where should the logfiles, and webpages be created?
-
-WorkDir: /usr/tardis/pub/www/stats/mrtg
-Options[_]: growright,bits
-
-# --------------------------
-# Optional Global Parameters
-# --------------------------
-
-# How many seconds apart should the browser (Netscape) be
-# instructed to reload the page? If this is not defined, the
-# default is 300 seconds (5 minutes).
-
-# Refresh: 600
-
-# How often do you call mrtg? The default is 5 minutes. If
-# you call it less often, you should specify it here. This
-# does two things:
-
-# a) the generated HTML page does contain the right
-# information about the calling interval ...
-
-# b) a META header in the generated HTML page will instruct
-# caches about the time to live of this page .....
-
-# In this example we tell mrtg that we will be calling it
-# every 10 minutes. If you are calling mrtg every 5
-# minutes, you can leave this line commented out.
-
-# Interval: 10
-
-# With this switch mrtg will generate .meta files for CERN
-# and Apache servers which contain Expiration tags for the
-# html and gif files. The *.meta files will be created in
-# the same directory as the other files, so you might have
-# to set "MetaDir ." in your srm.conf file for this to work
-#
-# NOTE: If you are running Apache-1.2 you can use the mod_expire
-# to achieve the same effect ... see the file htaccess-dist
-
-#WriteExpires: Yes
-
-
-# If you want to keep the mrtg icons in some place other than the
-# working directory, use the IconDir varibale to give its url.
-
-# IconDir: /mrtgicons/
-
-
-# #################################################
-# Configuration for each Target you want to monitor
-# #################################################
-
-# The configuration keywords "Target" must be followed by a
-# unique name. This will also be the name used for the
-# webpages, logfiles and gifs created for that target.
-
-# Note that the "Target" sections can be auto-generated with
-# the cfgmaker tool. Check readme.html for instructions.
-# ========
-
-##
-## Target ----------------------------------------
-##
-
-# With the "Target" keyword you tell mrtg what it should
-# monitor. The "Target" keyword takes arguments in a wide
-# range of formats:
-
-# * The most basic format is "port:community@router"
-# This will generate a traffic graph for port 'port'
-# of the router 'router' and it will use the community
-# 'community' for the snmp query.
-
-# Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch
-
-# * Sometimes you are sitting on the wrong side of the
-# link. And you would like to have mrtg report Incoming
-# traffic as outgoing and visa versa. This can be achieved
-# by adding the '-' sign in front of the "Target"
-# description. It flips the in and outgoing traffic rates.
-
-# Target[ezci]: -1:public@ezci-ether.ethz.ch
-
-# * You can also explicitly define the OID to query by using the
-# following syntax 'OID_1&OID_2:community@router'
-# The following example will retrieve error input and output
-# octets/sec on interface 1. MRTG needs to graph two values, so
-# you need to specify two OID's such as temperature and humidity
-# or error input and error output.
-
-# Target[ezwf]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter
-
-# * mrtg knows a number of symbolical SNMP variable
-# names. See the file mibhelp.txt for a list of known
-# names. One example are the ifInErrors and and ifOutErrors
-# names. This means you can specify the above as:
-
-# Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter
-
-# * if you want to monitor something which does not provide
-# data via snmp you can use some external program to do
-# the data gathering.
-
-#
-# The external command must return 4 lines of output:
-# Line 1 : current state of the 'incoming bytes counter'
-# Line 2 : current state of the 'outgoing bytes counter'
-# Line 3 : string, telling the uptime of the target.
-# Line 4 : string, telling the name of the target.
-
-# Depending on the type of data your script returns you
-# might want to use the 'gauge' or 'absolute' arguments
-# for the "Options" keyword.
-
-# Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
-
-# * You can also use several statements in a mathematical
-# expression. This could be used to aggregate both B channels
-# in an ISDN connection or multiple T1's that are aggregated
-# into a single channel for greater bandwidth.
-# Note the whitespace arround the target definitions.
-
-# Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
-# * 4:public@ciscoF
-
-##
-## RouterUptime ---------------------------------------
-##
-#
-# In cases where you calculate the used bandwidth from
-# several interfaces you normaly don't get the routeruptime
-# and routername displayed on the web page.
-# If this interface are on the same router and the uptime and
-# name should be displayed nevertheless you have to specify
-# its community and address again with the RouterUptime keyword.
-
-# Target[kacisco]: 1:public@194.64.66.250 + 2:public@194.64.66.250
-# RouterUptime[kacisco]: public@194.64.66.250
-
-##
-## RouterName -----------------------------------------
-##
-#
-
-# If the default name of the router is incorrect/uninformative,
-# you can use RouterName to specify a different OID on either the
-# same or a different host.
-
-# Use 1.3.6.1.4.1.4779.1.1.3.0 on the same host:
-# RouterName[kacisco]: 1.3.6.1.4.1.4779.1.1.3.0
-
-# Use 1.3.6.1.4.1.4779.1.1.3.0 on a differnet host (194.64.66.251):
-# RouterName[kacisco]: 1.3.6.1.4.1.4779.1.1.3.0:public@194.64.66.251
-
-
-##
-## MaxBytes -------------------------------------------
-##
-
-# How many bytes per second can this port carry. Since most
-# links are rated in bits per second, you need to divide
-# their maximum bandwidth (in bits) by eight (8) in order to get
-# bytes per second. This is very important to make your
-# unscaled graphs display realistic information.
-# T1 = 193000, 56K = 7000, Ethernet = 1250000. The "MaxBytes"
-# value will be used by mrtg to decide whether it got a
-# valid response from the router. If a number higher than
-# "MaxBytes" is returned, it is ignored. Also read the section
-# on AbsMax for further info.
-
-# MaxBytes[ezwf]: 1250000
-
-##
-## Title -----------------------------------------------
-##
-
-# Title for the HTML page which gets generated for the graph.
-
-# Title[ezwf]: Traffic Analysis for ETZ C 95.1
-
-##
-## PageTop ---------------------------------------------
-##
-
-# Things to add to the top of the generated HTML page. Note
-# that you can have several lines of text as long as the
-# first column is empty.
-# Note that the continuation lines will all end up on the same
-# line in the html page. If you want linebreaks in the generated
-# html use the '\n' sequence.
-
-# PageTop[ezwf]: <H1>Traffic Analysis for ETZ C95.1</H1>
-# Our Campus Backbone runs over an FDDI line\n
-# with a maximum transfer rate of 12.5 Mega Bytes per
-# Second.
-
-##
-## PageFoot ---------------------------------------------
-##
-
-# Things to add at the very end of the mrtg generated html page
-
-# PageFoot[ezwf]: <HR size=2 noshade>This page is managed by Blubber
-
-# --------------------------------------------------
-# Optional Target Configuration Tags
-# --------------------------------------------------
-
-##
-## AddHead -----------------------------------------
-##
-
-# Use this tag like the PageTop header, but its contents
-# will be added between </TITLE> and </HEAD>.
-
-# AddHead[ezwf]: <!-- Just a comment for fun -->
-
-##
-## AbsMax ------------------------------------------
-##
-
-# If you are monitoring a link which can handle more traffic
-# than the MaxBytes value. Eg, a line which uses compression
-# or some frame relay link, you can use the AbsMax keyword
-# to give the absolute maximum value ever to be reached. We
-# need to know this in order to sort out unrealistic values
-# returned by the routers. If you do not set absmax, rateup
-# will ignore values higher then MaxBytes.
-
-# AbsMax[ezwf]: 2500000
-
-##
-## Unscaled ------------------------------------------
-##
-
-# By default each graph is scaled vertically to make the
-# actual data visible even when it is much lower than
-# MaxBytes. With the "Unscaled" variable you can suppress
-# this. It's argument is a string, containing one letter
-# for each graph you don't want to be scaled: d=day w=week
-# m=month y=year. In the example I suppress scaling for the
-# yearly and the monthly graph.
-
-# Unscaled[ezwf]: ym
-
-##
-## WithPeak ------------------------------------------
-##
-
-# By default the graphs only contain the average transfer
-# rates for incoming and outgoing traffic. The
-# following option instructs mrtg to display the peak
-# 5 minute transfer rates in the [w]eekly, [m]onthly and
-# [y]early graph. In the example we define the monthly
-# and the yearly graph to contain peak as well as average
-# values.
-
-# WithPeak[ezwf]: ym
-
-##
-## Supress ------------------------------------------
-##
-
-# By Default mrtg produces 4 graphs. With this option you
-# can suppress the generation of selected graphs. The format
-# is analog to the above option. In this example we suppress
-# the yearly graph as it is quite empty in the beginning.
-
-# Suppress[ezwf]: y
-
-##
-## Directory
-##
-
-# By default, mrtg puts all the files that it generates for each
-# router (the GIFs, the HTML page, the log file, etc.) in WorkDir.
-# If the "Directory" option is specified, the files are instead put
-# into a directory under WorkDir. (For example, given the options in
-# this mrtg.cfg-dist file, the "Directory" option below would cause all
-# the ezwf files to be put into /usr/tardis/pub/www/stats/mrtg/ezwf .)
-#
-# The directory must already exist; mrtg will not create it.
-
-# Directory[ezwf]: ezwf
-
-##
-## XSize and YSize ------------------------------------------
-##
-
-# By Default mrtgs graphs are 100 by 400 pixels wide (plus
-# some more for the labels. In the example we get almost
-# square graphs ...
-# Note: XSize must be between 20 and 600
-# YSize must be larger than 20
-
-# XSize[ezwf]: 300
-# YSize[ezwf]: 300
-
-##
-## XZoom YZoom -------------------------------------------------
-##
-
-# If you want your graphs to have larger pixels, you can
-# "Zoom" them.
-
-#XZoom[ezwf]: 2.0
-#YZoom[ezwf]: 2.0
-
-##
-## XScale YScale -------------------------------------------------
-##
-
-# If you want your graphs to be actually scaled use XScale
-# and YScale. (Beware while this works, the results look ugly
-# (to be frank) so if someone wants fix this: patches are
-# welcome.
-
-# XScale[ezwf]: 1.5
-# YScale[ezwf]: 1.5
-
-
-##
-## Step -----------------------------------------------------------
-##
-
-# Change the default step with from 5 * 60 seconds to
-# something else I have not tested this well ...
-
-# Step[ezwf]: 60
-
-##
-## Options ------------------------------------------
-##
-
-# The "Options" Keyword allows you to set some boolean
-# switches:
-#
-# growright - The graph grows to the left by default.
-#
-# bits - All the numbers printed are in bits instead
-# of bytes ... looks much more impressive :-)
-#
-# noinfo - Supress the information about uptime and
-# device name in the generated webpage.
-#
-# absolute - This is for data sources which reset their
-# value when they are read. This means that
-# rateup has not to build the difference between
-# this and the last value read from the data
-# source. Useful for external data gatherers.
-#
-# gauge - Treat the values gathered from target as absolute
-# and not as counters. This would be useful to
-# monitor things like diskspace, load and so
-# on ....
-#
-# nopercent Don't print usage percentages
-#
-# integer Print only integers in the summary
-# below the graph (No Kilo, Mega, Gigas) ...
-#
-
-# Options[ezwf]: growright, bits
-
-##
-## Colours ------------------------------------------
-##
-
-# The "Colours" tag allows you to override the default colour
-# scheme. Note: All 4 of the required colours must be
-# specified here The colour name ('Colourx' below) is the
-# legend name displayed, while the RGB value is the real
-# colour used for the display, both on the graph and n the
-# html doc.
-
-# Format is: Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB
-# where: Colour1 = Input on default graph
-# Colour2 = Output on default graph
-# Colour3 = Max input
-# Colour4 = Max output
-# RRGGBB = 2 digit hex values for Red, Green and Blue
-
-# Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
-
-##
-## Background ------------------------------------------
-##
-
-# With the "Background" tag you can configure the background
-# colour of the generated HTML page
-
-# Background[ezwf]: #a0a0a0a
-
-##
-## YLegend, ShortLegend, Legend[1234] ------------------
-##
-
-# The following keywords allow you to override the text
-# displayed for the various legends of the graph and in the
-# HTML document
-#
-# * YLegend : The Y-Axis of the graph
-# * ShortLegend: The 'b/s' string used for Max, Average and Current
-# * Legend[1234IO]: The strings for the colour legend
-#
-#YLegend[ezwf]: Bits per Second
-#ShortLegend[ezwf]: b/s
-#Legend1[ezwf]: Incoming Traffic in Bits per Second
-#Legend2[ezwf]: Outgoing Traffic in Bits per Second
-#Legend3[ezwf]: Maximal 5 Minute Incoming Traffic
-#Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic
-#LegendI[ezwf]: &nbsp;In:
-#LegendO[ezwf]: &nbsp;Out:
-# Note, if LegendI or LegendO are set to an empty string with
-# LegendO[ezwf]:
-# The corresponding line below the graph will not be printed at all.
-
-# If you live in an international world, you might want to
-# generate the graphs in different timezones. This is set in the
-# TZ variable. Under certain operating systems like Solaris,
-# this will provoke the localtime call to giv the time in
-# the selected timezone ...
-
-# Timezone[ezwf]: Japan
-
-# The Timezone is the standard Solaris timezone, ie Japan, Hongkong,
-# GMT, GMT+1 etc etc.
-
-# By default, mrtg (actually rateup) uses the strftime(3) '%W' option
-# to format week numbers in the monthly graphs. The exact semantics
-# of this format option vary between systems. If you find that the
-# week numbers are wrong, and your system's strftime(3) routine
-# supports it, you can try another format option. The POSIX '%V'
-# option seems to correspond to a widely used week numbering
-# convention. The week format character should be specified as a
-# single letter; either W, V, or U.
-
-# Weekformat[ezwf]: V
-
-# #############################
-# Two very special Target names
-# #############################
-
-# To save yourself some typing you can define a target
-# called '^'. The text of every Keyword you define for this
-# target will be PREPENDED to the corresponding Keyword of
-# all the targets defined below this line. The same goes for
-# a Target called '$' but its options will be APPENDED.
-#
-# The example will make mrtg use a common header and a
-# common contact person in all the pages generated from
-# targets defined later in this file.
-#
-#PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
-#PageTop[$]: Contact Peter Norton if you have any questions<HR>
-
-
-##################################################################
-##################################################################
-##################################################################
-#
-# Now some example mrtg.cfg files
-#
-##################################################################
-##################################################################
-##################################################################
-
-# Minimal mrtg.cfg
-#--------------------
-
-#WorkDir: /usr/tardis/pub/www/stats/mrtg
-#Target[r1]: 2:public@myrouter.somplace.edu
-#MaxBytes[r1]: 64000
-#Title[r1]: Traffic Analysis ISDN
-#PageTop[r1]: <H1>Stats for our ISDN Line</H1>
-
-
-# Minimal Cfg for several Routers.
-#---------------------------------
-#WorkDir: /usr/tardis/pub/www/stats/mrtg
-#
-#Title[^]: Traffic Analysis for
-#PageTop[^]: <H1>Stats for our
-#PageTop[$]: Contact The Chief if you notice anybody<HR>
-#
-#Title[isdn]: our ISDN Line
-#PageTop[isdn]: our ISDN Line </H1>
-#Target[isdn]: 2:public@router.somplace.edu
-#MaxBytes[isdn]: 64000
-#
-#Title[backb]: our Campus Backbone
-#PageTop[backb]: our Campus Backbone </H1>
-#Target[backb]: 1:public@router.somplace.edu
-#MaxBytes[backb]: 1250000
-
-# the following line removes the default prepend value
-# defined above
-#Title[^]:
-#Title[isdn2]: Traffic for the Backup ISDN Line
-#PageTop[isdn2]: our ISDN Line </H1>
-#Target[isdn2]: 3:public@router.somplace.edu
-#MaxBytes[isdn2]: 64000
-#----------------------------------------------------------------------
-
-#host pc1, cfgfile cfg/192.168.10.1.cfg, port serial0
-
-Target[192.168.10.1.1]: 1:public@192.168.10.1
-MaxBytes[192.168.10.1.1]: 1250000
-Title[192.168.10.1.1]: : Serial0
-PageTop[192.168.10.1.1]: <H1>Traffic Analysis for Serial0
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial0 (1)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-#host pc2, cfgfile cfg/192.168.10.1.cfg, port serial2
-
-Target[192.168.10.1.3]: 3:public@192.168.10.1
-MaxBytes[192.168.10.1.3]: 1250000
-Title[192.168.10.1.3]: : Serial2
-PageTop[192.168.10.1.3]: <H1>Traffic Analysis for Serial2
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial2 (3)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
-
-#host pc3, cfgfile cfg/192.168.10.1.cfg, port serial3
-
-Target[192.168.10.1.4]: 4:public@192.168.10.1
-MaxBytes[192.168.10.1.4]: 1250000
-Title[192.168.10.1.4]: : Serial3
-PageTop[192.168.10.1.4]: <H1>Traffic Analysis for Serial3
- </H1>
- <TABLE>
- <TR><TD>System:</TD><TD>local-gw in </TD></TR>
- <TR><TD>Maintainer:</TD><TD></TD></TR>
- <TR><TD>Interface:</TD><TD>Serial0 (1)</TD></TR>
- <TR><TD>IP:</TD><TD>local-gw (192.168.10.1)</TD></TR>
- <TR><TD>Max Speed:</TD>
- <TD>1250.0 kBytes/s</TD></TR>
- </TABLE>
-
-#----------------------------------------------------------------------
diff --git a/src/contrib/mrtgmk/cfg/mrtg_cfg b/src/contrib/mrtgmk/cfg/mrtg_cfg
deleted file mode 100644
index ba0a137..0000000
--- a/src/contrib/mrtgmk/cfg/mrtg_cfg
+++ /dev/null
@@ -1,512 +0,0 @@
-######################################################################
-# Multi Router Traffic Grapher -- Example Configuration File
-######################################################################
-#
-# * copy this file to ../run and call it mrtg.cfg
-# * consider using ../run/cfgmaker to build your initial mrtg.cfg file
-#
-# This file is for use with mrtg-2.x
-#
-# Note:
-#
-# * Keywords must start at the begin of a line.
-#
-# * Lines which follow a keyword line which do start
-# with a blank are appended to the keyword line
-#
-# * Empty Lines are ignored
-#
-# * Lines starting with a # sign are comments.
-
-
-# ####################
-# Global Configuration
-# ####################
-
-# Where should the logfiles, and webpages be created?
-
-WorkDir: /usr/tardis/pub/www/stats/mrtg
-Options[_]: growright,bits
-
-# --------------------------
-# Optional Global Parameters
-# --------------------------
-
-# How many seconds apart should the browser (Netscape) be
-# instructed to reload the page? If this is not defined, the
-# default is 300 seconds (5 minutes).
-
-# Refresh: 600
-
-# How often do you call mrtg? The default is 5 minutes. If
-# you call it less often, you should specify it here. This
-# does two things:
-
-# a) the generated HTML page does contain the right
-# information about the calling interval ...
-
-# b) a META header in the generated HTML page will instruct
-# caches about the time to live of this page .....
-
-# In this example we tell mrtg that we will be calling it
-# every 10 minutes. If you are calling mrtg every 5
-# minutes, you can leave this line commented out.
-
-# Interval: 10
-
-# With this switch mrtg will generate .meta files for CERN
-# and Apache servers which contain Expiration tags for the
-# html and gif files. The *.meta files will be created in
-# the same directory as the other files, so you might have
-# to set "MetaDir ." in your srm.conf file for this to work
-#
-# NOTE: If you are running Apache-1.2 you can use the mod_expire
-# to achieve the same effect ... see the file htaccess-dist
-
-#WriteExpires: Yes
-
-
-# If you want to keep the mrtg icons in some place other than the
-# working directory, use the IconDir varibale to give its url.
-
-# IconDir: /mrtgicons/
-
-
-# #################################################
-# Configuration for each Target you want to monitor
-# #################################################
-
-# The configuration keywords "Target" must be followed by a
-# unique name. This will also be the name used for the
-# webpages, logfiles and gifs created for that target.
-
-# Note that the "Target" sections can be auto-generated with
-# the cfgmaker tool. Check readme.html for instructions.
-# ========
-
-##
-## Target ----------------------------------------
-##
-
-# With the "Target" keyword you tell mrtg what it should
-# monitor. The "Target" keyword takes arguments in a wide
-# range of formats:
-
-# * The most basic format is "port:community@router"
-# This will generate a traffic graph for port 'port'
-# of the router 'router' and it will use the community
-# 'community' for the snmp query.
-
-# Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch
-
-# * Sometimes you are sitting on the wrong side of the
-# link. And you would like to have mrtg report Incoming
-# traffic as outgoing and visa versa. This can be achieved
-# by adding the '-' sign in front of the "Target"
-# description. It flips the in and outgoing traffic rates.
-
-# Target[ezci]: -1:public@ezci-ether.ethz.ch
-
-# * You can also explicitly define the OID to query by using the
-# following syntax 'OID_1&OID_2:community@router'
-# The following example will retrieve error input and output
-# octets/sec on interface 1. MRTG needs to graph two values, so
-# you need to specify two OID's such as temperature and humidity
-# or error input and error output.
-
-# Target[ezwf]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter
-
-# * mrtg knows a number of symbolical SNMP variable
-# names. See the file mibhelp.txt for a list of known
-# names. One example are the ifInErrors and and ifOutErrors
-# names. This means you can specify the above as:
-
-# Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter
-
-# * if you want to monitor something which does not provide
-# data via snmp you can use some external program to do
-# the data gathering.
-
-#
-# The external command must return 4 lines of output:
-# Line 1 : current state of the 'incoming bytes counter'
-# Line 2 : current state of the 'outgoing bytes counter'
-# Line 3 : string, telling the uptime of the target.
-# Line 4 : string, telling the name of the target.
-
-# Depending on the type of data your script returns you
-# might want to use the 'gauge' or 'absolute' arguments
-# for the "Options" keyword.
-
-# Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
-
-# * You can also use several statements in a mathematical
-# expression. This could be used to aggregate both B channels
-# in an ISDN connection or multiple T1's that are aggregated
-# into a single channel for greater bandwidth.
-# Note the whitespace arround the target definitions.
-
-# Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
-# * 4:public@ciscoF
-
-##
-## RouterUptime ---------------------------------------
-##
-#
-# In cases where you calculate the used bandwidth from
-# several interfaces you normaly don't get the routeruptime
-# and routername displayed on the web page.
-# If this interface are on the same router and the uptime and
-# name should be displayed nevertheless you have to specify
-# its community and address again with the RouterUptime keyword.
-
-# Target[kacisco]: 1:public@194.64.66.250 + 2:public@194.64.66.250
-# RouterUptime[kacisco]: public@194.64.66.250
-
-##
-## MaxBytes -------------------------------------------
-##
-
-# How many bytes per second can this port carry. Since most
-# links are rated in bits per second, you need to divide
-# their maximum bandwidth (in bits) by eight (8) in order to get
-# bytes per second. This is very important to make your
-# unscaled graphs display realistic information.
-# T1 = 193000, 56K = 7000, Ethernet = 1250000. The "MaxBytes"
-# value will be used by mrtg to decide whether it got a
-# valid response from the router. If a number higher than
-# "MaxBytes" is returned, it is ignored. Also read the section
-# on AbsMax for further info.
-
-# MaxBytes[ezwf]: 1250000
-
-##
-## Title -----------------------------------------------
-##
-
-# Title for the HTML page which gets generated for the graph.
-
-# Title[ezwf]: Traffic Analysis for ETZ C 95.1
-
-##
-## PageTop ---------------------------------------------
-##
-
-# Things to add to the top of the generated HTML page. Note
-# that you can have several lines of text as long as the
-# first column is empty.
-# Note that the continuation lines will all end up on the same
-# line in the html page. If you want linebreaks in the generated
-# html use the '\n' sequence.
-
-# PageTop[ezwf]: <H1>Traffic Analysis for ETZ C95.1</H1>
-# Our Campus Backbone runs over an FDDI line\n
-# with a maximum transfer rate of 12.5 Mega Bytes per
-# Second.
-
-##
-## PageFoot ---------------------------------------------
-##
-
-# Things to add at the very end of the mrtg generated html page
-
-# PageFoot[ezwf]: <HR size=2 noshade>This page is managed by Blubber
-
-# --------------------------------------------------
-# Optional Target Configuration Tags
-# --------------------------------------------------
-
-##
-## AddHead -----------------------------------------
-##
-
-# Use this tag like the PageTop header, but its contents
-# will be added between </TITLE> and </HEAD>.
-
-# AddHead[ezwf]: <!-- Just a comment for fun -->
-
-##
-## AbsMax ------------------------------------------
-##
-
-# If you are monitoring a link which can handle more traffic
-# than the MaxBytes value. Eg, a line which uses compression
-# or some frame relay link, you can use the AbsMax keyword
-# to give the absolute maximum value ever to be reached. We
-# need to know this in order to sort out unrealistic values
-# returned by the routers. If you do not set absmax, rateup
-# will ignore values higher then MaxBytes.
-
-# AbsMax[ezwf]: 2500000
-
-##
-## Unscaled ------------------------------------------
-##
-
-# By default each graph is scaled vertically to make the
-# actual data visible even when it is much lower than
-# MaxBytes. With the "Unscaled" variable you can suppress
-# this. It's argument is a string, containing one letter
-# for each graph you don't want to be scaled: d=day w=week
-# m=month y=year. In the example I suppress scaling for the
-# yearly and the monthly graph.
-
-# Unscaled[ezwf]: ym
-
-##
-## WithPeak ------------------------------------------
-##
-
-# By default the graphs only contain the average transfer
-# rates for incoming and outgoing traffic. The
-# following option instructs mrtg to display the peak
-# 5 minute transfer rates in the [w]eekly, [m]onthly and
-# [y]early graph. In the example we define the monthly
-# and the yearly graph to contain peak as well as average
-# values.
-
-# WithPeak[ezwf]: ym
-
-##
-## Supress ------------------------------------------
-##
-
-# By Default mrtg produces 4 graphs. With this option you
-# can suppress the generation of selected graphs. The format
-# is analog to the above option. In this example we suppress
-# the yearly graph as it is quite empty in the beginning.
-
-# Suppress[ezwf]: y
-
-##
-## Directory
-##
-
-# By default, mrtg puts all the files that it generates for each
-# router (the GIFs, the HTML page, the log file, etc.) in WorkDir.
-# If the "Directory" option is specified, the files are instead put
-# into a directory under WorkDir. (For example, given the options in
-# this mrtg.cfg-dist file, the "Directory" option below would cause all
-# the ezwf files to be put into /usr/tardis/pub/www/stats/mrtg/ezwf .)
-#
-# The directory must already exist; mrtg will not create it.
-
-# Directory[ezwf]: ezwf
-
-##
-## XSize and YSize ------------------------------------------
-##
-
-# By Default mrtgs graphs are 100 by 400 pixels wide (plus
-# some more for the labels. In the example we get almost
-# square graphs ...
-# Note: XSize must be between 20 and 600
-# YSize must be larger than 20
-
-# XSize[ezwf]: 300
-# YSize[ezwf]: 300
-
-##
-## XZoom YZoom -------------------------------------------------
-##
-
-# If you want your graphs to have larger pixels, you can
-# "Zoom" them.
-
-#XZoom[ezwf]: 2.0
-#YZoom[ezwf]: 2.0
-
-##
-## XScale YScale -------------------------------------------------
-##
-
-# If you want your graphs to be actually scaled use XScale
-# and YScale. (Beware while this works, the results look ugly
-# (to be frank) so if someone wants fix this: patches are
-# welcome.
-
-# XScale[ezwf]: 1.5
-# YScale[ezwf]: 1.5
-
-
-##
-## Step -----------------------------------------------------------
-##
-
-# Change the default step with from 5 * 60 seconds to
-# something else I have not tested this well ...
-
-# Step[ezwf]: 60
-
-##
-## Options ------------------------------------------
-##
-
-# The "Options" Keyword allows you to set some boolean
-# switches:
-#
-# growright - The graph grows to the left by default.
-#
-# bits - All the numbers printed are in bits instead
-# of bytes ... looks much more impressive :-)
-#
-# noinfo - Supress the information about uptime and
-# device name in the generated webpage.
-#
-# absolute - This is for data sources which reset their
-# value when they are read. This means that
-# rateup has not to build the difference between
-# this and the last value read from the data
-# source. Useful for external data gatherers.
-#
-# gauge - Treat the values gathered from target as absolute
-# and not as counters. This would be useful to
-# monitor things like diskspace, load and so
-# on ....
-#
-# nopercent Don't print usage percentages
-#
-# integer Print only integers in the summary
-# below the graph (No Kilo, Mega, Gigas) ...
-#
-
-# Options[ezwf]: growright, bits
-
-##
-## Colours ------------------------------------------
-##
-
-# The "Colours" tag allows you to override the default colour
-# scheme. Note: All 4 of the required colours must be
-# specified here The colour name ('Colourx' below) is the
-# legend name displayed, while the RGB value is the real
-# colour used for the display, both on the graph and n the
-# html doc.
-
-# Format is: Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB
-# where: Colour1 = Input on default graph
-# Colour2 = Output on default graph
-# Colour3 = Max input
-# Colour4 = Max output
-# RRGGBB = 2 digit hex values for Red, Green and Blue
-
-# Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
-
-##
-## Background ------------------------------------------
-##
-
-# With the "Background" tag you can configure the background
-# colour of the generated HTML page
-
-# Background[ezwf]: #a0a0a0a
-
-##
-## YLegend, ShortLegend, Legend[1234] ------------------
-##
-
-# The following keywords allow you to override the text
-# displayed for the various legends of the graph and in the
-# HTML document
-#
-# * YLegend : The Y-Axis of the graph
-# * ShortLegend: The 'b/s' string used for Max, Average and Current
-# * Legend[1234IO]: The strings for the colour legend
-#
-#YLegend[ezwf]: Bits per Second
-#ShortLegend[ezwf]: b/s
-#Legend1[ezwf]: Incoming Traffic in Bits per Second
-#Legend2[ezwf]: Outgoing Traffic in Bits per Second
-#Legend3[ezwf]: Maximal 5 Minute Incoming Traffic
-#Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic
-#LegendI[ezwf]: &nbsp;In:
-#LegendO[ezwf]: &nbsp;Out:
-# Note, if LegendI or LegendO are set to an empty string with
-# LegendO[ezwf]:
-# The corresponding line below the graph will not be printed at all.
-
-# If you live in an international world, you might want to
-# generate the graphs in different timezones. This is set in the
-# TZ variable. Under certain operating systems like Solaris,
-# this will provoke the localtime call to giv the time in
-# the selected timezone ...
-
-# Timezone[ezwf]: Japan
-
-# The Timezone is the standard Solaris timezone, ie Japan, Hongkong,
-# GMT, GMT+1 etc etc.
-
-# By default, mrtg (actually rateup) uses the strftime(3) '%W' option
-# to format week numbers in the monthly graphs. The exact semantics
-# of this format option vary between systems. If you find that the
-# week numbers are wrong, and your system's strftime(3) routine
-# supports it, you can try another format option. The POSIX '%V'
-# option seems to correspond to a widely used week numbering
-# convention. The week format character should be specified as a
-# single letter; either W, V, or U.
-
-# Weekformat[ezwf]: V
-
-# #############################
-# Two very special Target names
-# #############################
-
-# To save yourself some typing you can define a target
-# called '^'. The text of every Keyword you define for this
-# target will be PREPENDED to the corresponding Keyword of
-# all the targets defined below this line. The same goes for
-# a Target called '$' but its options will be APPENDED.
-#
-# The example will make mrtg use a common header and a
-# common contact person in all the pages generated from
-# targets defined later in this file.
-#
-#PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
-#PageTop[$]: Contact Peter Norton if you have any questions<HR>
-
-
-##################################################################
-##################################################################
-##################################################################
-#
-# Now some example mrtg.cfg files
-#
-##################################################################
-##################################################################
-##################################################################
-
-# Minimal mrtg.cfg
-#--------------------
-
-#WorkDir: /usr/tardis/pub/www/stats/mrtg
-#Target[r1]: 2:public@myrouter.somplace.edu
-#MaxBytes[r1]: 64000
-#Title[r1]: Traffic Analysis ISDN
-#PageTop[r1]: <H1>Stats for our ISDN Line</H1>
-
-
-# Minimal Cfg for several Routers.
-#---------------------------------
-#WorkDir: /usr/tardis/pub/www/stats/mrtg
-#
-#Title[^]: Traffic Analysis for
-#PageTop[^]: <H1>Stats for our
-#PageTop[$]: Contact The Chief if you notice anybody<HR>
-#
-#Title[isdn]: our ISDN Line
-#PageTop[isdn]: our ISDN Line </H1>
-#Target[isdn]: 2:public@router.somplace.edu
-#MaxBytes[isdn]: 64000
-#
-#Title[backb]: our Campus Backbone
-#PageTop[backb]: our Campus Backbone </H1>
-#Target[backb]: 1:public@router.somplace.edu
-#MaxBytes[backb]: 1250000
-
-# the following line removes the default prepend value
-# defined above
-#Title[^]:
-#Title[isdn2]: Traffic for the Backup ISDN Line
-#PageTop[isdn2]: our ISDN Line </H1>
-#Target[isdn2]: 3:public@router.somplace.edu
-#MaxBytes[isdn2]: 64000
diff --git a/src/contrib/mrtgmk/cfg/page1.cfg b/src/contrib/mrtgmk/cfg/page1.cfg
deleted file mode 100644
index 6deda91..0000000
--- a/src/contrib/mrtgmk/cfg/page1.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-0 HTMLFILE cfg/page1.html
-1 HTMLCODE <H1>PC from local network - links</H1>
-1 DATA pc1 PC1 Trafic analyses
-1 DATA pc2 PC2 Trafic analyses
-1 DATA pc3 PC3 Trafic analyses
diff --git a/src/contrib/mrtgmk/cfg/page1.html b/src/contrib/mrtgmk/cfg/page1.html
deleted file mode 100644
index 053a835..0000000
--- a/src/contrib/mrtgmk/cfg/page1.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<HTML>
-<HEADER>
-<TITLE>
-Traffic analyses</TITLE>
-</HEADER>
-<BODY>
-<UL TYPE="disc">
- <LI><H1>PC from local network - links</H1></LI>
- <LI><A HREF="http://traffic.isp.ro/192.168.10.1.1.html">PC1 Trafic analyses</A></LI>
- <LI><A HREF="http://traffic.isp.ro/192.168.10.1.3.html">PC2 Trafic analyses</A></LI>
- <LI><A HREF="http://traffic.isp.ro/192.168.10.1.4.html">PC3 Trafic analyses</A></LI>
-</UL>
-</BODY>
-</HTML>
diff --git a/src/contrib/mrtgmk/cfg/page2.cfg b/src/contrib/mrtgmk/cfg/page2.cfg
deleted file mode 100644
index e8fb36f..0000000
--- a/src/contrib/mrtgmk/cfg/page2.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-0 HTMLFILE cfg/page2.html
-0 HTMLCODE <H1>PC from local network - overview</H1>
-0 HTMLCODE PC1 Trafic analyses<BR>
-0 GIFD # pc1
-0 HTMLCODE <BR><HR>
-0 HTMLCODE PC2 Trafic analyses<BR>
-0 GIFD # pc2
-0 HTMLCODE <BR><HR>
-0 HTMLCODE PC3 Trafic analyses<BR>
-0 GIFD # pc3
-0 HTMLCODE <BR><HR>
diff --git a/src/contrib/mrtgmk/cfg/page2.html b/src/contrib/mrtgmk/cfg/page2.html
deleted file mode 100644
index ef75845..0000000
--- a/src/contrib/mrtgmk/cfg/page2.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<HTML>
-<HEADER>
-<TITLE>
-Traffic analyses</TITLE>
-</HEADER>
-<BODY>
-<H1>PC from local network - overview</H1>
-PC1 Trafic analyses<BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.1.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.1-day.gif"></IMG></A>
-<BR><HR>
-PC2 Trafic analyses<BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.3.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.3-day.gif"></IMG></A>
-<BR><HR>
-PC3 Trafic analyses<BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.4.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.4-day.gif"></IMG></A>
-<BR><HR>
-</BODY>
-</HTML>
diff --git a/src/contrib/mrtgmk/cfg/today.html b/src/contrib/mrtgmk/cfg/today.html
deleted file mode 100644
index 7d8af11..0000000
--- a/src/contrib/mrtgmk/cfg/today.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<HTML>
-<HEADER>
-<TITLE>
-Traffic analyses - day</TITLE>
-</HEADER>
-<BODY>
-<H1>day .gifs for hosts in the .cfg file 192.168.10.1.cfg</H1><P>
-<HR><BR><H1>Traffic analysis for pc1</H1><BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.1.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.1-day.gif"></IMG></A><BR>
-<HR><BR><H1>Traffic analysis for pc2</H1><BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.3.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.3-day.gif"></IMG></A><BR>
-<HR><BR><H1>Traffic analysis for pc3</H1><BR>
-<A HREF="http://traffic.isp.ro/192.168.10.1.4.html"><IMG SRC="http://traffic.isp.ro/192.168.10.1.4-day.gif"></IMG></A><BR>
-</BODY>
-</HTML>
diff --git a/src/contrib/mrtgmk/doc/commands b/src/contrib/mrtgmk/doc/commands
deleted file mode 100644
index 396d275..0000000
--- a/src/contrib/mrtgmk/doc/commands
+++ /dev/null
@@ -1,56 +0,0 @@
-0 COMMENT
-0 ENDCOMMENT
-
-0 XDEBUG on|off
-
-0 INCLUDE cfgfile
-
-0 DEFHOST hostname fcfgname port
-
-0 MRTG.CFG cfgpathdst cfgpathsrc
-0 HTMLFILE filepath
-
-0 HTMLCODE code inserted in html
-0 HTMLLINK link text
-0 LINK2DH host text
-0 MRTGTEXT text inserted in mrtg.cfg
-
-0 CFGDIR cfg_path
-
-0 TITLE txt
-
-0 BODY body arguments
-0 NOBODY
-
-0 BASE url
-0 NOBASE
-
-0 EXEC cmd
-
-link = # or RealLink
-0 GIFD link host
-0 GIFW link host
-0 GIFM link host
-0 GIFY link host
-
-0 ALIAS alias_name alias_body
-0 DELALIAS alias_name
-0 CHECK4ALIAS yes|no
-
-0 MSG msg
-
-0 MKLINK dir host path
-
-0 MKD fcfg htmlfilename
-0 MKW fcfg htmlfilename
-0 MKM fcfg htmlfilename
-0 MKY fcfg htmlfilename
-
-0 CHNGTRGNAME yes|no
-0 CONVIP2NAME mrtg_out_path
-0 CONVNAME2IP mrtg_out_path
-
-n HTMLCODE html code
-n HTMLLINK link text
-n LINK2DH host text
-n DATA host text
diff --git a/src/contrib/mrtgmk/doc/readme.1st b/src/contrib/mrtgmk/doc/readme.1st
deleted file mode 100644
index 19c6390..0000000
--- a/src/contrib/mrtgmk/doc/readme.1st
+++ /dev/null
@@ -1,138 +0,0 @@
-"mrtgmk" by Iulian Radu (iulian_r@starnets.ro) [v2.0]
-
-"mrtgmk" is giftware. It is my contribution to mrtg package.
-
-"mrtgmk" is a program that scan a .cfg file and generate a mrtg.cfg
-style file + a .html file with links to the .html files generated
-by mrtg.
-
-You can use the sources for your inspiration, can change them, BUT
-you are not allowed to sell them.
-
-Cfg file structure:
--------------------
-The .cfg file can contain any of the next row types. n meens any
-integer positive (>0):
-
-0 COMMENT - mark a block of rows as a comment, /**/ c like :)
-0 ENDCOMMENT
-
-0 XDEBUG on|off - print/don't print the line readed and executed from
- cfgfile
-
-0 INCLUDE cfgfile - execute de commands from the cfgfile
-
-0 DEFHOST hostname fcfgname port - define a name 'hostname' for the pair
- 'fcfgname port'. 'fcfgname' is the name of a file
- precedently generated by cfgmaker. The resolved
- name for a defined host can be get from HOST_hostname
- alias when CHECK4ALIAS is on.
-
-0 MRTG.CFG cfgpathdst cfgpathsrc - define the name of a generated mrtg.cfg
- (cfgpathdst) and the name of a source mrtg.cfg. If
- the two names are the same, then all the new entries
- in 'cfgpathdst' will be appended, else will be created
- a new mrtg.cfg file with the initial contains took
- from 'cfgpathsrc'
-0 HTMLFILE filepath - where will be write the html code
-
-0 HTMLCODE code inserted in html - insert code in the generated html file;
- not <BR> nor <P> added
-0 HTMLLINK link text - insert a link in the html page, making no identation;
- not <BR> nor <P> added
-0 LINK2DH host text - insert a link in the html page, making no identation;
- not <BR> nor <P> added
-
-0 MRTGTEXT text inserted in mrtg.cfg - insert text in the generated mrtg.cfg
-
-0 CFGDIR cfg_path - append cfg_path in the front of .cfg files generated
- by cfgmaker
-0 NOCFGDIR - not any more cfg_path used
-
-0 TITLE txt - text used between TITLE tags
-
-0 BODY body arguments - define the arguments inserted with BODY tag in the
- html code
-0 NOBODY - erase all arguments for BODY tag
-
-0 BASE url - append this url in front of all references at html
- pages and gifs
-0 NOBASE - use what the user has been wrote in .cfg file
-
-0 EXEC cmd - exec a command in shell
-
-0 GIFD link host - day gif
-0 GIFW link host - week gif
-0 GIFM link host - month gif
-0 GIFY link host - year gif
- - 0 GIFx link host -> <A HREF=link><IMG SRC=base/host-x.gif></IMG></A>
- - 0 GIFx # host -> <A HREF=base/host.html><IMG SRC=base/host-x.gif></IMG></A>
- - 0 GIFx link # -> <A HREF=base/link.html><IMG SRC=base/link-x.gif></IMG></A>
- - 0 GIFx # # -> illegal
- - host-x.gif means that it is searched in defined
- hosts list for the name cfgmaker assign to that host
- and append the right extension (e.g. -day.gif) to it
-
-0 ALIAS alias_name alias_body - define an alias named alias_name and
- that will be used as %alias_name% and
- CHECK4ALIAS yes
-0 DELALIAS alias_name - erase the alias :]
-0 CHECK4ALIAS yes|no - if yes, then all input string will be checked for
- aliases. An alias is a name between %s (%alias_name% :)
-
-0 MSG msg - display the message msg on screen
-
-0 MKLINK dir host path - create a directory 'dir' that contain links through
- a host page, located in path. If exist old links,
- theses will be erased
-
- - create a htmlfile with day, week, month or year
- gifs and links through appropiate html file.
- Theses commandes MUST be done before any 0 DEFHOST
- commands relative to host from fcfg.
-0 MKD fcfg htmlfilename
-0 MKW fcfg htmlfilename
-0 MKM fcfg htmlfilename
-0 MKY fcfg htmlfilename
-
-0 CHNGTRGNAME yes|no - change (or not) the name of the target html files
- if change, then the name will be the defhost declared
- name, otherwise will be the name declared in .cfg file
- by cfgmaker
-
-0 CONVIP2NAME mrtg_out_path/ - change the name of the already existent files
- from an ip style (somename.x where x is the snmp index)
- into a defhost style
- - 0 CHNGTRGNAME yes is required
-
-0 CONVNAME2IP mrtg_out_path/ - change the name of the already existent files
- from a defhost style into ip style (somename.x where x
- is the snmp index)
- - 0 CHNGTRGNAME no is required
-
- - mrtg_out_path must be the path where mrtg create
- the htmls, gifs and logs files and must end with a
- slash ('/')
- - must to be present before the definitions of the
- hosts for with I intend to change the file name;
- once switched to this action, exist not any way
- to fall back
-
-n HTMLCODE html code - insert code in the html page, making identation;
- not <BR> nor <P> added but surrounded by <LI></LI>
-n HTMLLINK link text - insert a link in the html page, making identation;
- not <BR> nor <P> added but surrounded by <LI></LI>
-n LINK2DH host text - insert a link in the html page, making identation;
- not <BR> nor <P> added but surrounded by <LI></LI>
-n DATA host text - insert a link through a page genetrated by mrtg,
- making identation; surrounded by <LI></LI>
-
-# or \n - treated as a comment
-
-If you expand the code, please notify me.
-
-"mkm" call the gcc to produce the exec "mrtgmk" from mrtgmk.c .
-"smrtgmk" is an example of calling "mrtgmk".
-
-Iulian Radu (iulian_r@starnets.ro).
-28th September 1999 12:00pm Romanian time
diff --git a/src/contrib/mrtgmk/readme.1st b/src/contrib/mrtgmk/readme.1st
deleted file mode 100644
index 49dc699..0000000
--- a/src/contrib/mrtgmk/readme.1st
+++ /dev/null
@@ -1,26 +0,0 @@
-"mrtgmk" by Iulian Radu (iulian_r@starnets.ro) [v2.2]
-
-"mrtgmk" is giftware. It is my contribution to mrtg package.
-
-"mrtgmk" is a program that scan a .cfg file and generate a mrtg.cfg
-style file + a .html file with links to the .html files generated
-by mrtg.
-
-Version 2.2 bring you a strong facility: you can rename the target
-defined inside of genereated mrtg.cfg file. Using this new facility,
-you will no longer depends on snmp index value. So, if the index of
-a port is changed on a router, your graphics will still reprezent
-corect the history of a host.
-
-If you need to migrate from v1.x to v2.x read the readme.1st and use
-the program from v1_to_v2 directory.
-
-To learn to use mrtgmk v2.x read the docs from doc directory.
-
-In cfg directory you will find an example of a cfg file for mrtgmk v2.x.
-
-Because I dont make all the times checkes for receiving of correct arguments,
-a core dump is posible :( , everything depends on you.
-
-Iulian Radu (iulian_r@starnets.ro).
-13th July 1999 12:00am Romanian time
diff --git a/src/contrib/mrtgmk/smrtgmk b/src/contrib/mrtgmk/smrtgmk
deleted file mode 100755
index da927e9..0000000
--- a/src/contrib/mrtgmk/smrtgmk
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-#this is an example of using mrtgmk
-
-clear
-./mrtgmk cfg/a.cfg
diff --git a/src/contrib/mrtgmk/src/alias.c b/src/contrib/mrtgmk/src/alias.c
deleted file mode 100644
index e10d796..0000000
--- a/src/contrib/mrtgmk/src/alias.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-int apos=-1; //memorize position of a free cell
-
-char* findalias(char* buf){
-int i;
-apos=-1;
-for(i=0;i<nalias;i++){
- if(!strcmp(aliasn[i],buf))
- return aliasi[i];
- if(!aliasn[i][0]) apos=i; //no need to scan all defined aliases
- }
-if(strncmp(buf,"HOST_",5)) return NULL;
-return findhost(buf+5);
-}
-
-void falias(char* buf){
-char alias[129],*replace;
-sscanf(buf,"%s",alias);
-replace=findnsp(buf,1);
-if(findalias(alias))
- fprintf(stderr,err[7],alias);
-else
- if(apos<0){
- strcpy(aliasn[nalias],alias);
- strcpy(aliasi[nalias],replace);
- nalias++;}
- else{
- strcpy(aliasn[apos],alias);
- strcpy(aliasi[apos],replace);}
-}
-
-void fcheck4alias(char* buf){
-if(!strcasecmp(buf,"yes")){
- usealias=1;
- return;}
-if(!strcasecmp(buf,"no")){
- usealias=0;
- return;}
-fprintf(stderr,err[11],buf);
-}
-
-char* expand(char* str){
-char buf[257],al[129];
-int i,j,k;
-char* alias;
-for(i=j=0;str[i];i++,j++)
- if(str[i]!='%') buf[j]=str[i];
- else{
- for(i++,k=0;(str[i]) && (str[i]!='%');i++,k++)
- al[k]=str[i];
- al[k]=0;
- alias=findalias(al);
- if(!alias){
- fprintf(stderr,err[8],al);
- return str;}
- strcpy(buf+j,alias);
- j+=strlen(alias)-1;}
-buf[j]=0;
-strcpy(str,buf);
-return str;
-}
-
-void fdelalias(char* buf){
-int i;
-for(i=0;i<nalias;i++)
- if(!strcmp(aliasn[i],buf))
- aliasn[i][0]=0;
-}
diff --git a/src/contrib/mrtgmk/src/defhost.c b/src/contrib/mrtgmk/src/defhost.c
deleted file mode 100644
index 5bcf918..0000000
--- a/src/contrib/mrtgmk/src/defhost.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-int mkndx(char* file){
-char tmp[257],xtmp[257],*ptmp;
-FILE *fcfg,*fndx;
-unsigned long ofs,xofs;
-/* open .cfg file */
-if(cfgdir[0]) sprintf(tmp,"%s/%s",cfgdir,file);
-else strcpy(tmp,file);
-fcfg=fopen(tmp,"rt");
-if(!fcfg){
- fprintf(stderr,err[0],tmp);
- return 1;}
-/* check if file .cfg has length 0 */
-if(fseek(fcfg,0,SEEK_END)){
- fclose(fcfg);
- return 1;}
-if(!ftell(fcfg)){
- fprintf(stderr,err[1],tmp);
- sprintf(xtmp,"rm -f %s",tmp);
- system(xtmp);
- return 1;}
-if(fseek(fcfg,0,SEEK_SET)) return 1;
-/* create de index file */
-sprintf(tmp,"%s.ndx",extractfname(file));
-fndx=fopen(tmp,"wb");
-if(!fndx){
- fclose(fcfg);
- return 1;}
-while(!feof(fcfg)){
- xofs=ftell(fcfg);
- tmp[0]=0;
- fgets(tmp,256,fcfg);
- if((tmp[0]=='#') || (tmp[0]==0) || (tmp[0]=='\n')) continue;
- if(!strncmp(tmp,"Target[",7)) ofs=xofs;
- if(!strncmp(tmp,"Title[",6)){
- ptmp=findnc(tmp,2,':');
- trim(ptmp);
- fprintf(fndx,"%08ld %s\n",ofs,ptmp);}
- }
-fclose(fndx);
-fclose(fcfg);
-return 0;
-}
-
-void setPI(char* buf,unsigned long* pos,char** ifa){
-sscanf(buf,"%08ld",pos);
-*ifa=buf+9;
-killnl(buf+9);
-}
-
-void gettarget(char* buf,char* target){ //word between []
-int i;
-for(;buf[0]!='[';buf++);
-buf++;
-for(i=0;buf[0]!=']';buf++,i++) target[i]=buf[0];
-target[i]=0;
-}
-
-char* findhost(char* buf){
-int i;
-for(i=0;i<nhosts;i++)
- if(!strcmp(hostsn[i],buf))
- return hostsi[i];
-return NULL;
-}
-
-void convertname(char* tmp){
-for(;tmp[0];tmp++){
- if(!isalnum(tmp[0])) tmp[0]='_';
- else tmp[0]=tolower(tmp[0]);
- }
-}
-
-void fdefhost(char* buf){
-char host[129],fcfg[257],tmp[257],target[129],xtarget[129],*port;
-FILE *fi;
-unsigned long pos;
-char *ifa=NULL,
- *txt[]={"day","week","month","year"},
- *xtxt[]={"-day.gif","-week.gif","-month.gif","-year.gif",".html",".log",".old"};
-int i,j;
-if(!fm){
- fprintf(stderr,err[2]);
- return;}
-sscanf(buf,"%s %s",host,fcfg);
-if(findhost(host))
- fprintf(stderr,err[6],host);
-/* read index file */
-sprintf(tmp,"%s.ndx",extractfname(fcfg));
-fi=fopen(tmp,"rt");
-if(!fi){
- if(mkndx(fcfg)) return; //create the index file
- fi=fopen(tmp,"rt");
- if(!fi) return;
- }
-port=findnsp(buf,2);
-while(!feof(fi)){
- fgets(tmp,256,fi);
- setPI(tmp,&pos,&ifa); //read pos and interface
- if(!strcasecmp(port,ifa)){
- break;}
- }
-if(feof(fi)){
- if(cfgdir[0]) fprintf(stderr,err[3],port,cfgdir,fcfg);
- else fprintf(stderr,err[4],port,fcfg);
- fclose(fi);
- return;}
-fclose(fi);
-/* comment in mrtg.cfg file */
-if(cfgdir[0]){
- fprintf(fm,"\n#host %s, cfgfile %s/%s, port %s\n\n",host,cfgdir,fcfg,port);
- sprintf(tmp,"%s/%s",cfgdir,fcfg);}
-else{
- fprintf(fm,"\n#host %s, cfgfile %s, port %s\n\n",host,fcfg,port);
- strcpy(tmp,fcfg);}
-/* read config file to extract section */
-fi=fopen(tmp,"rt");
-if(!fi){
- fprintf(stderr,err[5],tmp);
- return;}
-fseek(fi,pos,SEEK_SET);
-fgets(buf,256,fi); /*Target[...*/
-gettarget(buf,xtarget);
-if(chngname){
- strcpy(target,host);
- convertname(target); /* switch to lowercase */
- j=strlen(buf);
- for(i=0;i<j;i++){ /* write the line Target[... */
- fprintf(fm,"%c",buf[i]);
- if(buf[i]=='['){
- for(;i<j;i++) if(buf[i]==']') break;
- fprintf(fm,"%s]",target);}
- }
- while(!feof(fi)){ /* write rest of the lines */
- fgets(buf,256,fi);
- j=strlen(buf);
- for(i=0;i<j;i++){
- fprintf(fm,"%c",buf[i]);
- if(buf[i]=='['){
- for(;i<j;i++) if(buf[i]==']') break;
- fprintf(fm,"%s]",target);}
- }
- if(!strncmp(buf,"#-",2)) break;
- }
- }
-else{
- strcpy(target,xtarget);
- fprintf(fm,"%s",buf);
- while(!feof(fi)){
- fgets(buf,256,fi);
- fprintf(fm,"%s",buf);
- if(!strncmp(buf,"#-",2)) break;
- }
- }
-fclose(fi);
-strcpy(hostsn[nhosts],host);
-strcpy(hostsi[nhosts],target);
-nhosts++;
-/* mk?,? */
-for(i=0;i<4;i++){
- for(j=0;j<nmkr[i];j++){
- if(!strcmp(mkrn[j][i],fcfg)){
- fprintf(mkri[j][i],"<HR><BR><H1>%s %s</H1><BR>\n",btxt[1],host);
- if(base[0]) fprintf(mkri[j][i],"<A HREF=\"http://%s/%s.html\"><IMG SRC=\"http://%s/%s-%s.gif\"></IMG></A><BR>\n",base,target,base,target,txt[i]);
- else fprintf(mkri[j][i],"<A HREF=\"%s.html\"><IMG SRC=\"%s-%s.gif\"></IMG></A><BR>\n",target,target,txt[i]);
- break;}
- }
- }
-convertname(host); /* change again the name, this time host var */
-switch(conv){
- case 1: //convip2name
- for(i=0;i<7;i++){
- sprintf(tmp,"mv %s%s%s %s%s%s",mrtgoutpath,xtarget,xtxt[i],mrtgoutpath,host,xtxt[i]);
- system(tmp);}
- break;
- case 2: //convname2ip
- for(i=0;i<7;i++){
- sprintf(tmp,"mv %s%s%s %s%s%s",mrtgoutpath,host,xtxt[i],mrtgoutpath,xtarget,xtxt[i]);
- system(tmp);}
- break;
- }
-}
-
diff --git a/src/contrib/mrtgmk/src/fnct0.c b/src/contrib/mrtgmk/src/fnct0.c
deleted file mode 100644
index 212e4a4..0000000
--- a/src/contrib/mrtgmk/src/fnct0.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-void fcomment(char* buf){
-comment=1;
-}
-
-void finclude(char* buf){
-parsex(buf);
-}
-
-void fmrtgcfg(char* buf){
-char dst[257],src[257],tmp[257];
-if(fm) fclose(fm);
-sscanf(buf,"%s %s",dst,src);
-if(strcmp(dst,src)){
- sprintf(tmp,"cp %s %s",src,dst);
- system(tmp);}
-fm=fopen(dst,"a+t");
-if(!fm) return;
-fprintf(fm,"#----------------------------------------------------------------------\n");
-}
-
-void fhtmlfile(char* buf){
-closehtml();
-fh=fopen(buf,"wt");
-mkhtmlh();
-}
-
-void fxdebug(char* buf){
-if(!strcasecmp(buf,"on")) xdebug=1;
-if(!strcasecmp(buf,"off")) xdebug=0;
-}
-
-void fcfgdir(char* buf){
-strcpy(cfgdir,buf);
-}
-
-void fnocfgdir(char* buf){
-cfgdir[0]=0;
-}
-
-void fhtmlcode0(char* buf){
-int i;
-if(!fh) return;
-for(;identl;identl--){
- for(i=1;i<identl;i++) fprintf(fh,"\t");
- fprintf(fh,"</UL>\n");}
-fprintf(fh,"%s\n",buf);
-}
-
-void fmrtgtext(char* buf){
-if(!fm) return;
-fprintf(fm,"#%s\n",buf);
-}
-
-void fbody(char* buf){
-strcpy(body,buf);
-}
-
-void fnobody(char* buf){
-body[0]=0;
-}
-
-void fbase(char* buf){
-strcpy(base,buf);
-}
-
-void fnobase(char* buf){
-base[0]=0;
-}
-
-void fexec(char* buf){
-system(buf);
-}
-
-void fmsg(char* buf){
-printf("%s\n",buf);
-}
-
-void ftitle(char* buf){
-strcpy(title,buf);
-}
-
-void fmklink(char* buf){
-char dir[257],host[65],path[257],*hosti,tmp1[257],tmp2[257],crtdir[257];
-sscanf(buf,"%s %s %s",dir,host,path);
-hosti=findhost(host);
-if(!hosti){
- fprintf(stderr,err[9],host);
- return;}
-mkdir(dir,S_IREAD | S_IWRITE | S_IEXEC);
-getcwd(crtdir,256);
-if(chdir(dir)){
- fprintf(stderr,err[10],dir);
- return;}
-/* index.html */
-sprintf(tmp1,"%s/%s.html",path,hosti);
-unlink("index.html");
-symlink(tmp1,"index.html");
-/* gifs */
-sprintf(tmp1,"%s/%s-day.gif",path,hosti);
-sprintf(tmp2,"%s-day.gif",hosti);
-unlink(tmp2);
-symlink(tmp1,tmp2);
-sprintf(tmp1,"%s/%s-week.gif",path,hosti);
-sprintf(tmp2,"%s-week.gif",hosti);
-unlink(tmp2);
-symlink(tmp1,tmp2);
-sprintf(tmp1,"%s/%s-month.gif",path,hosti);
-sprintf(tmp2,"%s-month.gif",hosti);
-unlink(tmp2);
-symlink(tmp1,tmp2);
-sprintf(tmp1,"%s/%s-year.gif",path,hosti);
-sprintf(tmp2,"%s-year.gif",hosti);
-unlink(tmp2);
-symlink(tmp1,tmp2);
-/* mrtg imgs */
-sprintf(tmp1,"%s/mrtg-l.gif",path);
-unlink("mrtg-l.gif");
-symlink(tmp1,"mrtg-l.gif");
-sprintf(tmp1,"%s/mrtg-m.gif",path);
-unlink("mrtg-m.gif");
-symlink(tmp1,"mrtg-m.gif");
-sprintf(tmp1,"%s/mrtg-r.gif",path);
-unlink("mrtg-r.gif");
-symlink(tmp1,"mrtg-r.gif");
-sprintf(tmp1,"%s/mrtg-tl.gif",path);
-unlink("mrtg-tl.gif");
-symlink(tmp1,"mrtg-tl.gif");
-chdir(crtdir);
-}
-
-void wrohtml(FILE* f,char* str,char* fcfg){
-fprintf(f,"<HTML>\n");
-fprintf(f,"<HEADER>\n");
-fprintf(f,"<TITLE>\n");
-if(title[0]) fprintf(f,"%s - %s",title,str);
-else fprintf(f,"%s - %s",btxt[0],str);
-fprintf(f,"</TITLE>\n");
-fprintf(f,"</HEADER>\n");
-if(body[0]) fprintf(f,"<BODY %s>\n",body);
-else fprintf(f,"<BODY>\n");
-fprintf(f,"<H1>%s %s %s</H1><P>\n",str,btxt[2],fcfg);
-}
-
-void wrchtml(FILE* f){
-fprintf(f,"</BODY>\n");
-fprintf(f,"</HTML>\n");
-}
-
-void fmkd(char* buf){
-char fcfg[257],fhtml[257];
-FILE* f;
-int i;
-sscanf(buf,"%s %s",fcfg,fhtml);
-for(i=0;i<nmkr[0];i++)
- if(!strcmp(mkrn[i][4],fhtml)){
- f=mkri[i][0];
- break;}
-if(i==nmkr[0]){
- f=fopen(fhtml,"wt");
- if(!f) return;
- wrohtml(f,"day",fcfg);}
-i=nmkr[0]++;
-mkri[i][0]=f;
-strcpy(mkrn[i][0],fcfg);
-strcpy(mkrn[i][4],fhtml);
-}
-
-void fmkw(char* buf){
-char fcfg[257],fhtml[257];
-FILE* f;
-int i;
-sscanf(buf,"%s %s",fcfg,fhtml);
-for(i=0;i<nmkr[1];i++)
- if(!strcmp(mkrn[i][5],fhtml)){
- f=mkri[i][1];
- break;}
-if(i==nmkr[0]){
- f=fopen(fhtml,"wt");
- if(!f) return;
- wrohtml(f,"week",fcfg);}
-i=nmkr[1]++;
-mkri[i][1]=f;
-strcpy(mkrn[i][1],fcfg);
-strcpy(mkrn[i][5],fhtml);
-}
-
-void fmkm(char* buf){
-char fcfg[257],fhtml[257];
-FILE* f;
-int i;
-sscanf(buf,"%s %s",fcfg,fhtml);
-for(i=0;i<nmkr[2];i++)
- if(!strcmp(mkrn[i][6],fhtml)){
- f=mkri[i][2];
- break;}
-if(i==nmkr[2]){
- f=fopen(fhtml,"wt");
- if(!f) return;
- wrohtml(f,"month",fcfg);}
-strcpy(mkrn[nmkr[2]++][2],fcfg);
-i=nmkr[2]++;
-mkri[i][2]=f;
-strcpy(mkrn[i][2],fcfg);
-strcpy(mkrn[i][6],fhtml);
-}
-
-void fmky(char* buf){
-char fcfg[257],fhtml[257];
-FILE* f;
-int i;
-sscanf(buf,"%s %s",fcfg,fhtml);
-for(i=0;i<nmkr[3];i++)
- if(!strcmp(mkrn[i][7],fhtml)){
- f=mkri[i][3];
- break;}
-if(i==nmkr[3]){
- f=fopen(fhtml,"wt");
- if(!f) return;
- wrohtml(f,"year",fcfg);}
-i=nmkr[3]++;
-mkri[i][3]=f;
-strcpy(mkrn[i][3],fcfg);
-strcpy(mkrn[i][7],fhtml);
-}
-
-void fhtmllink0(char* buf){
-char link[129];
-int i;
-if(!fh) return;
-for(;identl;identl--){
- for(i=1;i<identl;i++) fprintf(fh,"\t");
- fprintf(fh,"</UL>\n");}
-sscanf(buf,"%s",link);
-if(base[0]) fprintf(fh,"<A HREF=\"http://%s/%s\">",base,link);
-else fprintf(fh,"<A HREF=\"%s\">",link);
-fprintf(fh,"%s",findnsp(buf,1));
-fprintf(fh,"</A>\n");
-}
-
-void flink2dh0(char* buf){
-char host[129],*hosti;
-int i;
-if(!fh) return;
-for(;identl;identl--){
- for(i=1;i<identl;i++) fprintf(fh,"\t");
- fprintf(fh,"</UL>\n");}
-sscanf(buf,"%s",host);
-hosti=findhost(host);
-if(!hosti){
- fprintf(stderr,err[9],host);
- return;}
-if(base[0]) fprintf(fh,"<A HREF=\"http://%s/%s.html\">",base,hosti);
-else fprintf(fh,"<A HREF=\"%s.html\">",hosti);
-fprintf(fh,"%s",findnsp(buf,1));
-fprintf(fh,"</A>\n");
-}
-
-void fchngtrgname(char* buf){
-if(!strcasecmp(buf,"yes")){
- chngname=1;
- return;}
-if(!strcasecmp(buf,"no")){
- chngname=0;
- return;}
-fprintf(stderr,err[12],buf);
-}
-
-void fconvip2name(char* buf){
-conv=1;
-sscanf(buf,"%s",mrtgoutpath);
-}
-
-void fconvname2ip(char* buf){
-conv=2;
-sscanf(buf,"%s",mrtgoutpath);
-}
diff --git a/src/contrib/mrtgmk/src/fnctn.c b/src/contrib/mrtgmk/src/fnctn.c
deleted file mode 100644
index c47c89b..0000000
--- a/src/contrib/mrtgmk/src/fnctn.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-void fhtmlcoden(char* buf){
-int i;
-for(i=1;i<identl;i++)
- fprintf(fh,"\t");
-fprintf(fh,"<LI>%s</LI>\n",buf);
-}
-
-void fhtmllinkn(char* buf){
-char link[129];
-int i;
-for(i=1;i<identl;i++)
- fprintf(fh,"\t");
-sscanf(buf,"%s",link);
-if(base[0]) fprintf(fh,"<LI><A HREF=\"http://%s/%s\">",base,link);
-else fprintf(fh,"<LI><A HREF=\"%s\">",link);
-fprintf(fh,"%s",findnsp(buf,1));
-fprintf(fh,"</A></LI>\n");
-}
-
-void fdata(char* buf){
-char host[129],*text,*hosti,url[257];
-sscanf(buf,"%s",host);
-hosti=findhost(host);
-if(!hosti) return;
-text=findnsp(buf,1);
-if(base[0]) sprintf(url,"http://%s/%s",base,hosti);
-else strcpy(url,hosti);
-fprintf(fh,"<LI><A HREF=\"%s.html\">",url);
-fprintf(fh,"%s",text);
-fprintf(fh,"</A></LI>\n");
-}
-
-void flink2dhn(char* buf){
-char host[129],*hosti;
-int i;
-for(i=1;i<identl;i++)
- fprintf(fh,"\t");
-sscanf(buf,"%s",host);
-hosti=findhost(host);
-if(!hosti){
- fprintf(stderr,err[9],host);
- return;}
-if(base[0]) fprintf(fh,"<LI><A HREF=\"http://%s/%s.html\">",base,hosti);
-else fprintf(fh,"<LI><A HREF=\"%s.html\">",hosti);
-fprintf(fh,"%s",findnsp(buf,1));
-fprintf(fh,"</A></LI>\n");
-}
-
diff --git a/src/contrib/mrtgmk/src/gif.c b/src/contrib/mrtgmk/src/gif.c
deleted file mode 100644
index cea0519..0000000
--- a/src/contrib/mrtgmk/src/gif.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-void fgif(char* buf,char* ext){
-char link[129],host[129],*hosti,url[257];
-if(!fh) return;
-sscanf(buf,"%s %s",link,host);
-if(strcmp(host,"#")){ //host!=# -> search for a host definition
- hosti=findhost(host);
- if(!hosti) return;
- if(strcmp(link,"#")){
- if(base[0]) sprintf(url,"http://%s/%s",base,hosti);
- else strcpy(url,hosti);
- fprintf(fh,"<A HREF=\"%s\">",link);
- fprintf(fh,"<IMG SRC=\"%s%s\">",url,ext);}
- else{
- if(base[0]) sprintf(url,"http://%s/%s",base,hosti);
- else strcpy(url,hosti);
- fprintf(fh,"<A HREF=\"%s.html\">",url);
- fprintf(fh,"<IMG SRC=\"%s%s\">",url,ext);}
- }
-else{
- if(strcmp(link,"#")){
- if(base[0]) sprintf(url,"http://%s/%s",base,link);
- else strcpy(url,link);
- fprintf(fh,"<A HREF=\"%s.html\">",url);
- fprintf(fh,"<IMG SRC=\"%s%s\">",url,ext);}
- else{
- fprintf(stderr,"\aERROR: 0 GIF%c # #\n",toupper(ext[1]));
- return;}
- }
-fprintf(fh,"</IMG></A>\n");
-}
-
-void fgifd(char* buf){
-fgif(buf,"-day.gif");
-}
-
-void fgifw(char* buf){
-fgif(buf,"-week.gif");
-}
-
-void fgifm(char* buf){
-fgif(buf,"-month.gif");
-}
-
-void fgify(char* buf){
-fgif(buf,"-year.gif");
-}
-
diff --git a/src/contrib/mrtgmk/src/html.c b/src/contrib/mrtgmk/src/html.c
deleted file mode 100644
index 125bd73..0000000
--- a/src/contrib/mrtgmk/src/html.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-void mkhtmlh(){ /*use fh global*/
-if(!fh) return;
-fprintf(fh,"<HTML>\n");
-fprintf(fh,"<HEADER>\n");
-fprintf(fh,"<TITLE>\n");
-if(title[0]) fprintf(fh,title);
-else fprintf(fh,btxt[0]);
-fprintf(fh,"</TITLE>\n");
-fprintf(fh,"</HEADER>\n");
-if(body[0]) fprintf(fh,"<BODY %s>\n",body);
-else fprintf(fh,"<BODY>\n");
-}
-
-void closehtml(){ /*use fh global*/
-int i;
-if(!fh) return;
-for(;identl;identl--){
- for(i=1;i<identl;i++) fprintf(fh,"\t");
- fprintf(fh,"</UL>\n");}
-fprintf(fh,"</BODY>\n");
-fprintf(fh,"</HTML>\n");
-fclose(fh);
-fh=NULL;
-}
-
diff --git a/src/contrib/mrtgmk/src/mkm b/src/contrib/mrtgmk/src/mkm
deleted file mode 100755
index 82c6082..0000000
--- a/src/contrib/mrtgmk/src/mkm
+++ /dev/null
@@ -1 +0,0 @@
-gcc -o mrtgmk mrtgmk.c -Wall
diff --git a/src/contrib/mrtgmk/src/mrtgmk.c b/src/contrib/mrtgmk/src/mrtgmk.c
deleted file mode 100644
index 2b0602d..0000000
--- a/src/contrib/mrtgmk/src/mrtgmk.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "txte.h" //for english messages
-//#include "txtro.h" //pentru mesaje in romaneste
-#include "parse.c"
-
-void intro(char* aname){
-printf("\n%s (mrtgmk) %s Iulian Radu [v2.2@1.2000]\n\n",extractfname(aname),etxt[0]);
-}
-
-void help(char* aname){
-printf("%s <cfg.fname>\n",aname);
-printf(" <cfg.fname> = %s\n",etxt[3]);
-printf(" <> = %s\n",etxt[1]);
-printf(" [] = %s\n",etxt[2]);
-printf("\n");
-exit(1);
-}
-
-int main(int argc,char** argv){
-intro(argv[0]);
-if(argc!=2) help(argv[0]);
-parse(argv[1]);
-return 0;
-}
-
diff --git a/src/contrib/mrtgmk/src/parse.c b/src/contrib/mrtgmk/src/parse.c
deleted file mode 100644
index 24357cc..0000000
--- a/src/contrib/mrtgmk/src/parse.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-#include "vars.h"
-
-void parsex(char* fcfg);
-void parse(char* fcfg);
-
-#include "util.c"
-#include "parse.ftbl"
-#include "parse0.c"
-#include "parsen.c"
-
-void parsex(char* fcfg){
-char buf[513];
-FILE* f;
-f=fopen(fcfg,"rt");
-if(!f) return;
-while(!feof(f)){
- buf[0]=0; //look stupid BUT it is not
- fgets(buf,512,f);
- if(xdebug) printf("EXTREM DEBUG: %s\n",buf);
- trim(buf);
- if(!buf[0] || (buf[0]=='#')) continue;
- if(buf[0]=='0') parse0(buf+2);
- else if(isdigit(buf[0]))
- if(!comment) parsen(buf);
- }
-fclose(f);
-}
-
-void parse(char* fcfg){
-int i,j;
-parsex(fcfg);
-closehtml();
-if(fm) fclose(fm);
-/* close mk? */
-for(i=0;i<4;i++)
- for(j=0;j<nmkr[i];j++){
- if(mkri[j][i]) wrchtml(mkri[j][i]);
- mkri[j][i]=NULL;}
-system("rm -f *.ndx");
-}
-
diff --git a/src/contrib/mrtgmk/src/parse.ftbl b/src/contrib/mrtgmk/src/parse.ftbl
deleted file mode 100644
index e14b123..0000000
--- a/src/contrib/mrtgmk/src/parse.ftbl
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-typedef void (*fnct)(char* buf);
-
-struct fncttbl{
- char* cmd;
- fnct func;
- };
-
diff --git a/src/contrib/mrtgmk/src/parse0.c b/src/contrib/mrtgmk/src/parse0.c
deleted file mode 100644
index b234bf0..0000000
--- a/src/contrib/mrtgmk/src/parse0.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-#include "html.c"
-#include "defhost.c"
-#include "alias.c"
-#include "gif.c"
-#include "fnct0.c"
-#include "parse0.ftbl"
-
-void parse0(char* buf){
-char cmd[129],*ebuf;
-int i;
-ltrim(buf);
-sscanf(buf,"%s",cmd);
-if(!strcmp(cmd,parse0_ftbl[0].cmd)){
- comment=0;
- return;}
-if(comment) return;
-for(i=1;i<NEFTBL0;i++)
- if(!strcmp(cmd,parse0_ftbl[i].cmd)){
- if(parse0_ftbl[i].func){
- ebuf=buf+strlen(parse0_ftbl[i].cmd)+1;
- trim(ebuf);
- if(usealias) expand(ebuf);
- parse0_ftbl[i].func(ebuf);}
- return;}
-fprintf(stderr,"\aERROR: 0 %s\n",buf);
-}
diff --git a/src/contrib/mrtgmk/src/parse0.ftbl b/src/contrib/mrtgmk/src/parse0.ftbl
deleted file mode 100644
index a735fc0..0000000
--- a/src/contrib/mrtgmk/src/parse0.ftbl
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-struct fncttbl parse0_ftbl[]={
- {"ENDCOMMENT",NULL}, //end of comment block - need to be be 1st
- {"COMMENT",fcomment}, //1
- {"XDEBUG",fxdebug},
- {"INCLUDE",finclude},
- {"DEFHOST",fdefhost},
- {"MRTG.CFG",fmrtgcfg},
- {"HTMLFILE",fhtmlfile},
- {"CFGDIR",fcfgdir},
- {"NOCFGDIR",fnocfgdir},
- {"HTMLCODE",fhtmlcode0},
- {"MRTGTEXT",fmrtgtext}, //10
- {"TITLE",ftitle},
- {"BODY",fbody},
- {"NOBODY",fnobody},
- {"BASE",fbase},
- {"NOBASE",fnobase},
- {"EXEC",fexec},
- {"GIFD",fgifd},
- {"GIFW",fgifw},
- {"GIFM",fgifm},
- {"GIFY",fgify}, //20
- {"ALIAS",falias},
- {"DELALIAS",fdelalias},
- {"CHECK4ALIAS",fcheck4alias},
- {"MKLINK",fmklink},
- {"MKD",fmkd},
- {"MKW",fmkw},
- {"MKM",fmkm},
- {"MKY",fmky},
- {"MSG",fmsg},
- {"HTMLLINK",fhtmllink0}, //30
- {"LINK2DH",flink2dh0},
- {"CHNGTRGNAME",fchngtrgname},
- {"CONVIP2NAME",fconvip2name},
- {"CONVNAME2IP",fconvname2ip}
- };
-
-#define NEFTBL0 35
-
diff --git a/src/contrib/mrtgmk/src/parsen.c b/src/contrib/mrtgmk/src/parsen.c
deleted file mode 100644
index 889f2b0..0000000
--- a/src/contrib/mrtgmk/src/parsen.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-int ident=0;
-
-#include "fnctn.c"
-#include "parsen.ftbl"
-
-int formathtml(){ /* put UL or /UL */
-int i,j,k;
-if(ident<1){
- return 1;}
-if(!fh) return 1;
-if(!identl){
- fprintf(fh,"<UL TYPE=\"disc\">\n");
- identl++;}
-if(ident<identl){
- i=identl-ident;
- k=identl-1;
- for(;i;i--,k--){
- for(j=0;j<k;j++) fprintf(fh,"\t");
- fprintf(fh,"</UL>\n");}
- }
-if(ident>identl){
- i=ident-identl;
- k=identl;
- for(;i;i--,k++){
- for(j=0;j<k;j++) fprintf(fh,"\t");
- fprintf(fh,"<UL TYPE=\"disc\">\n");}
- }
-for(i=0;i<ident;i++) fprintf(fh,"\t");
-identl=ident;
-return 0;
-}
-
-void parsen(char* buf){
-char cmd[129],*ebuf;
-int i;
-ltrim(buf);
-sscanf(buf,"%d %s",&ident,cmd);
-for(i=0;i<NEFTBLn;i++)
- if(!strcmp(cmd,parsen_ftbl[i].cmd)){
- if(parsen_ftbl[i].func){
- ebuf=findnsp(buf,2);
- rtrim(ebuf);
- if(usealias) expand(ebuf);
- if(formathtml()){
- fprintf(stderr,"\aERROR: %s\n",ebuf);
- return;}
- parsen_ftbl[i].func(ebuf);}
- return;}
-fprintf(stderr,"\aERROR: %s\n",buf);
-}
diff --git a/src/contrib/mrtgmk/src/parsen.ftbl b/src/contrib/mrtgmk/src/parsen.ftbl
deleted file mode 100644
index 1ffdd35..0000000
--- a/src/contrib/mrtgmk/src/parsen.ftbl
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-struct fncttbl parsen_ftbl[]={
- {"HTMLCODE",fhtmlcoden},
- {"HTMLLINK",fhtmllinkn},
- {"LINK2DH",flink2dhn},
- {"DATA",fdata}
- };
-
-#define NEFTBLn 4
diff --git a/src/contrib/mrtgmk/src/txte.h b/src/contrib/mrtgmk/src/txte.h
deleted file mode 100644
index fb9731b..0000000
--- a/src/contrib/mrtgmk/src/txte.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _TXT_H_
-#define _TXT_H_
-
-char* etxt[]={
- "by",
- "needed",
- "optionally",
- "configuration file"
- };
-
-char* btxt[]={
- "Traffic analyses",
- "Traffic analysis for",
- ".gifs for hosts in the .cfg file"
- };
-
-char* err[]={
- "\aERROR: openning file %s\n",
- "\aERROR: index file %s has length 0 and I erase it\n",
- "\aERROR: was not defined a mrtg.cfg file\n",
- "\aERROR: port %s missing from %s/%s\n",
- "\aERROR: port %s missing from %s\n",
- "\aERROR: configuration file %s is missing\n",
- "\aERROR: host %s redefined\n",
- "\aERROR: alias %s redefined\n",
- "\aERROR: alias %s not precedently defined\n",
- "\aERROR: host %s not precedently defined\n",
- "\aERROR: I can't switch in directory %s\n", //10
- "\aERROR: argument for CHECK4ALIAS was %s",
- "\aERROR: argument for CHNGTRGNAME was %s"
- };
-
-#endif
- \ No newline at end of file
diff --git a/src/contrib/mrtgmk/src/txtro.h b/src/contrib/mrtgmk/src/txtro.h
deleted file mode 100644
index 27814af..0000000
--- a/src/contrib/mrtgmk/src/txtro.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _TXT_H_
-#define _TXT_H_
-
-char* etxt[]={
- "de",
- "obligatoriu",
- "optional",
- "fisierul pt. configurare"
- };
-
-char* btxt[]={
- "Analiza trafic",
- "Analiza traficului pentru",
- ".gifs pentru hosturile definite in fisierul"
- };
-
-char* err[]={
- "\aERROR: deschidere fisier %s\n",
- "\aERROR: fisierul index %s are lungime 0 si il sterg\n",
- "\aERROR: nu a fost definit un fisier mrtg.cfg\n",
- "\aERROR: portul %s lipseste din %s/%s\n",
- "\aERROR: portul %s lipseste din %s\n",
- "\aERROR: fisierul de configurare %s lipseste\n",
- "\aERROR: hostul %s redefinit\n",
- "\aERROR: alias %s redefinit\n",
- "\aERROR: nu a fost definit nici un alias %s\n",
- "\aERROR: nu a fost definit nici un host %s\n",
- "\aERROR: nu ma pot muta in directorul %s\n", //10
- "\aERROR: argumentul pentru CHECK4ALIAS a fost %s",
- "\aERROR: argumentul pentru CHNGTRGNAME a fost %s"
- };
-
-#endif
- \ No newline at end of file
diff --git a/src/contrib/mrtgmk/src/util.c b/src/contrib/mrtgmk/src/util.c
deleted file mode 100644
index ec2de79..0000000
--- a/src/contrib/mrtgmk/src/util.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Iulian Radu [v2.0@07.1999]
-*/
-
-char* extractfname(char* fname){
-char* cptmp;
-cptmp=fname+strlen(fname)-1;
-while((cptmp>=fname) && (cptmp[0]!='/')) cptmp--;
-return cptmp+1;
-}
-
-void ltrim(char* buf){
-char* tmp;
-for(tmp=buf;tmp[0] && isspace(tmp[0]);tmp++);
-strcpy(buf,tmp);
-}
-
-void rtrim(char* buf){
-char* tmp;
-for(tmp=buf-1;buf[0];buf++)
- if(!isspace(buf[0])) tmp=buf;
-tmp[1]=0;
-}
-
-void trim(char*buf){
-ltrim(buf);
-rtrim(buf);
-}
-
-char* findnsp(char* str,int n){ /*unde incepe cuvintul de dupa al n-lea spatiu*/
-while(str[0] && n)
- if(isspace(str[0])){
- n--;
- for(;str[0] && isspace(str[0]);str++);
- }
- else str++;
-return str;
-}
-
-char* findnc(char* str,int n,char ch){ /*gaseste al n-lea ch*/
-for(;str[0] && n;str++)
- if(str[0]==ch) n--;
-return str;
-}
-
-void killnl(char* buf){
-for(;buf[0];buf++){
- if(buf[0]=='\n'){
- buf[0]=0;
- return;}
- if(buf[0]=='\r'){
- buf[0]=0;
- return;}
- }
-}
diff --git a/src/contrib/mrtgmk/src/vars.h b/src/contrib/mrtgmk/src/vars.h
deleted file mode 100644
index 64c620b..0000000
--- a/src/contrib/mrtgmk/src/vars.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef _VARS_H_
-#define _VARS_H_
-
-FILE *fh=NULL,*fm=NULL; //html and mrtg files
-int xdebug=0; //say if produce extreme debug
-int comment=0; //say if inside of a comment block
-char cfgdir[257]=""; //path of the cfg file
-
-#define N_HOSTS 4096
-int nhosts=0; //# of defined states
-char hostsn[N_HOSTS][65]; //host name
-char hostsi[N_HOSTS][33]; //host definition as interface
-
-int identl=0;
-char body[257]=""; //code appended to body tag
-char base[257]=""; //base for html files
-
-#define N_ALIAS 128
-int nalias=0; //# of defined aliases
-char aliasn[N_ALIAS][33]; //name of the aliases and their contents
-char aliasi[N_ALIAS][129]; //name of the interfaces and their resolv
-
-int usealias=0; //say if is allowed to use aliases
-int chngname=0; //say if change the name of the output files
-int conv=0; //say if change or not the name of the files
-
-char title[65]; //title of the html page
-
-#define N_MK 128
-int nmkr[4]={ 0, //# of files procesed for mkd
- 0, //# of files procesed for mkw
- 0, //# of files procesed for mkm
- 0}; //# of files procesed for mky
-char mkrn[N_MK][8][257]; //0=name of the cfg procesed for mkd
- //1=name of the cfg procesed for mkw
- //2=name of the cfg procesed for mkm
- //3=name of the cfg procesed for mky
- //4=name of the router procesed for mkd
- //5=name of the router procesed for mkw
- //6=name of the router procesed for mkm
- //7=name of the router procesed for mky
-
-FILE* mkri[N_MK][4]; //0=FILE* for mkd
- //1=FILE* for mkw
- //2=FILE* for mkm
- //3=FILE* for mky
-
-char mrtgoutpath[256]; //used be convname2ip and convip2name
-
-#endif
diff --git a/src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz b/src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz
deleted file mode 100644
index b164ed4..0000000
--- a/src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz
+++ /dev/null
Binary files differ
diff --git a/src/contrib/mrtgrq/README b/src/contrib/mrtgrq/README
deleted file mode 100644
index 8d659a9..0000000
--- a/src/contrib/mrtgrq/README
+++ /dev/null
@@ -1,142 +0,0 @@
-PREREQUISITES:
- - Linux operating system ( I am using RedHat 6.2 );
- - MRTG version ( I used 2.8.8 version );
- - SHELL scripting language;
- - PERL with Net::Telnet module (the last version of this module
- you could find at http://search.cpan.org/search?module=Net::Telnet );
- - AWK scripting language;
- - TELNET client;
- - CRON daemon installed;
- - TCP/IP Network connection {:-)
-
-INSTALLATION
-
- This script was inspired from diskmon utility in contib section
- of MRTG application. Basically it is working in the same way
- with diskmon, but the diference (it has to be) is the following:
- - it is not launched normally from your old MRTG, it is launched
- separatelly by cron daemon
-
- You need MRTG host machine and you could have any clients you want.
- On the client machine (let say for example MailServer) you need to
- configure in inetd.conf one more service, like this:
-
-############################
-# /etc/inetd.conf -rw-r--r--
-#
-
-mrtgrq stream tcp nowait root /usr/sbin/tcpd /usr/sbin/mrtgrq
-
-#
-# EOF
-############################
-
- The 'mrtgrq' is a script file which use the repquota utility
- for partitioned disks using quotation mark.
- I am using the following 'mrtgrq' script for reading each
- qmail-user used space:
-
-#!/bin/sh
-
-/usr/sbin/repquota -vua | /bin/egrep -v '(\*|Block|User|root|bin|daemon|news|uucp|games|ftp|squid|named|postgres|gdm|nobody|xfs|alias|qmail|admin)' | sort -k1
-
-exit 0
-
- As you can see, I cut off from reports informations for other normal user
- not involved in qmail transactions (see egrep).
-
- Of course you need to declare in your services file the new tcp service
- called mrtgrq, like this:
-
-##########################
-# /etc/services -rw-r--r--
-#
-
-mrtgrq 9000/tcp # MRTG Repquota service
-
-#
-# EOF
-############################
-
- You may use a different free port number you want, but you have
- to keep in mind this, because you'll need it on MRTG machine.
-
- For client everything is almost done, just kill -HUP the inetd
- daemon. You may wish to test if everything it's fine on
- the client side, for this just isue the following
- command:
-
- telnet <your.client.name_or_ip> 9000
-
- You should see the result from the repquota utility.
-
- The MRTG side is following:
-
-mrtgrq
-
- I use this script to monitor the disk-space used by e-mail users
- on MailServer ( I am using Qmail ). Usage is very simple:
-
- - Put in your crontab file a line which have to be run
- every ten (10) minute or any other time interval you want
- (but you have to edit, according with this new value,
- 'make-mrtg.cfg.awk' file). I am using Linux RedHat 6.2
- and in my /etc/cron.d I put a file named 'net-hosts' with
- the following structure:
-
-##################################
-# /etc/cron.d/net-hosts -rw-r--r--
-#
-
-*/10 * * * * root /usr/local/mrtg/contrib/mrtgrq/mrtgrq
-
-#
-# EOF
-##################################
-
- - Restart your cron daemon... and wait
-
- To install, first edit the variables from both 'make-mrtg.cfg.awk'
- and 'mrtgrq' files as needed. I found it easier to have these defined
- rather than hardcoded due to differences between code interpretations.
-
- You don't have to insert any other target in your own mrtg.cfg
- file that you already have, because this script is launched by
- the cron daemon.
-
-
-
-
-make-mrtg.cfg.awk
-
- This is the core of the entire task. Here I make 'mrtg-awk.cfg'
- file using the output of 'getreport.pl' from a temporary
- file 'mrtgrq-temp.tmp' which finally will be erased.
- After doing this, internaly is lauched 'mrtg' executable
- for mrtgrq's mrtg.cfg file (named 'mrtg-awk.cfg').
- You could use 'indexmaker' script provided with MRTG
- for doing an index.html file (see an example in 'mrtgrq').
-
- Be aware ! You have to place icons (MRTG) and image files
- (grnball.gif, redball.gif, cubprev.gif) in the same
- location. You also have to place 'mrtgrq.css' into declared
- location inside that AWK script file.
-
-getreport.pl
-
- This script in Perl requires Net::Telnet module instaled.
- Its only task is to read the client on port 9000 (or other
- you want) and print this output.
- This output is redirected into a temporary file which
- will be the input for the AWK script.
-
-----------
-
- Direct questions or suggestions to me.
-
- Have fun!
-
- -Adrian Turcu <adrianturcu@yahoo.com>
-
-
-
diff --git a/src/contrib/mrtgrq/cubprev.gif b/src/contrib/mrtgrq/cubprev.gif
deleted file mode 100644
index d6f3d0f..0000000
--- a/src/contrib/mrtgrq/cubprev.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/mrtgrq/getreport.pl b/src/contrib/mrtgrq/getreport.pl
deleted file mode 100755
index 39214df..0000000
--- a/src/contrib/mrtgrq/getreport.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl
-# This script is used to establish a TCP connection with a host to get the
-# report of disk-space quota provided by repquota utility.
-#
-# use: ./getreport.pl <hostname> <port number>
-#
-# By Steven Micallef <smic@wire.net.au> on the 24/4/1999.
-# Modified by Adrian Turcu <adrianturcu@yahoo.com> on 18/9/2000.
-
-use Net::Telnet ();
-
-$hostname = $ARGV[0];
-$port = $ARGV[1];
-
-# If you've changed the port showdisk.pl runs on, change it here too.
-#$port = 9047;
-
-$i = 0;
-
-if ($hostname eq "" || $port eq "" )
-{
- print "Usage: $0 <hostname> <port number>\n";
- exit;
-}
-
-$t = new Net::Telnet ( Host => $hostname, Port => $port);
-$t->open("$hostname");
-
-do
-{
- $data = $t->getline(Timeout => 40);
- print $data;
-} while ( $data );
diff --git a/src/contrib/mrtgrq/grnball.gif b/src/contrib/mrtgrq/grnball.gif
deleted file mode 100644
index 5f7740b..0000000
--- a/src/contrib/mrtgrq/grnball.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/mrtgrq/make-mrtg.cfg.awk b/src/contrib/mrtgrq/make-mrtg.cfg.awk
deleted file mode 100644
index 3628e3d..0000000
--- a/src/contrib/mrtgrq/make-mrtg.cfg.awk
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN {
-#
-# Global Variables Initialization
- mrtg_var_WorkDir = "/home/httpd/html/mrtg/mrtgrq" # it will be inserted into MRTG config file
- mrtg_var_IconDir = "/img/" # it will be inserted into MRTG config file and it will be used on HTML documents
- mrtg_var_Interval = "10" # it will be inserted into MRTG config file
- mrtg_executable = "/usr/local/mrtg/mrtg" # MRTG executable file with full path
- mrtg_mrtgrq_cfg = "/usr/local/mrtg/contrib/mrtgrq/mrtg-awk.cfg" # MRTG config file for mrtgrq
- mrtgrq_css_file = "http://your.web.server/css/mrtg/mrtg.css" # CSS File definition for HTML documents
- mrtgrq_maintainer_email = "Your Name &lt;your@email.address&gt;" # Maintainer email address
-#
-# Start index number for array
- lines = 1
- startdate = systime()
- dataexpirarii = startdate+(mrtg_var_Interval*60) # Expire date for HTML documents, +5 min (mrtg_var_Interval)
- dataexp = strftime("%c %Z", dataexpirarii)
- dataexpirarii = strftime("%d-%m-%Y %T %Z",dataexpirarii)
-}
-
-{
- if ( $1 !~ /^Try/ && $1 !~ /^Conn/ && $1 !~ /^Escape/){
- array[lines, 1] = $1
- array[lines, 3] = $3
- array[lines, 4] = $4
- lines++
- }
-}
-
-END{
-#
- print ("WorkDir: " mrtg_var_WorkDir) > mrtg_mrtgrq_cfg
- print ("IconDir: " mrtg_var_IconDir) > mrtg_mrtgrq_cfg
- print ("Interval: " mrtg_var_Interval) > mrtg_mrtgrq_cfg
- print "\n\n#----------------------------------------------------------------------------\n\n" > mrtg_mrtgrq_cfg
-#
-##
-#
- for ( k = 1; k < lines; k++ ){
-# print array[k, 1]"\t"array[k, 3]"\t"array[k, 4] > mrtg_mrtgrq_cfg
- print ("Target[" array[k, 1] "]: `echo | awk '{ print \"" array[k, 3]"\\n" array[k, 4]"\\n..., last check on: " strftime("%c %Z", startdate) "\\n" array[k, 1] "@cfrcta.ro\\n\"; exit }'`") > mrtg_mrtgrq_cfg
- print ("Title[" array[k, 1] "]: Diskspace Quota Report For " array[k, 1] "@cfrcta.ro") > mrtg_mrtgrq_cfg
- print ("MaxBytes[" array[k, 1] "]: " array[k, 4]) > mrtg_mrtgrq_cfg
- print ("AbsMax[" array[k, 1] "]: " int(array[k, 4]*1.1)) > mrtg_mrtgrq_cfg
- print ("AddHead[" array[k, 1] "]: <link rel=\"STYLESHEET\" type=\"text/css\" href=\"" mrtgrq_css_file "\">") > mrtg_mrtgrq_cfg
- print ("PageTop[" array[k, 1] "]: <H1 CLASS=\"h1\"><A HREF=\"javascript:history.back();\"><IMG SRC=\"" mrtg_var_IconDir "cubprev.gif\" BORDER=\"0\"></A> Diskspace Quota Report For &nbsp;&nbsp;&nbsp;<CODE><B>" array[k, 1] "@cfrcta.ro</B></CODE>") > mrtg_mrtgrq_cfg
- print (" </H1>") > mrtg_mrtgrq_cfg
- print (" <TABLE>") > mrtg_mrtgrq_cfg
- print (" <TR><TD CLASS=\"ptb\">Service:</TD><TD CLASS=\"pth\"><B>Diskspace Quota</B></TD></TR>") > mrtg_mrtgrq_cfg
- print (" <TR><TD CLASS=\"ptb\">Maintainer:</TD><TD CLASS=\"pth\"><B>" mrtgrq_maintainer_email "</B></TD></TR>") > mrtg_mrtgrq_cfg
- print (" <TR><TD CLASS=\"ptb\">Last Checked On:</TD><TD CLASS=\"pth\"><B>" strftime("%c %Z", startdate) "</B></TD></TR>") > mrtg_mrtgrq_cfg
- print (" </TABLE>") > mrtg_mrtgrq_cfg
- print ("Supress[" array[k, 1] "]: y") > mrtg_mrtgrq_cfg
- print ("LegendI[" array[k, 1] "]: used") > mrtg_mrtgrq_cfg
- print ("LegendO[" array[k, 1] "]: ") > mrtg_mrtgrq_cfg
- print ("Legend1[" array[k, 1] "]: used ") > mrtg_mrtgrq_cfg
- print ("Legend2[" array[k, 1] "]: ") > mrtg_mrtgrq_cfg
- print ("YLegend[" array[k, 1] "]: used ") > mrtg_mrtgrq_cfg
- print ("ShortLegend[" array[k, 1] "]: used ") > mrtg_mrtgrq_cfg
- print ("Options[" array[k, 1] "]: gauge") > mrtg_mrtgrq_cfg
- print ("\n\n#-------------------\n\n") > mrtg_mrtgrq_cfg
- }
-#
-##
-#
- system((mrtg_executable " " mrtg_mrtgrq_cfg " 2> /dev/null"))
-#
-##
-#
-}
diff --git a/src/contrib/mrtgrq/mrtgrq b/src/contrib/mrtgrq/mrtgrq
deleted file mode 100755
index 14c69f7..0000000
--- a/src/contrib/mrtgrq/mrtgrq
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-##
-## OUTPUT_FILE has to have the same path with WorkDir value setted in the make-mrtg.cfg.awk file
-## MRTGRQ_CFG has to be the same file declared in the make-mrtg.cfg.awk file
-## AWK_EXE is awk executable with full path
-## MRTGRQ_AWK_FILE is the AWK file which will generate the config file in MRTG format ( core )
-##
-AWK_EXE="/bin/awk"
-MRTGRQ_AWK_FILE="/usr/local/mrtg/contrib/mrtgrq/make-mrtg.cfg.awk"
-MRTGRQ_PATH="/usr/local/mrtg/contrib/mrtgrq"
-MRTGRQ_CONFIG="/usr/local/mrtg/contrib/mrtgrq/mrtg-awk.cfg"
-MRTGRQ_TEMP="/usr/local/mrtg/contrib/mrtgrq/mrtgrq-temp.tmp"
-MRTGRQ_TELNET_HOST="your.email.server"
-MRTGRQ_TELNET_PORT="9000"
-##
-rm -f $MRTGRQ_CONFIG
-$MRTGRQ_PATH/getreport.pl $MRTGRQ_TELNET_HOST $MRTGRQ_TELNET_PORT > $MRTGRQ_TEMP
-/bin/cat $MRTGRQ_TEMP | $AWK_EXE -f $MRTGRQ_AWK_FILE
-rm -f $MRTGRQ_TEMP
-##
-##
-#####################################################################################################
-## Index Maker in MRTG Style
-############################
-#
-# OUTPUT_FILE="/home/httpd/html/mrtg/mrtgrq/index.html"
-# MRTGRQ_CFG="/usr/local/mrtg/contrib/mrtgrq/mrtg-awk.cfg"
-# export OUTPUT_FILE MRTGRQ_CFG
-#
-# /usr/local/mrtg/indexmaker -b '#ffffff' -1 -t 'Diskspace Quota' -o $OUTPUT_FILE $MRTGRQ_CFG
-#
-######################################################################################################
-
diff --git a/src/contrib/mrtgrq/mrtgrq.css b/src/contrib/mrtgrq/mrtgrq.css
deleted file mode 100644
index 2f080d5..0000000
--- a/src/contrib/mrtgrq/mrtgrq.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Author: Adrian Turcu <adrianturcu@yahoo.com>
- Created: 16 April 2000
- Version: 1
-*/
-
-BODY {
- background-color: f5fffa;
-}
-A {
- text-decoration: none;
-}
-A:link {
- color: 0000cd;
-}
-A:visited {
- color: 0000cd;
-}
-A:active {
- color: 0000cd;
-}
-
-
-H1 {white-space: nowrap; border: none; padding: 0.5em; margin-top: 25px; position: relative;}
-H1 A {text-decoration: none;}
-
-H1, H1 A {color: #f8f8ff; background: #4169e1;}
-
-.pt { border: none; padding: 0.25em; width: 1020px; text-align: center; font-weight: 800;}
-.pt, .pt A {text-decoration: none; color: #f8f8ff; background: #0000cd;}
-
-.ptl { border: none; padding: 0.25em; width: 1020px; text-align: left; font-weight: 800;}
-.ptl, .ptl A {text-decoration: none; color: #f8f8ff; background: #0000cd;}
-
-.pth { border: none;text-decoration: none; background: #e8e8ff; color: #111111; text-align: left; font-weight: 800;}
-.ptb { border: none;text-decoration: none; color: #0000cd; text-align: left; font-weight: 800;}
diff --git a/src/contrib/mrtgrq/redball.gif b/src/contrib/mrtgrq/redball.gif
deleted file mode 100644
index 7005133..0000000
--- a/src/contrib/mrtgrq/redball.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/net-hosts/README b/src/contrib/net-hosts/README
deleted file mode 100644
index 5574d94..0000000
--- a/src/contrib/net-hosts/README
+++ /dev/null
@@ -1,108 +0,0 @@
-PREREQUISITES:
- - Linux operating system ( I am using RedHat 6.2 );
- - MRTG version ( I used 2.8.8 version );
- - SHELL scripting language;
- - AWK scripting language;
- - FPING utility ( I used 2.2b1 );
- - CRON daemon installed;
- - TCP/IP Network connection {:-)
-
-net-hosts
-
- I use this script to monitor internet connection state
- on a chosen route (from traceroute). Usage is very simple:
-
- - Put in your crontab file a line which have to be run
- every five (5) minute or any other time interval you want
- (but you have to edit, according with this new value,
- 'make-mrtg.cfg.awk' file). I am using Linux RedHat 6.2
- and in my /etc/cron.d I put a file named 'net-hosts' with
- the following structure:
-
-##################################
-# /etc/cron.d/net-hosts -rw-r--r--
-#
-
-*/05 * * * * root /usr/local/mrtg/contrib/net-hosts/net-hosts
-
-#
-# EOF
-##################################
-
- - Restart your cron daemon... and wait
-
- To install, first edit the variables from both 'make-mrtg.cfg.awk'
- and 'net-hosts files' as needed. I found it easier to have these defined
- rather than hardcoded due to differences between code interpretations.
-
- You don't have to insert any other target in your own mrtg.cfg
- file that you already have, because this script is launced by
- the cron daemon.
-
-
-
-internet
-
- This is the file which keep the IPs, FQDNs, dates and states
- for hosts you want to monitor. The format of this file is:
-
- <IP_1>:<FQDN_1>:<LAST-MODIFIED_1>:<STATE_1>
- <IP_2>:<FQDN_2>:<LAST-MODIFIED_2>:<STATE_2>
- <IP_3>:<FQDN_3>:<LAST-MODIFIED_3>:<STATE_3>
- .
- .
- .
-
- where:
- - IP_xxx is IP address (IPv4) for host xxx
- - FQDN_xxx is Fully Qualified Domain Name of host xxx
- - LAST-MODIFIED_1 is the date when the state of host xxx was last modified
- - STATE_1 is the current state of host xxx (1 = UP; 0 = DOWN)
-
- First time you create this file you just need IPs and FQDNs,
- blank dates and 1 (or 0) for the state of every hosts, like this:
-
- aaa.aaa.aaa.aaa:your.router.name::1
- bbb.bbb.bbb.bbb:yourISP.router.name::1
- .
- .
- .
- zzz.zzz.zzz.zzz:that.host.name::1
-
- HINT: You could have an ordered list using traceroute and
- awk (or any other shell-script).
-
- The file 'internet' shipped with this package it is
- a demo.
-
-
-
-
-make-mrtg.cfg.awk
-
- This is the core of the entire task. Here I make 'mrtg-awk.cfg'
- file using the content of 'internet' file and the state read
- from fping utility (Fast Ping - it was not written by me...).
- After doing this, internaly is lauched 'mrtg' executable
- for net-hosts's mrtg.cfg file (named 'mrtg-awk.cfg').
- Of course, it is created a file, 'internet.html', used
- like an index file for the all targets in 'mrtg-awk.cfg',
- but you could use 'indexmaker' script provided with MRTG
- for doing this (see an example in 'net-hosts').
-
- Be aware ! You have to place icons (MRTG) and image files
- (grnball.gif, redball.gif, cubprev.gif) in the same
- location. You also have to place 'net-hosts.css' into declared
- location inside that AWK script file.
-
-
-----------
-
- Direct questions or suggestions to me.
-
- Have fun!
-
- -Adrian Turcu <adrianturcu@yahoo.com>
-
-
-
diff --git a/src/contrib/net-hosts/cubprev.gif b/src/contrib/net-hosts/cubprev.gif
deleted file mode 100644
index d6f3d0f..0000000
--- a/src/contrib/net-hosts/cubprev.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/net-hosts/grnball.gif b/src/contrib/net-hosts/grnball.gif
deleted file mode 100644
index 5f7740b..0000000
--- a/src/contrib/net-hosts/grnball.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/net-hosts/internet b/src/contrib/net-hosts/internet
deleted file mode 100644
index 0cb7a1d..0000000
--- a/src/contrib/net-hosts/internet
+++ /dev/null
@@ -1,29 +0,0 @@
-212.93.136.193:eth1-sub2-HFC-H1A-10M.rds-cons.rdsct.ro:969099666:1
-212.93.136.130:10Me0-Ct-E1-Buc.noc-ct.rdsct.ro:969099666:1
-212.93.152.1:212.93.152.1:969099666:1
-193.231.227.182:bucharest-bb3-fe2-0.rdsnet.ro:969106997:1
-195.158.251.1:robuc101-ta-f0-0.ebone.net:969099666:1
-213.174.70.62:atvie103-ta-s1-0.ebone.net:969099666:1
-195.158.245.9:atvie101-tc-p0-0.ebone.net:969099666:1
-195.158.242.45:czpra103-tc-p2-0.ebone.net:969106395:1
-213.174.70.45:debln302-tc-p2-0.ebone.net:969099666:1
-213.174.70.37:debln301-tc-p1-0.ebone.net:969099666:1
-213.174.70.41:dedus206-tc-p6-0.ebone.net:969099666:1
-213.174.70.125:dedus205-tc-p7-0.ebone.net:969099666:1
-213.174.70.134:nlams303-tc-p2-0.ebone.net:969099666:1
-195.158.225.85:bebru203-tc-p1-0.ebone.net:969106997:1
-195.158.225.82:bebru204-tc-p2-0.ebone.net:969099666:1
-195.158.232.41:gblon505-tc-p1-0.ebone.net:969099666:1
-195.158.229.21:usnyk106-tc-p1-0.ebone.net:969099666:1
-4.24.187.49:p6-0.nycmny1-cr8.bbnplanet.net:969099666:1
-4.24.8.93:p7-1.nycmny1-ba2.bbnplanet.net:969099666:1
-4.24.6.233:p7-0.nycmny1-br2.bbnplanet.net:969099666:1
-4.24.9.65:so-4-0-0.chcgil2-br1.bbnplanet.net:969099666:1
-4.24.9.70:p6-0.chcgil1-br1.bbnplanet.net:969099666:1
-4.0.2.226:p5-0.lsanca1-br2.bbnplanet.net:969099666:1
-4.24.4.13:p2-0.lsanca1-br1.bbnplanet.net:969099666:1
-4.24.4.1:p7-0.lsanca1-ba1.bbnplanet.net:969099666:1
-4.24.4.18:p0-0-0.lsanca1-cr3.bbnplanet.net:969106997:1
-4.24.40.14:s0.uscisi.bbnplanet.net:969106997:1
-198.32.16.49:dmz-isi.isi.edu:969099666:1
-128.9.0.107:b.root-servers.net:969099666:1
diff --git a/src/contrib/net-hosts/make-mrtg.cfg.awk b/src/contrib/net-hosts/make-mrtg.cfg.awk
deleted file mode 100644
index e0e75bd..0000000
--- a/src/contrib/net-hosts/make-mrtg.cfg.awk
+++ /dev/null
@@ -1,205 +0,0 @@
-
-BEGIN {
-#
-## Global Variables Initialization (Feel you free to edit as needed)
-#
-#
- mrtg_var_WorkDir = "/usr/local/mrtg/contrib/net-hosts" # it will be inserted into MRTG config file
- mrtg_var_IconDir = "http://www.your.domain/img/" # it will be inserted into MRTG config file and it will be used on HTML documents
- mrtg_var_Interval = "5" # it will be inserted into MRTG config file
- mrtg_executable = "/usr/local/mrtg/mrtg" # MRTG executable file with full path
- mrtg_nethosts_cfg = "/usr/local/mrtg/contrib/net-hosts/mrtg-awk.cfg" # MRTG config file for net-hosts
- nethosts_internet_path = "/usr/local/mrtg/contrib/net-hosts" # the path for internet IPs file (without / at the end)
- nethosts_css_file = "http://www.your.domain/css/mrtg/net-hosts.css" # CSS File definition for HTML documents
- nethosts_maintainer_email = "Your Name &lt;your@email.address&gt;" # Maintainer email address
-#
-## Start index number for array
-#
- lines = 1
- startdate = systime()
- dataexpirarii = startdate+300 # Expire date for HTML documents, +5 min (mrtg_var_Interval)
- dataexp = strftime("%c %Z", dataexpirarii)
- dataexpirarii = strftime("%d-%m-%Y %T %Z",dataexpirarii)
- system((">" mrtg_nethosts_cfg))
-}
-
-{
-#
-# The state from fping for every IP is inserted into array
- state=$2$3
- ip=$1
- array[lines,1] = ip
- array[lines,2] = state
- lines++
-}
-
-END {
- close(FILENAME)
-#
-## Variables Definition
-#
- header="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"> \
-<HTML> \
-<HEAD> \
-<META HTTP-EQUIV=\"Refresh\" CONTENT=\"300\"> \
-<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"> \
-<META HTTP-EQUIV=\"Expires\" CONTENT=\""dataexp"\"> \
-<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\"> \
-<link rel=\"STYLESHEET\" type=\"text/css\" href=\"" nethosts_css_file "\"> \
-<TITLE>Internet Conection Statistics Overview</TITLE> \
-</HEAD> \
-<BODY> \
-<H1 CLASS=\"h1\"><A HREF=\"javascript:history.back();\">Main Index</A> +++ Internet Conection Statistics Overview</H1>"
- footer="<BR></BODY></HTML>"
-#
- lastmod=("<CENTER><SMALL>Last modified: <FONT STYLE=\"color: darkblue;\">" strftime("%d-%m-%Y %T %Z",startdate) "</FONT>.</SMALL></CENTER>")
- expire="<CENTER><SMALL>Expire on: <FONT STYLE=\"color: darkblue;\">"dataexpirarii"</FONT>.</SMALL></CENTER>"
-#
- tablestart="<TABLE BORDER=0 WIDTH=\"100%\"> \
-<TR> \
-<TH CLASS=\"pth\">Index</TH> \
-<TH CLASS=\"pth\">Name</TH> \
-<TH CLASS=\"pth\">IP</TH> \
-<TH CLASS=\"pth\">Status</TH> \
-<TH CLASS=\"pth\">Last Changed On</TH> \
-</TR>"
- tableend="</table><BR>"
-#
- startraw="<TR>"
- endrow="</TR>"
-#
- startcell="<TD CLASS=\"ptb\">"
- endcell="</TD>"
-#
- startlongcell="<TD CLASS=\"ptb\" COLSPAN=\"5\">"
-#
- imgdown=("<IMG SRC=\"" mrtg_var_IconDir "redball.gif\">")
- imgup=("<IMG SRC=\"" mrtg_var_IconDir "grnball.gif\">")
-#
- pstart="<P CLASS=\"ptb\">"
- pend="</P>"
-#
-##
-#
- print header > (mrtg_var_WorkDir "/internet.html")
- print tablestart >> (mrtg_var_WorkDir "/internet.html")
-#
-#
- print ("WorkDir: " mrtg_var_WorkDir) > mrtg_nethosts_cfg
- print ("IconDir: " mrtg_var_IconDir) > mrtg_nethosts_cfg
- print ("Interval: " mrtg_var_Interval) > mrtg_nethosts_cfg
- print "\n\n#----------------------------------------------------------------------------\n\n" > mrtg_nethosts_cfg
-#
-##
-#
- xx = 1
- kontor = 0
- succesiv = "0"
-#
-## Fping results processing
-#
- while ((getline line < (nethosts_internet_path "/internet")) > 0 ){
- split(line, l, ":")
- for ( i = 1 ; i < lines; i++ ){
- if ( array[i, 1] == l[1] ){
- break
- }
- }
- if ( l[4] == 1 ){
- last_state = "isalive"
- }
- else {
- last_state = "isdad"
- }
- myfun(xx, i, l[2], l[3], last_state)
- i++
- xx++
- }
- close((nethosts_internet_path "/internet"))
-#
-##
-#
- print tableend >> (mrtg_var_WorkDir "/internet.html")
- print lastmod >> (mrtg_var_WorkDir "/internet.html")
- print expire >> (mrtg_var_WorkDir "/internet.html")
- print footer >> (mrtg_var_WorkDir "/internet.html")
-#
-##
-#
- system(("mv -f " nethosts_internet_path "/tmpinternet " nethosts_internet_path "/internet"))
- system((mrtg_executable " " mrtg_nethosts_cfg " 2> /dev/null"))
-}
-
-
-function myfun(f_rindex, f_index, f_name, f_olddate, f_last_state)
-{
- if( ! f_olddate ){
- f_olddate = startdate
- }
-#
- if(array[f_index, 2] == "isalive"){
- statew = 1
- succesiv = "0"
- kontor = 0
- if ( f_last_state == array[f_index, 2] ) {
- datew = f_olddate
- }
- else {
- datew = startdate
- }
- print array[f_index, 1]":"f_name":"datew":"statew > (nethosts_internet_path "/tmpinternet")
- print startrow startcell f_rindex endcell > (mrtg_var_WorkDir "/internet.html")
- print (startcell "<A HREF=\"" tolower(f_name) ".html\">" f_name "</A>" endcell) > (mrtg_var_WorkDir "/internet.html")
- print startcell array[f_index, 1] endcell > (mrtg_var_WorkDir "/internet.html")
- print startcell imgup endcell > (mrtg_var_WorkDir "/internet.html")
- print startcell strftime("%c %Z", datew) endcell > (mrtg_var_WorkDir "/internet.html")
- print endrow > (mrtg_var_WorkDir "/internet.html")
- print "Target[" f_name "]: `echo | awk '{ print \"1\\n1\\n..., last changed on: " strftime("%c %Z", datew) "\\n" array[f_index, 1] "\\n\"; exit }'`" > mrtg_nethosts_cfg
- }
- else {
- statew = 0
- if( succesiv == "0" ){
- succesiv = "1"
- }
- kontor++
- if ( f_last_state == array[f_index, 2] ) {
- datew = f_olddate
- }
- else {
- datew = startdate
- }
- print array[f_index, 1]":"f_name":"datew":"statew > (nethosts_internet_path "/tmpinternet")
- print startrow startcell f_rindex endcell > (mrtg_var_WorkDir "/internet.html")
- print (startcell "<A HREF=\"" tolower(f_name) ".html\">" f_name "</A>" endcell) > (mrtg_var_WorkDir "/internet.html")
- print startcell array[f_index, 1] endcell > (mrtg_var_WorkDir "/internet.html")
- print startcell imgdown endcell > (mrtg_var_WorkDir "/internet.html")
- print startcell strftime("%c %Z", datew) endcell > (mrtg_var_WorkDir "/internet.html")
- print endrow > (mrtg_var_WorkDir "/internet.html")
- print "Target[" f_name "]: `echo | awk '{ print \"0\\n0\\n..., last changed on: " strftime("%c %Z", datew) "\\n" array[f_index, 1] "\\n\"; exit }'`" > mrtg_nethosts_cfg
- }
- print "Title[" f_name "]: " f_name > mrtg_nethosts_cfg
- print "MaxBytes[" f_name "]: 1" > mrtg_nethosts_cfg
- print "AbsMax[" f_name "]: 1" > mrtg_nethosts_cfg
- print ("AddHead[" f_name "]: <link rel=\"STYLESHEET\" type=\"text/css\" href=\"" nethosts_css_file "\">") > mrtg_nethosts_cfg
- print ("PageTop[" f_name "]: <H1 CLASS=\"h1\"><A HREF=\"javascript:history.back();\"><IMG SRC=\"" mrtg_var_IconDir "cubprev.gif\" BORDER=\"0\"></A> Connection State for&nbsp;&nbsp;&nbsp;<CODE><B>" f_name "</B></CODE>") > mrtg_nethosts_cfg
- print " </H1>" > mrtg_nethosts_cfg
- print " <TABLE>" > mrtg_nethosts_cfg
- print " <TR><TD CLASS=\"ptb\">System:</TD><TD CLASS=\"pth\"><B>" f_name " (" array[f_index, 1] ")</B></TD></TR>" > mrtg_nethosts_cfg
- print (" <TR><TD CLASS=\"ptb\">Maintainer:</TD><TD CLASS=\"pth\"><B>" nethosts_maintainer_email "</B></TD></TR>") > mrtg_nethosts_cfg
- print " <TR><TD CLASS=\"ptb\">Service:</TD><TD CLASS=\"pth\"><B>Internet Connection</B></TD></TR>" > mrtg_nethosts_cfg
- print " <TR><TD CLASS=\"ptb\">IP:</TD><TD CLASS=\"pth\"><B>" f_name " (" array[f_index, 1] ")</B></TD></TR>" > mrtg_nethosts_cfg
- print " <TR><TD CLASS=\"ptb\">Last Changed On:</TD><TD CLASS=\"pth\"><B>" strftime("%c %Z", datew) "</B></TD></TR>" > mrtg_nethosts_cfg
- print " </TABLE>" > mrtg_nethosts_cfg
- print "Supress[" f_name "]: y" > mrtg_nethosts_cfg
- print "LegendI[" f_name "]: used" > mrtg_nethosts_cfg
- print "LegendO[" f_name "]: " > mrtg_nethosts_cfg
- print "Legend1[" f_name "]: used " > mrtg_nethosts_cfg
- print "Legend2[" f_name "]: " > mrtg_nethosts_cfg
- print "YLegend[" f_name "]: used " > mrtg_nethosts_cfg
- print "ShortLegend[" f_name "]: used " > mrtg_nethosts_cfg
- print "Options[" f_name "]: gauge" > mrtg_nethosts_cfg
- print "YTics[" f_name "]: 1" > mrtg_nethosts_cfg
- print "\n\n#-------------------\n\n" > mrtg_nethosts_cfg
-}
-
-
diff --git a/src/contrib/net-hosts/net-hosts b/src/contrib/net-hosts/net-hosts
deleted file mode 100755
index 8adbadc..0000000
--- a/src/contrib/net-hosts/net-hosts
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-##
-## OUTPUT_FILE has to have the same path with WorkDir value setted in the make-mrtg.cfg.awk file
-## MRTG_NETHOSTS_CFG has to be the same file declared in the make-mrtg.cfg.awk file
-## MRTG_EXECUTABLE is the MRTG executable file with full path
-## NETHOSTST_INTERNET_PATH is the path for internet IPs file (without / in the end) and has to be the same path declared in the make-mrtg.cfg.awk file
-## NETHOSTST_AWK_FILE is the make-mrtg.cfg.awk file with full path
-##
-MRTG_EXECUTABLE="/usr/local/mrtg/mrtg"
-NETHOSTST_INTERNET_PATH="/usr/local/mrtg/contrib/net-hosts"
-NETHOSTST_AWK_FILE="/usr/local/mrtg/contrib/net-hosts/make-mrtg.cfg.awk"
-##
-##
-/bin/cat $NETHOSTST_INTERNET_PATH/internet | /bin/awk -F: '{print $1}' | /usr/sbin/fping | /bin/awk -f $NETHOSTST_AWK_FILE
-##
-##
-#####################################################################################################
-## Index Maker in MRTG Style
-############################
-#
-# OUTPUT_FILE="/usr/local/mrtg/contrib/net-hosts/1/index.html"
-# MRTG_NETHOSTS_CFG="/usr/local/mrtg/contrib/net-hosts/mrtg-awk.cfg"
-#
-# /usr/local/mrtg/indexmaker -b "#ffffff" -1 -t 'Internet Nodes' -o $OUTPUT_FILE $MRTG_NETHOSTS_CFG
-#
-######################################################################################################
diff --git a/src/contrib/net-hosts/net-hosts.css b/src/contrib/net-hosts/net-hosts.css
deleted file mode 100644
index 2f080d5..0000000
--- a/src/contrib/net-hosts/net-hosts.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Author: Adrian Turcu <adrianturcu@yahoo.com>
- Created: 16 April 2000
- Version: 1
-*/
-
-BODY {
- background-color: f5fffa;
-}
-A {
- text-decoration: none;
-}
-A:link {
- color: 0000cd;
-}
-A:visited {
- color: 0000cd;
-}
-A:active {
- color: 0000cd;
-}
-
-
-H1 {white-space: nowrap; border: none; padding: 0.5em; margin-top: 25px; position: relative;}
-H1 A {text-decoration: none;}
-
-H1, H1 A {color: #f8f8ff; background: #4169e1;}
-
-.pt { border: none; padding: 0.25em; width: 1020px; text-align: center; font-weight: 800;}
-.pt, .pt A {text-decoration: none; color: #f8f8ff; background: #0000cd;}
-
-.ptl { border: none; padding: 0.25em; width: 1020px; text-align: left; font-weight: 800;}
-.ptl, .ptl A {text-decoration: none; color: #f8f8ff; background: #0000cd;}
-
-.pth { border: none;text-decoration: none; background: #e8e8ff; color: #111111; text-align: left; font-weight: 800;}
-.ptb { border: none;text-decoration: none; color: #0000cd; text-align: left; font-weight: 800;}
diff --git a/src/contrib/net-hosts/redball.gif b/src/contrib/net-hosts/redball.gif
deleted file mode 100644
index 7005133..0000000
--- a/src/contrib/net-hosts/redball.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/nt-services/5mrtg.exe b/src/contrib/nt-services/5mrtg.exe
deleted file mode 100644
index fe7029e..0000000
--- a/src/contrib/nt-services/5mrtg.exe
+++ /dev/null
Binary files differ
diff --git a/src/contrib/nt-services/5mrtg.reg b/src/contrib/nt-services/5mrtg.reg
deleted file mode 100644
index 4f8dd1a..0000000
--- a/src/contrib/nt-services/5mrtg.reg
+++ /dev/null
@@ -1,10 +0,0 @@
-REGEDIT4
-
-[HKEY_LOCAL_MACHINE\SOFTWARE\MMM\mrtg5]
-"MrtgKick-PathName"="C:\\MRTG\\Run\\MrtgKick.Cmd"
-"Debug"=dword:0
-
-[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\mrtg5]
-"EventMessageFile"="%SystemRoot%\\System32\\5mrtg.Exe"
-"TypesSupported"=dword:7
-
diff --git a/src/contrib/nt-services/README b/src/contrib/nt-services/README
deleted file mode 100644
index aa5b086..0000000
--- a/src/contrib/nt-services/README
+++ /dev/null
@@ -1,59 +0,0 @@
-This is my Windows NT service for MRTG.
-
-
-Installation:
-
-0) Unzip nt-service.zip
-
-1) Modify 5mrtg.Reg (if You need...)
-
- Default values:
-
- MrtgKick-PathName=C:\\MRTG\\Run\\MrtgKick.Cmd
- Debug=0
-
-2) Run install.cmd as Administrator
-
-=========================================================
-
-Command line options:
-
-5mrtg -install - install service
-5mrtg -remove - remove service
-
-5mrtg -run - run as executable for testing (Debug is ON)
-
-
-
-5mrtg -update - update service configuration from registry
-5mrtg -info - print service configuration
-
-(Interprocess communication via shared memory: must be same executable)
-
-
-Debugging: via OutputDebugString(), run DBGVIEW.EXE from sysinternals.
-
-
-=========================================================
-
-Rudimentary support for crontab
-
-Default: C:\Etc\CronTab
-
-Not true Crontab (see sample),
-if command in crontab is with asterisk '*'
-will be executed when service (or PC) is started
-after this entry time.
-
-My directory C:\Etc in etc.zip
-
-=========================================================
-
-Sorry for my read-only english!
-
-
-
-Miroslaw M. Maczka, 2000-4-11
-
-Miroslaw_Maczka@hotmail.com
-mmm@bze.com.pl
diff --git a/src/contrib/nt-services/install.cmd b/src/contrib/nt-services/install.cmd
deleted file mode 100644
index d3a313d..0000000
--- a/src/contrib/nt-services/install.cmd
+++ /dev/null
@@ -1,48 +0,0 @@
-@ECHO OFF
-REM
-IF NOT /%OS%/ == /Windows_NT/ GOTO NOT_NT
-IF /%SystemDrive%/ == // GOTO NOT_SystemDrive
-IF /%SystemRoot%/ == // GOTO NOT_SystemRoot
-REM
-REM
-IF NOT EXIST 5Mrtg.Exe GOTO NOT_5Mrtg
-IF NOT EXIST 5Mrtg.Reg GOTO NOT_Reg
-REM
-REM
-REM SystemDrive=C:
-REM SystemRoot=C:\WINNT
-REM
-START 5mrtg.Reg
-REM
-COPY /Y 5mrtg.Exe %SystemRoot%\System32
-%SystemDrive%
-CD %SystemRoot%\System32
-5mrtg.Exe -install
-NET START mrtg5
-CD \
-REM
-GOTO FIN
-REM
-REM
-:NOT_NT
-ECHO This is NOT Windows NT
-GOTO FIN
-REM
-:NOT_SystemDrive
-ECHO SystemDrive NOT defined
-GOTO FIN
-REM
-:NOT_SystemRoot
-ECHO SystemRoot NOT defined
-GOTO FIN
-REM
-:NOT_5Mrtg
-ECHO 5mrtg.exe NOT found
-GOTO FIN
-REM
-:NOT_Reg
-ECHO 5mrtg.Reg NOT found
-GOTO FIN
-REM
-:FIN
-REM -=EOF=-
diff --git a/src/contrib/nt-services/mrtg-etc.zip b/src/contrib/nt-services/mrtg-etc.zip
deleted file mode 100644
index 997a882..0000000
--- a/src/contrib/nt-services/mrtg-etc.zip
+++ /dev/null
Binary files differ
diff --git a/src/contrib/nt_n_cisco/README b/src/contrib/nt_n_cisco/README
deleted file mode 100644
index efc522a..0000000
--- a/src/contrib/nt_n_cisco/README
+++ /dev/null
@@ -1,59 +0,0 @@
-From: CmdrData <CmdrData@ex-pressnet.com>
-Subject: mrtg for nt and cisco
-
-I have been using MRTG running on Windows NT now for a few months and find
-it to be pretty cool. Thanks so much for making a free tool.
-
-The first time I installed it was on a Proliant 2500 w/ dual 200 Mhz CPUs ,
-and the setup was sloppy b/c I was learning how to run the program and make
-the config files, programatically. The setup I had was less than ideal.
-
-So I built a new Proliant 6500 w/ 4 x 200 Mhz CPUs and 3/4 GB RAM and
-hardware RAID5 using 6 drives a couple of months later. I also install
-Microsoft SQL server and IIS on the box. What I now have is an mrtg
-database in sql wh/ has 2 tables 1 for NT devices and 1 for Cisco Devices.
-The main web page I use has 2 combo boxes which load from these table
-devices descriptors which are names and not ips.
-
-The main reason I used sql was so the web page would get auto updated when a
-devices was added and also so I could automate the configuration file
-creation and the list of devices it choose to poll. I made a DTS package in
-sql which every 2 hours dumps parts of the two tables to text files (the sql
-7.0 DTS wizard for this makes it easy to dump parts of a table to a file).
-these 2 files are used to update all the configs every 12 hours. To
-accomplish this I had to write a bunch of batch files that would read text
-file input and do some very repeatable tasks. I also set a few environment
-variables to make the writing and reading easier.
-
-Since your site was very useful in getting me started I wanted to give a
-little back. I have attached a few nt batch files which would be useful for
-anyone trying to set it up on NT. I still have more automating to do like
-making the default.asp page without needing hand editing, and I haven't
-automated the ntconfig process. But right now to add cisco devices all I
-need to do is add a record to a database! I am using this setup to monitor
-about 2700 + ports on mainly catalyst 6500's right now and it finishes its
-polling cycle in about 4 minutes. The machine seems to be cpu and disk
-bound. Quad 450's would be better and a raid with more drive heads would
-also be better. I used the START command with the /BELOWNORMAL switch in a
-couple of places to allow the OS to jump in if it needs to b/c the CPU rides
-at about 99-100% for most of the 4 minutes. SQL is not needed to make use
-of the attached scripts. The files just contain 3 items, name (wh/equals
-part of the workdir path), comm str and IP [or netbiosname].
-
-I also had to hunt around for the nt info and put it in to one file which
-you can do a find and replace on to customize what nt targets you poll.
-
-Feel free to post these files if you like.
-
-What I still have not figured out is how to get the detailed port
-description to be used instead of the ifIndexs. The post you have on this
-doesn't work with the port for NT and I don't know Perl. If you have any
-suggestions on this I would appreciate it. I tried to compare the mrtg file
-from the nt port and the hack and the files were too different for me to
-splice together without real knowlegde of perl, etc.
-
-Anyhow love the app. I work for a web hosting company.
-
-thanks,
-
--Jon
diff --git a/src/contrib/nt_n_cisco/RUN_builder.bat b/src/contrib/nt_n_cisco/RUN_builder.bat
deleted file mode 100644
index f6f36c1..0000000
--- a/src/contrib/nt_n_cisco/RUN_builder.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-REM should look like this : builder.bat you-devicename-here public 10.0.0.2
-
-builder.bat %1 %2 %3
-
-exit \ No newline at end of file
diff --git a/src/contrib/nt_n_cisco/RunCcfgs.cmd b/src/contrib/nt_n_cisco/RunCcfgs.cmd
deleted file mode 100644
index 16edf78..0000000
--- a/src/contrib/nt_n_cisco/RunCcfgs.cmd
+++ /dev/null
@@ -1,11 +0,0 @@
-@ECHO OFF
-@set lDir=e:\mrtg\prod\bats
-@Set hostsfile=e:\cisco_devices_to_poll.txt
-
-@Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
-
-
-@For /F %PARSEARG% %%i in (%hostsfile%) Do START /BELOWNORMAL %lDir%\queryone.bat %%i
-
-
-@exit
diff --git a/src/contrib/nt_n_cisco/builder.bat b/src/contrib/nt_n_cisco/builder.bat
deleted file mode 100644
index d3fece4..0000000
--- a/src/contrib/nt_n_cisco/builder.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-set target=%1
-set snmpStr=%2
-set targetIP=%3
-set NewDir=%mrtgwebroot%\%target%
-set mrtgcurr=e:\mrtg\prod\bats
-
-e:
-cd\
-MD %NewDir%
-if not exist %mrtgwebroot%\%target%\default.asp copy %mrtgcurr%\default.asp %mrtgwebroot%\%target%\default_fixme.asp
-
-cd %mrtgbin%
-%perlbin%\perl %mrtgbin%\cfgmaker --workdir %mrtgwebroot%\%target% %snmpstr%@%targetIP% > %Mrtgcfgbin%\%target%.cfg
-
-
-
-e:
-cd\mrtg\prod\bats
-exit \ No newline at end of file
diff --git a/src/contrib/nt_n_cisco/cisco_devices_to_poll.txt b/src/contrib/nt_n_cisco/cisco_devices_to_poll.txt
deleted file mode 100644
index 981fae1..0000000
--- a/src/contrib/nt_n_cisco/cisco_devices_to_poll.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-routername1 public 127.0.0.2
-routername2 public 127.0.0.3
-routername3 public 127.0.0.4
-routername4 public 127.0.0.5
-routername5 public 127.0.0.6
-routername6 public 127.0.0.7
diff --git a/src/contrib/nt_n_cisco/default.asp b/src/contrib/nt_n_cisco/default.asp
deleted file mode 100644
index d7f4a75..0000000
--- a/src/contrib/nt_n_cisco/default.asp
+++ /dev/null
@@ -1,38 +0,0 @@
-<%@ LANGUAGE="VBSCRIPT" %>
-<html>
-
-<head>
-<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
-<meta HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
-<title>MRTG DATA</title>
-</head>
-
-<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#0000FF" alink="#0000FF">
-
-<h1>Your-Router-Name_here</h1>
-<h3>Ports on Router</h3>
-<%
- Set fs = CreateObject("Scripting.FileSystemObject")
- Dim fs, f, f1, fc, fstr, linklen, bufflink
- Set fs = CreateObject("Scripting.FileSystemObject")
- Set f = fs.GetFolder("e:\inetpub\wwwroot\mrtg\pages\Your-Router-Name_here")
- Set fc = f.Files
- For Each f1 in fc
- fstr = LCase(f1.name)
- If Right(fstr, 8) = "-day.gif" Then
- linklen = Len(fstr)
- buffLink = Mid(fstr,1,(linklen - 8))
-
- Response.Write ("<table><tr><td>")
-
- Response.Write("<a href=" & buffLink & ".html>")
- Response.Write ("<img src=" & f1.name & " border=0> ")
- Response.write ("</td><td>")
- Response.write (bufflink & "<br>")
- Response.Write VbCrLf
- Response.write "</td></tr></table>" & VbCrLf
- End If
- Next
-%>
-</body>
-</html>
diff --git a/src/contrib/nt_n_cisco/make_all_cisco_configs.bat b/src/contrib/nt_n_cisco/make_all_cisco_configs.bat
deleted file mode 100644
index b40f59b..0000000
--- a/src/contrib/nt_n_cisco/make_all_cisco_configs.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-
-Set hostsfile=e:\cisco_devices_to_poll.txt
-
-Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
-
-
-For /F %PARSEARG% %%i in (%hostsfile%) Do START /BELOWNORMAL e:\mrtg\prod\bats\RUN_builder.bat %%i %%j %%k
-
-
-exit
diff --git a/src/contrib/nt_n_cisco/nt_template.cfg b/src/contrib/nt_n_cisco/nt_template.cfg
deleted file mode 100644
index 9d2a5f7..0000000
--- a/src/contrib/nt_n_cisco/nt_template.cfg
+++ /dev/null
@@ -1,228 +0,0 @@
-
-WorkDir: e:\inetpub\wwwroot\mrtg\pages\your-machine-name-here
-
-#IconDir: /systap/images/
-
-Title[^]: CPU #1 Usage (%) on Servers:
-
-Target[your-machine-name-here_DSK_C]: 1.3.6.1.4.1.311.1.1.3.1.1.5.1.4.6.48.58.48.58.67.58&1.3.6.1.4.1.311.1.1.3.1.1.5.1.4.6.48.58.48.58.67.58:public@your-machine-name-here
-MaxBytes[your-machine-name-here_DSK_C]: 8700000
-Title[your-machine-name-here_DSK_C]: your-machine-name-here
-PageTop[your-machine-name-here_DSK_C]: <H2>Disk Space Remaining (MB) on C: on "your-machine-name-here"</H2>
-Options[your-machine-name-here_DSK_C]: gauge, absolute, growright
-Unscaled[your-machine-name-here_DSK_C]: dwmy
-XSize[your-machine-name-here_DSK_C]: 320
-YSize[your-machine-name-here_DSK_C]: 100
-YLegend[your-machine-name-here_DSK_C]: DISK Free (MB)
-ShortLegend[your-machine-name-here_DSK_C] : MB
-Legend1[your-machine-name-here_DSK_C]: Disk Space Available Available in MBytes
-Legend2[your-machine-name-here_DSK_C]: Disk Space Available Available in MBytes
-LegendI[your-machine-name-here_DSK_C]: DiskFree:
-LegendO[your-machine-name-here_DSK_C]: DiskFree:
-
-
-
-Target[your-machine-name-here_IP_STATS]: 1.3.6.1.4.1.311.1.1.3.1.1.10.2.0&1.3.6.1.4.1.311.1.1.3.1.1.10.9.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_IP_STATS]: 20
-AbsMax[your-machine-name-here_IP_STATS]: 30
-Title[your-machine-name-here_IP_STATS]: your-machine-name-here
-PageTop[your-machine-name-here_IP_STATS]: <H2>IP Datagram Statistics on "your-machine-name-here"</H2>
-Options[your-machine-name-here_IP_STATS]: gauge, nopercent, growright
-Unscaled[your-machine-name-here_IP_STATS]: dwmy
-#Supress[your-machine-name-here_IP_STATS]:dwmy
-XSize[your-machine-name-here_IP_STATS]: 320
-YSize[your-machine-name-here_IP_STATS]: 100
-YLegend[your-machine-name-here_IP_STATS]: Datagrams/Sec
-ShortLegend[your-machine-name-here_IP_STATS]: Datagrams
-Legend1[your-machine-name-here_IP_STATS]: IP Datagrams Received/Second
-Legend2[your-machine-name-here_IP_STATS]: IP Datagrams Sent/Second
-#Legend3[your-machine-name-here_IP_STATS]:
-#Legend4[your-machine-name-here_IP_STATS]:
-LegendI[your-machine-name-here_IP_STATS]: Recv'd:
-LegendO[your-machine-name-here_IP_STATS]: Sent:
-
-
-Target[your-machine-name-here_MEM]: 1.3.6.1.4.1.311.1.1.3.1.1.1.1.0&1.3.6.1.4.1.311.1.1.3.1.1.1.2.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_MEM]: 256000000
-AbsMax[your-machine-name-here_MEM]: 1024000000
-Title[your-machine-name-here_MEM]: your-machine-name-here
-PageTop[your-machine-name-here_MEM]: <H2>Memory: Available Bytes vs. Committed Bytes on "your-machine-name-here"</H2>
- <H3>Dotted red line indicates physical memory actually installed (256MB)</H3>
-Options[your-machine-name-here_MEM]: gauge, absolute, growright
-Unscaled[your-machine-name-here_MEM]: dwmy
-#Supress[your-machine-name-here_MEM]:dwmy
-XSize[your-machine-name-here_MEM]: 320
-YSize[your-machine-name-here_MEM]: 100
-YLegend[your-machine-name-here_MEM]: Bytes (MB)
-ShortLegend[your-machine-name-here_MEM]: Bytes
-Legend1[your-machine-name-here_MEM]: Memory Available in MBytes
-Legend2[your-machine-name-here_MEM]: Memory Committed in MBytes
-#Legend3[your-machine-name-here_MEM]:
-#Legend4[your-machine-name-here_MEM]:
-LegendI[your-machine-name-here_MEM]: Available:&nbsp
-LegendO[your-machine-name-here_MEM]: Committed:&nbsp
-
-
-
-Target[your-machine-name-here_NIC]: 2:public@your-machine-name-here
-MaxBytes[your-machine-name-here_NIC]: 1250000
-Title[your-machine-name-here_NIC]: your-machine-name-here
-PageTop[your-machine-name-here_NIC]: <H2>NIC Statistics on "your-machine-name-here"</H2>
-Options[your-machine-name-here_NIC]: bits, growright
-XSize[your-machine-name-here_NIC]: 320
-YSize[your-machine-name-here_NIC]: 100
-LegendI[your-machine-name-here_NIC]: Bytes-In:
-LegendO[your-machine-name-here_NIC]: Bytes-Out:
-#, growright
-
-
-
-
-
-Target[your-machine-name-here_Q_THREADS]: 1.3.6.1.4.1.311.1.1.3.1.1.18.1.3.14.66.108.111.99.107.105.110.103.32.81.117.101.117.101&1.3.6.1.4.1.311.1.1.3.1.1.18.1.4.14.66.108.111.99.107.105.110.103.32.81.117.101.117.101:public@your-machine-name-here
-MaxBytes[your-machine-name-here_Q_THREADS]: 20
-AbsMax[your-machine-name-here_Q_THREADS]: 30
-Title[your-machine-name-here_Q_THREADS]: your-machine-name-here
-PageTop[your-machine-name-here_Q_THREADS]: <H2>your-machine-name-here: Queue Length vs. Active Threads on "your-machine-name-here"</H2>
-Options[your-machine-name-here_Q_THREADS]: gauge, nopercent, growright
-Unscaled[your-machine-name-here_Q_THREADS]: dwmy
-#Supress[your-machine-name-here_Q_THREADS]:dwmy
-XSize[your-machine-name-here_Q_THREADS]: 320
-YSize[your-machine-name-here_Q_THREADS]: 100
-YLegend[your-machine-name-here_Q_THREADS]: Value
-ShortLegend[your-machine-name-here_Q_THREADS]: &nbsp;
-Legend1[your-machine-name-here_Q_THREADS]: Server Queue Length
-Legend2[your-machine-name-here_Q_THREADS]: Server Active Threads
-#Legend3[your-machine-name-here_Q_THREADS]:
-#Legend4[your-machine-name-here_Q_THREADS]:
-LegendI[your-machine-name-here_Q_THREADS]: &nbsp;QueueLength:&nbsp
-LegendO[your-machine-name-here_Q_THREADS]: &nbsp;Threads:&nbsp
-
-
-
-
-
-
-Target[your-machine-name-here_CPU]: 1.3.6.1.4.1.311.1.1.3.1.1.2.1.5.0&1.3.6.1.4.1.311.1.1.3.1.1.2.1.4.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_CPU]: 100
-Title[your-machine-name-here_CPU]: your-machine-name-here
-PageTop[your-machine-name-here_CPU]: <H2>CPU #1 Usage (%) on "your-machine-name-here"</H2>
-Options[your-machine-name-here_CPU]: gauge, nopercent, absolute, growright
-Unscaled[your-machine-name-here_CPU]: dwmy
-#Supress[your-machine-name-here_CPU]:dwmy
-XSize[your-machine-name-here_CPU]: 320
-YSize[your-machine-name-here_CPU]: 100
-YLegend[your-machine-name-here_CPU]: CPU Usage (%)
-ShortLegend[your-machine-name-here_CPU]: %
-Legend1[your-machine-name-here_CPU]: Privileged (NT system) CPU use in percent
-Legend2[your-machine-name-here_CPU]: User (application) CPU use in percent
-#Legend3[your-machine-name-here_CPU]:
-#Legend4[your-machine-name-here_CPU]:
-LegendI[your-machine-name-here_CPU]: PrivCPU:
-LegendO[your-machine-name-here_CPU]: UserCPU:
-
-
-
-
-
-
-#--------------------------------------------------pageflts
-
-Target[your-machine-name-here_MSMPFS]: 1.3.6.1.4.1.311.1.1.3.1.1.1.4.0&1.3.6.1.4.1.311.1.1.3.1.1.1.4.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_MSMPFS]: 50
-Title[your-machine-name-here_MSMPFS]: your-machine-name-here
-PageTop[your-machine-name-here_MSMPFS]: <H2>Memory Page Faults per Second on "your-machine-name-here"</H2>
-Options[your-machine-name-here_MSMPFS]: gauge, nopercent, absolute, growright
-Unscaled[your-machine-name-here_MSMPFS]: dwmy
-#Supress[your-machine-name-here_MSMPFS]:dwmy
-XSize[your-machine-name-here_MSMPFS]: 320
-YSize[your-machine-name-here_MSMPFS]: 100
-YLegend[your-machine-name-here_MSMPFS]: Pages Faults per Second
-ShortLegend[your-machine-name-here_MSMPFS]: PFS
-Legend1[your-machine-name-here_MSMPFS]: Memory Pages Faults per Second
-#Legend2[your-machine-name-here_MSMPFS]:
-#Legend3[your-machine-name-here_MSMPFS]:
-#Legend4[your-machine-name-here_MSMPFS]:
-LegendI[your-machine-name-here_MSMPFS]: MemPageFaults:&nbsp
-LegendO[your-machine-name-here_MSMPFS]: MemPageFaults:&nbsp
-
-
-
-
-#---------------------------------------------------pagespersec
-
-Target[your-machine-name-here_MEMPPS]: 1.3.6.1.4.1.311.1.1.3.1.1.1.9.0&1.3.6.1.4.1.311.1.1.3.1.1.1.9.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_MEMPPS]: 50
-Title[your-machine-name-here_MEMPPS]: your-machine-name-here
-PageTop[your-machine-name-here_MEMPPS]: <H2>Memory: Pages per Second on "your-machine-name-here"</H2>
-Options[your-machine-name-here_MEMPPS]: gauge, nopercent, absolute, growright
-Unscaled[your-machine-name-here_MEMPPS]: dwmy
-#Supress[your-machine-name-here_MEMPPS]:dwmy
-XSize[your-machine-name-here_MEMPPS]: 320
-YSize[your-machine-name-here_MEMPPS]: 100
-YLegend[your-machine-name-here_MEMPPS]: Pages per Second
-ShortLegend[your-machine-name-here_MEMPPS]: PPS
-Legend1[your-machine-name-here_MEMPPS]: Memory Pages per Second
-#Legend2[your-machine-name-here_MEMPPS]:
-#Legend3[your-machine-name-here_MEMPPS]:
-#Legend4[your-machine-name-here_MEMPPS]:
-LegendI[your-machine-name-here_MEMPPS]: MemPages:
-LegendO[your-machine-name-here_MEMPPS]: MemPages:
-
-
-
-
-#---------------------------------------------------pagereadspersec
-
-Target[your-machine-name-here_MEMPRS]: 1.3.6.1.4.1.311.1.1.3.1.1.1.11.0&1.3.6.1.4.1.311.1.1.3.1.1.1.11.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_MEMPRS]: 5
-AbsMax[your-machine-name-here_MEMPRS]: 25
-Title[your-machine-name-here_MEMPRS]: your-machine-name-here
-PageTop[your-machine-name-here_MEMPRS]: <H2>Memory: Page Reads (hard faults) per Second on "your-machine-name-here"
- (sustained rate of 5 or more per second indicates RAM shortage and performance hit!) </H2>
-Options[your-machine-name-here_MEMPRS]: gauge, nopercent, absolute, growright
-Unscaled[your-machine-name-here_MEMPRS]: dwmy
-#Supress[your-machine-name-here_MEMPRS]:dwmy
-XSize[your-machine-name-here_MEMPRS]: 320
-YSize[your-machine-name-here_MEMPRS]: 100
-YLegend[your-machine-name-here_MEMPRS]: Page Reads per Second
-ShortLegend[your-machine-name-here_MEMPRS]: PRS
-Legend1[your-machine-name-here_MEMPRS]: Memory Page Reads per Second
-Legend2[your-machine-name-here_MEMPRS]: Memory Page Reads per Second
-#Legend3[your-machine-name-here_MEMPRS]:
-#Legend4[your-machine-name-here_MEMPRS]:
-LegendI[your-machine-name-here_MEMPRS]: MemPages:
-LegendO[your-machine-name-here_MEMPRS]: MemPages:
-
-
-
-
-#-------NEW---------NEW---------
-
-# My additional OID's
-# tcpCurrEstab/tcpAttemptFails
-
-Title[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: your-machine-name-here
-PageTop[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: <H2>tcpCurrEstab/tcpAttemptFails on "your-machine-name-here"</H2>
-Target[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: 1.3.6.1.2.1.6.9.0&1.3.6.1.2.1.6.7.0:public@your-machine-name-here
-MaxBytes[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: 1250000
-Options[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: gauge, nopercent, absolute, growright
-XSize[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: 320
-YSize[your-machine-name-here_tcpCurrEstab__tcpAttemptFails]: 100
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/contrib/nt_n_cisco/queryone.bat b/src/contrib/nt_n_cisco/queryone.bat
deleted file mode 100644
index 2cbc1c8..0000000
--- a/src/contrib/nt_n_cisco/queryone.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-
-e:
-
-cd\
-cd\mrtg\run
-sleep.exe 5
-
-%perlbin%\perl.exe %mrtgbin%\mrtg %mrtgcfgbin%\%1.cfg
-
-cd\mrtg\prod\bats
-
-EXIT \ No newline at end of file
diff --git a/src/contrib/ovmrtg/README b/src/contrib/ovmrtg/README
deleted file mode 100644
index 3c835e1..0000000
--- a/src/contrib/ovmrtg/README
+++ /dev/null
@@ -1,105 +0,0 @@
-The following requirements/outstanding issues exist for OVMRTG.
-===============================================================
-
-Installation Version 0.2
-------------------------
-
-After installing MRTG and HPOV the following additional customisation
-needs to be done.
-The file $rundir/installov.cmds should be modified to reflect the locations of
-1) the mrtg executables ($rundir)
-2) the web output directory ($webdir)
-3) the name of the cron file within $rundir ($cronfile)
-4) the name of the root HTML file within $webdir ($roothtml).
-5) the name of the HTML rebuild file ($buildhtf)
-6) the company name for display in the HTML ($company)
-7) the directory where the HPOV databases exist {$OV_DB} ($ov_db)
-8) the directory where snmpCol.conf is found {$OV_CONF} ($ov_conf)
-9) Any command line changes to run the perl from within HPOV. May need
- full directory paths to both perl and ovmrtg scripts
-
-NT:
-Suggested defaults for the above items under NT:
-3) mrtgkick.bat
-5) buildht.bat
-7) /OpenView/databases
-8) /OpenView/conf
-
-Then installov should be run from within the mrtg directory to
-update the scripts.
-
-Next the perl script ovupdate should be run to create the new ovmrtgc.csv file
-
-mrtgmenu then needs to be placed into $OV_REGISTRATION/C and be readable
-by the group of users that might need to change mrtg targets.
-You will need to shutdown and restart ovw to see the menu items
-appear under the Misc menu. You do not need to do an ovstop!
-
-The gif files for MRTG banner are located in the common directory
-$webdir for all the HTML's to reference a single copy.
-
-ISSUES
-------
-
-It is assumed that the HPOV host is also the web server for MRTG
-so that mkdir's can be executed in the WEB directories.
-
-As the target/s are selected from the HPOV screen, it is assumed
-that HPOV already knows what the read community names are for
-these devices. OVMRTG uses this fact to alleviate the need for
-it to know community names.
-
-Little error checking and reporting is currently done. If someone is
-displaying the data collection screen then ovadd and ovdel will
-fail and will NOT report failure to the user.
-
-The SNMP sysName is used to create directories in the web area and is also
-used for most file and web names for that device. As such, the system name
-needs to be unique and set for each device that will be monitored. If it is
-not set for each device then the IP address is used instead.
-Code that translates IP Address to sysname can be setup in ovsysnms
-and in cfgmakerov if desired. All directories, configs html files etc
-are produced for each target by the unique sysname.
-
-At present the data collects into the snmpCollect directory forever.
-I've started to write a cleanup routine that will be able to keep
-only recent history. (see ovcullfile)
-
-ovdel does not destroy the directories that are created for the deleted target
-(a safety measure). If you want to clean them up it is currently a
-manual process.
-
-Access
-------
-
-$rundir & $webdir files & directories should be rw for the group of people
-that might be changing mrtg targets from within HPOV
-
-$OV_CONF/snmpCol.conf needs to be rw for OVMRTG users
-
-In the mrtg executable directory, the .cfg files are created.
-A file called 'collects' is also created as a work file.
-DO NOT create a file in this directory with this name.
-
-CRON
-----
-
-cron needs to be setup by the user. Typically a line like this works:
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/mrtg/run/mrtgc 2>/opt/mrtg/run/log 1>&2
-The equivalent job should be setup under NT.
-OVMRTG should not care if the host is Unix or NT.
-
-The end of ovadd and ovdel may be customised to perform extra tasks
-by the cron job.
-
-Usage
------
-
-Once setup, the user selects the OVMRTG target/s from the OV screen.
-The Misc menu item is then selected, followed by Mrtg Actions and
-then select either the 'Add/Update' or 'Stop collecting' options.
-The third option, Show MRTG Targets, works on Unix systems ONLY at
-present. I only have the UNIX NNM developers kit. This option
-'selects' the current targets on the screen for easy updates.
-
-To understand what happens for an add/update, see the file newrtrov.txt
diff --git a/src/contrib/ovmrtg/buildht b/src/contrib/ovmrtg/buildht
deleted file mode 100644
index 8488e6f..0000000
--- a/src/contrib/ovmrtg/buildht
+++ /dev/null
@@ -1,3 +0,0 @@
-#This file builds the HTML for each device being monitored
-cd /opt/mrtg/run/
-#perl index sydrtr1.cfg "Router sydrtr1" sydrtr1 > /var/opt/ns-fasttrack/docs/mrtg/sydrtr1/sydrtr1.html
diff --git a/src/contrib/ovmrtg/buildrtov b/src/contrib/ovmrtg/buildrtov
deleted file mode 100644
index 608b2ae..0000000
--- a/src/contrib/ovmrtg/buildrtov
+++ /dev/null
@@ -1,23 +0,0 @@
-#Echo This file builds the router config files for MRTG for each router"s interfaces
-#Echo See NEWRTR.TXT for details on buiding a new router to include
-
-rm *.cfg
-perl cfgmakerov 10.26.254.1 > nrgiga.cfg
-perl cfgmakerov 203.20.28.1 > zenith.cfg
-perl cfgmakerov 193.20.1.1 > cwdrtr1.cfg
-perl cfgmakerov 193.20.1.2 > cwdrtr2.cfg
-perl cfgmakerov 193.250.1.19 > cwdrtr3.cfg
-perl cfgmakerov 193.250.1.20 > cwdrtr4.cfg
-perl cfgmakerov 193.22.1.1 > melrtr1.cfg
-perl cfgmakerov 193.21.1.1 > sydrtr1.cfg
-perl cfgmakerov 193.21.1.2 > sydrtr2.cfg
-perl cfgmakerov 193.250.1.3 > sydrtr3.cfg
-perl cfgmakerov 10.224.124.0 > tasc1r01.cfg
-perl cfgmakerov 10.224.124.1 > tasc2r02.cfg
-perl cfgmakerov 10.25.252.3 > strc1r01.cfg
-perl cfgmakerov 10.27.252.3 > nrdc1r01.cfg
-perl cfgmakerov 10.24.253.21 > strrtr01.cfg
-perl cfgmakerov 10.24.253.22 > strrtr02.cfg
-perl cfgmakerov 193.250.1.145 > shrtr1.cfg
-perl cfgmakerov 10.20.20.1 > voda_router.cfg
-perl cfgmakerov 190.55.55.9 > total-tel-tulla.cfg
diff --git a/src/contrib/ovmrtg/cfgmakerov b/src/contrib/ovmrtg/cfgmakerov
deleted file mode 100644
index 0516bb1..0000000
--- a/src/contrib/ovmrtg/cfgmakerov
+++ /dev/null
@@ -1,501 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# based on mrtg cfgmaker by Tobias Oetiker <oetiker@ee.ethz.ch>
-# this produces a config file for one router, by pulling info
-# off the router via snmp and then writing files ready for
-# snmpCollect to use (via xnmcollect) and later ovlg calls
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: cfgmakerov,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use SNMP_Session "0.58";
-use BER "0.57";
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";
-
-%snmpget::OIDS = ( 'sysDescr' => '1.3.6.1.2.1.1.1.0',
- 'sysContact' => '1.3.6.1.2.1.1.4.0',
- 'sysName' => '1.3.6.1.2.1.1.5.0',
- 'sysLocation' => '1.3.6.1.2.1.1.6.0',
- 'sysUptime' => '1.3.6.1.2.1.1.3.0',
- 'ifNumber' => '1.3.6.1.2.1.2.1.0',
- ###################################
- # add the ifNumber ....
- 'ifDescr' => '1.3.6.1.2.1.2.2.1.2',
- 'ifType' => '1.3.6.1.2.1.2.2.1.3',
- 'ifIndex' => '1.3.6.1.2.1.2.2.1.1',
- 'ifSpeed' => '1.3.6.1.2.1.2.2.1.5',
- 'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8',
- 'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7',
- # up 1, down 2, testing 3
- 'ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18',
- 'ifName' => '1.3.6.1.2.1.31.1.1.1.1'
- );
-
-
-
-
-sub main {
-
-
- my(%ifType_d)=('1'=>'Other',
- '2'=>'regular1822',
- '3'=>'hdh1822',
- '4'=>'ddnX25',
- '5'=>'rfc877x25',
- '6'=>'ethernetCsmacd',
- '7'=>'iso88023Csmacd',
- '8'=>'iso88024TokenBus',
- '9'=>'iso88025TokenRing',
- '10'=>'iso88026Man',
- '11'=>'starLan',
- '12'=>'proteon10Mbit',
- '13'=>'proteon80Mbit',
- '14'=>'hyperchannel',
- '15'=>'fddi',
- '16'=>'lapb',
- '17'=>'sdlc',
- '18'=>'ds1',
- '19'=>'e1',
- '20'=>'basicISDN',
- '21'=>'primaryISDN',
- '22'=>'propPointToPointSerial',
- '23'=>'ppp',
- '24'=>'softwareLoopback',
- '25'=>'eon',
- '26'=>'ethernet-3Mbit',
- '27'=>'nsip',
- '28'=>'slip',
- '29'=>'ultra',
- '30'=>'ds3',
- '31'=>'sip',
- '32'=>'frame-relay',
- '33'=>'rs232',
- '34'=>'para',
- '35'=>'arcnet',
- '36'=>'arcnetPlus',
- '37'=>'atm',
- '38'=>'miox25',
- '39'=>'sonet',
- '40'=>'x25ple',
- '41'=>'iso88022llc',
- '42'=>'localTalk',
- '43'=>'smdsDxi',
- '44'=>'frameRelayService',
- '45'=>'v35',
- '46'=>'hssi',
- '47'=>'hippi',
- '48'=>'modem',
- '49'=>'aal5',
- '50'=>'sonetPath',
- '51'=>'sonetVT',
- '52'=>'smdsIcip',
- '53'=>'propVirtual',
- '54'=>'propMultiplexor',
- '55'=>'100BaseVG'
- );
-
- my($vendor)=0;
-
- my($router) = $ARGV[0];
- die <<USAGE unless $router;
-
-USAGE: cfgmakerov 'router'
-
-
-EXAMPLE: cfgmakerov ezwf7.ethz.ch >>mrtg.cfg
-
-
-USAGE
-
-
-
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) =
- snmpget($router,
- 'sysDescr','sysContact','sysName', 'sysLocation', 'ifNumber', 'sysObjectID');
-
- ### The next three lines can be deleted once Someone gives this box a name
- if ($router eq '10.26.254.1') {
- $sysName = 'nrgiga';
- }
- if ($sysName eq "") {
- $sysName = $router;
- }
- my($sysNameL) = $sysName;
- $sysNameL =~ tr/[A-Z]/[a-z]/;
-
- $sysDescr =~ s/\r/<BR>/g; # Change returns to <BR>
- my($ciscobox) = ($sysObjectID =~ /cisco/);
- my($portmaster) = ($sysObjectID =~ /livingston/);
- $vendor = ($ciscobox || $portmaster) ;
- my($ifInErrors) = '1.3.6.1.2.1.2.2.1.14';
- my($ifOutErrors) = '1.3.6.1.2.1.2.2.1.20';
-
-### Create the directory if it does not exist
-
- mkdir("$webdir$sysNameL",0777);
-
-print <<ECHO;
-
-WorkDir: $webdir$sysNameL
-IconDir: ../
-######################################################################
-# Description: $sysDescr
-# Contact: $sysContact
-# System Name: $sysName
-# Location: $sysLocation
-#.....................................................................
-ECHO
-if ( $ciscobox ) {
- print <<ECHO;
-# Router CPU load %
-Target[$sysNameL.cpu]: `perl ovcvtfile $router 0 2`
-MaxBytes[$sysNameL.cpu]: 100
-Title[$sysNameL.cpu]: CPU LOAD
-PageTop[$sysNameL.cpu]: <H1>CPU Load %</H1>
-ShortLegend[$sysNameL.cpu]: %
-XSize[$sysNameL.cpu]: 380
-YSize[$sysNameL.cpu]: 100
-YLegend[$sysNameL.cpu]: CPU Utilization
-Legend1[$sysNameL.cpu]: CPU Utilization in % (Load)
-Legend2[$sysNameL.cpu]: CPU Utilization in % (Load)
-Legend3[$sysNameL.cpu]:
-Legend4[$sysNameL.cpu]:
-LegendI[$sysNameL.cpu]:
-LegendO[$sysNameL.cpu]: &nbsp;Usage:
-Options[$sysNameL.cpu]: growright, gauge
-#---------------------------------------------------------------
-ECHO
-}
-
- my @ipadent = snmpgettable($router, 'ipAdEntAddr');
- print STDERR "Got Addresses\n" if $DEBUG;
- my @ipadentif = snmpgettable($router, 'ipAdEntIfIndex');
- print STDERR "Got IfTable\n" if $DEBUG;
-
- my(%ipaddr, %iphost,$index);
- while (scalar @ipadentif){
- $index = shift @ipadentif;
- $ipaddr{$index} = shift @ipadent;
- $iphost{$index} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$index})), AF_INET);
- if ($iphost{$index} eq ''){
- $iphost{$index} = $ipaddr{$index};
- }
-
- }
-
- my(@ifdescr) = snmpgettable($router, 'ifDescr');
- print STDERR "Got IfDescr\n" if $DEBUG;
- my(@iftype) = snmpgettable($router, 'ifType');
- print STDERR "Got IfType\n" if $DEBUG;
- my(@ifspeed) = snmpgettable($router, 'ifSpeed');
- print STDERR "Got IfSpeed\n" if $DEBUG;
- my(@ifadminstatus) = snmpgettable($router, 'ifAdminStatus');
- print STDERR "Got IfStatus\n" if $DEBUG;
- my(@ifoperstatus) = snmpgettable($router, 'ifOperStatus');
- print STDERR "Got IfOperStatus\n" if $DEBUG;
- my(@ifindex) = snmpgettable($router, 'ifIndex');
- print STDERR "Got IfIndex\n" if $DEBUG;
- my(@ifname) = snmpgettable($router, 'ifName');
- print STDERR "Got IfName\n" if $DEBUG;
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr,%sifname);
-
- ### May need the cisco IOS version number so we know which oid to use
- ### to get the cisco description.
- ###
- ### - mjd 2/5/98 (Mike Diehn) (mdiehn@mindspring.net)
- ###
- my ($cisco_ver, $cisco_descr_oid, @ciscodescr);
- if ( $ciscobox ) {
- ($cisco_ver) = ($sysDescr =~ /Version\s+([\d.]+)/);
- $cisco_descr_oid = ($cisco_ver ge "11.3") ? "ifAlias" : "CiscolocIfDescr";
- }
-
- while (scalar @ifindex) {
-
- # as these arrays get filled from the bottom,
- # we need to empty them from the botom as well ...
- # fifo
-
- $index = shift @ifindex;
- $sifdesc{$index} = shift @ifdescr;
- $sifname{$index} = shift @ifname;
- $siftype{$index} = shift @iftype;
- $sifspeed{$index} = shift @ifspeed;
- $sifadminstatus{$index} = shift @ifadminstatus;
- $sifoperstatus{$index} = shift @ifoperstatus;
-
- if ($portmaster) {
- # Trying to extract extra info livingston
- # We can only approximate speeds
- #
- # so we think that ppp can do 76800 bit/s, and slip 38400.
- # (actualy, slip is a bit faster, but usualy users with newer modems
- # use ppp). Alternatively, you can set async speed to 115200 or
- # 230400 (the maximum speed supported by portmaster).
- #
- # But if the interface is ptpW (sync), max speed is 128000
- # change it to your needs. On various Portmasters there are
- # various numbers of sync interfaces, so modify it.
- #
- # The most commonly used PM-2ER has only one sync.
- #
- # Paul Makeev (mac@redline.ru)
- #
-
- if ($siftype{$index} eq 'ppp') {
- if ($sifdesc{$index} eq 'ptpW1') {
- $sifspeed{$index} = 128000;
- } else {
- $sifspeed{$index} = 76800;
- }
- } elsif ($siftype{$index} eq 'slip') {
- $sifspeed{$index} = 38400;
- } elsif ($siftype{$index} eq 'ethernetCsmacd') {
- $sifspeed{$index} = 10000000;
- }
- }
-
- ### Move this section south so we know what type of
- ### circuit we're looking at before we retrieve
- ### the cisco interface alias.
- ###
- ### This whole cicso thing should be re-written, but since
- ### this script doesn't need to run quickly...
- ###
- ### - mjd 2/5/98
- ###
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- #
- if ($ciscobox) {
-
- my ($enoid, @descr);
-
- $enoid = $snmpget::OIDS{"$cisco_descr_oid"} . "." . $index;
-
- if ( $cisco_ver ge "11.2" or $siftype{$index} ne 'frame-relay' ) {
-
- ### This is either not a frame-relay sub-interface or
- ### this router is running IOS 11.2+ and interface
- ### type won't matter. In either of these cases, it's
- ### ok to try getting the ifAlias or ciscoLocIfDesc.
- ###
- @descr = snmpget($router, $enoid);
-
- } else {
-
- ### This is a frame-relay sub-interface *and* the router
- ### is running an IOS older than 11.2. Therefore, we can
- ### get neither ifAlias nor ciscoLocIfDesc. Do something
- ### useful.
- ###
- @descr = ("Cisco PVCs descriptions require IOS 11.2+.");
-
- } # end if else
-
- ### Put whatever I got into the array we'll use later to append the result
- ### of this operation onto the results from the ifDescr fetch.
- ###
- push @ciscodescr, shift @descr;
-
- } # end if ($ciscobox)
-
- # especially since cisco does not return a if
- # descr for each interface it has ...
- ## JB 2/8/97 - sometimes IOS inserts E1 controllers in the standard-MIB
- ## interface table, but not in the local interface table. This puts the
- ## local interface description table out-of-sync. the following
- ## modification skips over E1 cards as interfaces.
- #
- ### I suspect that the mod I made above, to use the ifAlias
- ### oid if possible, may cause problems here. If it seems
- ### that your descriptions are out of sync, try commenting
- ### out the "if ( condition )" and it's closing right brace
- ### so that the "shift @ciscodescr" get executed for *all*
- ### iterations of this loop.
- ###
- ### - mjd 2/5/95
- ###
- if ($ciscobox && $siftype{$index} ne 'ds1') {
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-}
-
- foreach $index ( sort { $a <=> $b } keys %sifdesc) {
- my $c;
- my $speed = int($sifspeed{$index} / 8); # bits to byte
-# LJG Change to report in Bits
-# my $speed_str=&fmi($speed);
- my $speed_str=&fmi($sifspeed{$index});
- my $name="$sysNameL.$index";
- my $namerr="$sysNameL.$index.err";
-
- if (($sifadminstatus{$index} ne "up")
-# this check added by Josh - don't query E1-stack controllers
- || ($siftype{$index} eq 'ds1')
- || ($siftype{$index} eq 'softwareLoopback')
- || ($speed == 0 )
-# LJG Change to report all in Bits
-# || ($speed > 400 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($speed > 3200 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($sifoperstatus{$index} eq 'down')
- || (($sifdesc{$index}=~ /Dialer/) && ($ciscobox))) {
- print <<ECHO;
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- }else {
- $c = '';
- }
-
- print <<ECHO;
-${c}
-${c}Target[$name]: `perl ovcvtfile $router $index 1`
-${c}MaxBytes[$name]: $speed
-${c}Title[$name]: $sysName ($iphost{$index}): $sifdesc{$index} $sifname{$index}
-${c}Options[$name]: growright, gauge, bits
-${c}PageTop[$name]: <H1>Traffic Analysis for $sifdesc{$index}
-${c} $sciscodescr{$index}</H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$sysName in $sysLocation</TD></TR>
-${c} <TR><TD>Maintainer:</TD><TD>$sysContact</TD></TR>
-${c} <TR><TD>Interface:</TD><TD>$sifdesc{$index} ($index - $sifname{$index})</TD></TR>
-${c} <TR><TD>IP:</TD><TD>$iphost{$index} ($ipaddr{$index})</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD>$speed_str ($siftype{$index})</TD></TR>
-${c} </TABLE>
-${c}
-#---------------------------------------------------------------
-
-# In and Out Error Counts
-${c}
-${c}Target[$namerr]: `perl ovcvtfile $router $index 0`
-${c}MaxBytes[$namerr]: 2147483600
-${c}Title[$namerr]: $sysName ($iphost{$index}): $sifdesc{$index} $sifname{$index} I/O Errors
-${c}Options[$namerr]: growright, gauge
-${c}PageTop[$namerr]: <H1>I/O Error Analysis for $sifdesc{$index}
-${c} $sciscodescr{$index}</H1>
-${c}YLegend[$namerr]: Errors/Period
-${c}Legend1[$namerr]: Inward Errors
-${c}Legend2[$namerr]: Outward Errors
-${c}Legend3[$namerr]:
-${c}Legend4[$namerr]:
-${c}LegendI[$namerr]: &nbsp;In :
-${c}LegendO[$namerr]: &nbsp;Out :
-${c}
-#---------------------------------------------------------------
-
-ECHO
- }
-}
-
-main;
-exit(0);
-
-sub snmpget{
- my($host,@vars) = @_;
- my(@enoid, $var,$response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@retvals,$t1,$t2,@resp,$tempo);
- my($hackcisco);
- foreach $var (@vars) {
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var} || $var =~ /^\d+[\.\d+]*\.\d+$/;
- if ($var =~ /^\d+[\.\d+]*\.\d+/) {
- $value = $value.$var." ";
- $hackcisco = 1;
- } else {
- $value = $value.$snmpget::OIDS{$var}." ";
- $hackcisco = 0;
- }
- }
- open(SNMPG, "snmpget $host $value |");
-# print STDERR $value;
- while ($tempo =<SNMPG>){
-# print STDERR $tempo;
- ($t1, $t2, $tempo ) = split /:/ , $tempo, 3;
- if (!$tempo){
- if ($t2){
- $t1 = $t1 .":".$t2;
- }
- $tempo = pop(@retvals)." ".$t1 ;
- }
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @retvals, $tempo;
- }
-# print STDERR @retvals;
- close (SNMPG);
- return (@retvals);
-}
-
-sub snmpgettable{
- my($host,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $t1, $t2,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = $snmpget::OIDS{$var}." ";
- $enoid=$orig_oid;
- open(SNMPG, "snmpwalk $host $orig_oid |");
-# print STDERR $orig_oid;
- while ($tempo =<SNMPG>){
-# print STDERR $tempo;
- ($t1, $t2, $tempo ) = split /:/ , $tempo ,3;
- if (!$tempo){
- if ($t2){
- $t1 = $t1 .":".$t2;
- }
- $tempo = pop(@table)." ".$t1 ;
- }
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @table, $tempo;
-
- }
- close (SNMPG);
- return (@table);
-}
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
-# LJG Change to report in Bits
-# @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s");
- @short = ("Bits/s","kBits/s","MBits/s","GBits/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 3) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
-
-
diff --git a/src/contrib/ovmrtg/index b/src/contrib/ovmrtg/index
deleted file mode 100644
index 8de2bec..0000000
--- a/src/contrib/ovmrtg/index
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/local/gnu/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Multi Router Traffic Grapher: Index Generator
-##################################################################
-#
-# This reads a mrtg.cfg file form std input or cmdline argument
-# and it takes a regexp on the cmdline to specify which
-# targets to look at.
-#
-# from this info it produces a router index on std out.
-#
-##################################################################
-# Created by Tobias Oetiker <oetiker@ee.ethz.ch>
-# Modifications by Laurie Gellatly <gellatly@one.net.au>
-# Distributed under the GNU copyleft
-#
-# $Id: index,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-##################################################################
-
-
-$regexp = pop @ARGV;
-$Title = pop @ARGV;
-if (defined($Title) && -f $Title) {
- push(@ARGV, $Title);
- $Title = "$Title Overview ($regexp)";
-}
-if (! -f $ARGV[0]) {
- print "
-
-USAGE: index <mrtg.cfg> <title> <regular expression>
-
-This tool will read the contents of the mrtg.cfg file and will
-return the HTML code of a webpage contanig the 'daily' graphs
-of all the routers whose titles match the regular expression.
-
-NOTE: you have to adjust this tool to your needs as the HTML
- contains our logo and our name ...
-
-";
-
- exit ;
-
-}
-
-#slurp the cfg file
-while(<>) {
- s/\t/ /g; #replace tabs by spac
- next if /^\s+$/; #ignore white space
- next if /^\s*\#/; #ignore comments
- if (/$regexp/i && ! /\[\^\]/ && ! /\[\$\]/ && /^title\[([^\]]+)\]:\s*(.*\S)/i) {
- $router=lc($1);
- $arg=$2;
- $titles{$router} = $arg;
- next;
- }
- if (/^directory\[([^\]]+)\]:\s*(.*\S)/i) {
- $arg = $2;
- $tmp = lc($1);
- $dirs{$tmp} = "$arg/";
- }
- if ($router && /^pagetop\[([^\]]+)\]:\s*(.*\S)/i) {
- next;
- }
- if ($router && /^\s+(.*?)<\/H1>/) {
- $titles{$router} .= " $1";
- }
- $router = '';
-}
-
-$Today=datestr(time);
-print <<ECHO;
-<HTML>
-<HEAD>
-<TITLE>$Title</TITLE>
-<META HTTP-EQUIV="Refresh" CONTENT=300 >
-</HEAD>
-<BODY bgcolor=#ffffff>
-
-<H1>$Title</H1>
-
-These statistics were last updated <B>$Today </B>
-
-ECHO
-
-foreach $router (sort {$titles{$a} cmp $titles{$b}} keys %titles) {
- $dirs{$router} = "" if (!defined($dirs{$router}));
- $rdir = $dirs{$router};
- print <<ECHO;
-<P><B><A HREF="$rdir$router.html">$titles{$router}</B><P>
- <SMALL><!--#flastmod file="$rdir$router.html" --></SMALL></P>
- <IMG BORDER=0 WIDTH=500 HEIGHT=135 SRC="$rdir$router-day.gif"></A>
- <HR>
-ECHO
-}
-
-'$Revision: 1.1.1.1 $ ' =~ /Revision: (\S*)/;
-$rev=$1;
-'$Date: 2002/02/26 10:16:36 $ ' =~ /Date: (\S*)/;
-$date=$1;
-
-print <<ECHO;
-<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
-<TR>
-<TD WIDTH=63><A ALT="MRTG"
-HREF="http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-BORDER=0 SRC="../mrtg-l.gif"></A></TD>
-<TD WIDTH=25><A ALT=""
-HREF="http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-BORDER=0 SRC="../mrtg-m.gif"></A></TD>
-<TD WIDTH=388><A ALT=""
-http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-BORDER=0 SRC="../mrtg-r.gif"></A></TD>
-</TR>
-</TABLE>
-
-<SPACER TYPE=VERTICAL SIZE=4>
-<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
- <TR VALIGN=top>
- <TD WIDTH=88 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
- $rev-$date</FONT></TD>
- <TD WIDTH=388 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
- <A HREF="http://www.ee.ethz.ch/~oetiker">Tobias Oetiker</A>
- <A HREF="mailto:oetiker\@ee.ethz.ch">&lt;oetiker\@ee.ethz.ch&gt;</A>
- and&nbsp;<A HREF="http://www.bungi.com">Dave&nbsp;Rand</A>&nbsp;<A HREF="mailto:dlr\@bungi.com">&lt;dlr\@bungi.com&gt;</A><br>
- <A HREF="../routers.html">Back to Main Router List</A></FONT>
-
-
-</TR>
-</TABLE>
-</BODY></HTML>
-ECHO
-
-sub datestr {
- my ($time) = shift(@_) || return 0;
- my ($wday) = ('Sunday','Monday','Tuesday','Wednesday',
- 'Thursday','Friday','Saturday')[(localtime($time))[6]];
- my ($month) = ('January','February' ,'March' ,'April' ,
- 'May' , 'June' , 'July' , 'August' , 'September' ,
- 'October' ,
- 'November' , 'December' )[(localtime($time))[4]];
- my ($mday,$year,$hour,$min) = (localtime($time))[3,5,2,1];
- if ($min<10) {$min = "0$min";}
- return "$wday, $mday $month ".($year+1900)." at $hour:$min";
-}
-
-
-
-
diff --git a/src/contrib/ovmrtg/installov b/src/contrib/ovmrtg/installov
deleted file mode 100755
index 938b253..0000000
--- a/src/contrib/ovmrtg/installov
+++ /dev/null
@@ -1 +0,0 @@
-perl installov.pl installov.cmds ovsho ovadd ovdel ovtst ovcvtfile ovcullfile mrtgmenu cfgmakerov
diff --git a/src/contrib/ovmrtg/installov.cmds b/src/contrib/ovmrtg/installov.cmds
deleted file mode 100644
index 2b57907..0000000
--- a/src/contrib/ovmrtg/installov.cmds
+++ /dev/null
@@ -1,12 +0,0 @@
-s~^my \$webdir .*~my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";~
-s~^my \$rundir .*~my $rundir = "/opt/mrtg/run";~
-s~^my \$company .*~my $company = "Company";~
-s~^my \$cronfile .*~my $cronfile = "mrtgc";~
-s~^my \$roothtml .*~my $roothtml = "routers.html";~
-s~^my \$buildhtf .*~my $buildhtf = "buildht";~
-s~^my \$dnsfile .*~my $dnsfile = "ovmrtgc.csv";~
-s~^my \$ov_db .*~my $ov_db = "/var/opt/OV/share/databases";~
-s~^my \$ov_conf .*~my $ov_conf = "/etc/opt/OV/share/conf";~
-s~Command ".*ovadd~Command "perl /opt/mrtg/run/ovadd~
-s~Command ".*ovdel~Command "perl /opt/mrtg/run/ovdel~
-s~Command ".*ovsho~Command "perl /opt/mrtg/run/ovsho~
diff --git a/src/contrib/ovmrtg/installov.pl b/src/contrib/ovmrtg/installov.pl
deleted file mode 100644
index b259ba7..0000000
--- a/src/contrib/ovmrtg/installov.pl
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file updates the installation specific values
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: installov.pl,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-
-my($cmdfile,$cnt,$cntl,$infile,$delim,$s,$sysn,@cmds,@lines,@to,@from);
-
-sub main {
-
- $cmdfile = $ARGV[0];
- shift @ARGV;
- $infile = $ARGV[0];
- die <<USAGE unless $cmdfile && $infile;
-
-USAGE: installov cmdfile script/s
-
-EXAMPLE: installov installov.cmd ovadd ovdel mrtgmenu
-
-
-USAGE
- open (CMD,"<".$cmdfile);
- @cmds = <CMD>;
- close (CMD);
- chomp (@cmds);
- for ($cnt = 0; $cnt < @cmds; ++$cnt){
- if ('s' eq substr($cmds[$cnt],0,1)){
- $delim = substr($cmds[$cnt],1,1);
- ($s,$from[$cnt],$to[$cnt]) = split (/$delim/,$cmds[$cnt]);
- }
- }
- while ($infile){
- open (SCRIPTF,"<".$infile);
- @lines = <SCRIPTF>;
- close (SCRIPTF);
- chomp(@lines);
- for ($cntl = 0; $cntl < @lines; ++$cntl){
- for ($cnt = 0; $cnt < @to; ++$cnt){
- $lines[$cntl] =~ s~$from[$cnt]~$to[$cnt]~;
- }
- }
- open (SCRIPTF,">".$infile);
- for ($cntl = 0; $cntl < @lines; ++$cntl){
- print SCRIPTF $lines[$cntl]."\n";
- }
- close (SCRIPTF);
- shift @ARGV;
- $infile = $ARGV[0];
- }
-}
-
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/mrtgmenu b/src/contrib/ovmrtg/mrtgmenu
deleted file mode 100644
index ecc9c1e..0000000
--- a/src/contrib/ovmrtg/mrtgmenu
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Network Node Manager MRTG menu items
- *
- * $Date: 2002/02/26 10:16:36 $
- */
-
-Application "MRTG Actions"
-{
- Version "NNM Release B.05.01 Jun 21 1997";
-
- Description {
- "Enables you to add new targets for MRTG to graph.",
- "See Laurie for more details"
- }
-
- Copyright {
- "Copyright (c) 1990-1999 Net Improvement Consulting Pty Limited",
- "All rights reserved."
- }
-
- /*
- ** Tools
- */
-
- MenuBar <100> "Misc" _i
- {
- <90> "MRTG Actions" _R f.menu "MRTG Actions";
- }
-
- Menu "MRTG Actions"
- {
- <100> "Add/Update Target/s" _A CONTEXT "AllContexts || isIP" f.action "MRTGADD";
- <100> "Stop Collecting Target/s" _S CONTEXT "AllContexts || isIP" f.action "MRTGDEL";
- <100> "Show Current Target/s" _C CONTEXT "AllContexts || isIP" f.action "MRTGSHO";
-
- }
-
- Action "MRTGADD"
- {
- SelectionRule (isNode || isInterface) && isIP;
- NameField "IP Hostname", "IP Address";
- Command "perl /opt/mrtg/run/ovadd ${OVwSelections}";
- }
-
- Action "MRTGDEL"
- {
- SelectionRule (isNode || isInterface) && isIP;
- NameField "IP Hostname", "IP Address";
- Command "perl /opt/mrtg/run/ovdel ${OVwSelections}";
- }
-
- Action "MRTGSHO"
- {
- Command "perl /opt/mrtg/run/ovsho";
- }
-
-}
diff --git a/src/contrib/ovmrtg/newrtrov.txt b/src/contrib/ovmrtg/newrtrov.txt
deleted file mode 100644
index 6d5cfc4..0000000
--- a/src/contrib/ovmrtg/newrtrov.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-To monitor device/s first select the device/s on the OV map
-and then execute the mrtg add menu option under Misc
-
-This firstly creates the collection file for xnmCollect
-via perl ovcols ip/s.
-
-xnmcollect is then called to -merge the new collection file
-xnmcollect is then called -event to activate the collection process
-
-Next, it creates the config file via perl cfgmakerov for each
-which also creates any needed new directory under
-$webdir/XXXrtrZ
-where XXXrtrZ is the device name.
-
-Then it creates the html generation files
-
-The file ovmrtgc.csv is updated with the IP address of the device, the
-SNMP sysName and the IP Hostname.
-
-If all this has worked OK, it then creates the 5 minute execution file $cronfile
-
-Finally,
-$webdir/$roothtml is created to display the devices.
diff --git a/src/contrib/ovmrtg/ovadd b/src/contrib/ovmrtg/ovadd
deleted file mode 100644
index d912235..0000000
--- a/src/contrib/ovmrtg/ovadd
+++ /dev/null
@@ -1,187 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file controls the creation of all the MRTG config files from OV
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# See newrtrov.txt for a description of what is performed
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovadd,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $company = "Company";
-my $rundir = "/opt/mrtg/run";
-my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";
-my $cronfile = "mrtgc";
-my $roothtml = "routers.html";
-my $buildhtf = "buildht";
-my $dnsfile = "ovmrtgc.csv";
-
-# Change the next line to be " &" to submit all jobs at once
-my $backgrnd = " ";
-
-my($at,$router,$sysn,$sysncfg,$sysnhtml,$head,$cnt);
-my(@buildhtt,@sysipnms,@mrtgc,@sysnms);
-
-sub main {
-
- $router = $ARGV[0];
- die <<USAGE unless $router;
-
-USAGE: ovadd 'router IP ADDRESS/S'
-
-EXAMPLE: ovadd 193.21.1.2 10.21.1.2 10.21.1.1
-
-
-USAGE
- chdir $rundir;
-# Find the IP Address and SNMP sysNames from the arguments given
- @sysipnms=`perl ovsysnms @ARGV`;
- chomp(@sysipnms);
-# Generate the interfaces to collect on
- `perl ovcols + @ARGV > collects`;
-# Start the collection happening on these interfaces
- `xnmcollect -merge collects`;
- `xnmcollect -event`;
- for ($cnt = 0; $cnt < @sysipnms ; $cnt++){
- ($router,$sysn) = split /\,/, $sysipnms[$cnt];
- $sysn = lc($sysn);
- $sysncfg = $sysn.".cfg";
- $sysnhtml = $sysn.".html";
-# Create the .cfg file for each device
- `perl $rundir\/cfgmakerov $router > $sysncfg`;
-# Create the root HTML file for this device in its directory
- `perl $rundir\/index $sysncfg "Router $sysn" $sysn > $webdir$sysn\/$sysnhtml`;
- $mrtgc[@mrtgc] = $sysn;
- }
-
- @mrtgc = sort(@mrtgc);
- $cnt = 0;
- $head = 0;
- $at = 0;
- open(BUILDHT, "<".$buildhtf);
-# This next piece of code assumes that the $buildhtf file is in alpha order
-# This code leaves old lines untouched (in case the IP address rather than
-# the sysName was used as the target
- while(<BUILDHT>){
- chomp;
- if (/index (.*)\.cfg/){
- $sysn = $1;
- $head = $_;
- if (($sysn lt $mrtgc[$at]) || ($at >= @mrtgc)) {
- $buildhtt[@buildhtt] = $head;
- }else {
- do{
- $cnt = $mrtgc[$at];
- $buildhtt[@buildhtt] =
- "perl $rundir\/index $cnt.cfg \"Router $cnt\" $cnt > $webdir$cnt\/$cnt.html";
- ++$at;
- }while (($sysn ge $mrtgc[$at]) && ($at < @mrtgc));
- if ($sysn ne $mrtgc[$at-1]){
- $buildhtt[@buildhtt] = $head;
- }
- }
- }
- }
- close (BUILDHT);
-# In case there were none to start with add it the new members
- while ($at < @mrtgc){
- $cnt = $mrtgc[$at];
- $buildhtt[@buildhtt] =
- "perl $rundir\/index $cnt.cfg \"Router $cnt\" $cnt > $webdir$cnt\/$cnt.html";
- ++$at;
- }
- open (BUILDHT,">".$buildhtf);
- print BUILDHT <<ECHO;
-#This file builds the HTML for each device being monitored
-cd $rundir
-ECHO
- for ($cnt = 0; $cnt < @buildhtt ; $cnt++){
- print BUILDHT "$buildhtt[$cnt]\n";
- }
- close (BUILDHT);
-
-# Add on the new IPs and sysNames to the onces we already have
- open (DNSFILE,"<".$dnsfile);
- while(<DNSFILE>){
- chomp;
- $sysipnms[@sysipnms] = $_;
- }
- close (DNSFILE);
-
- @sysipnms = sort srtipnms @sysipnms;
- $sysn = ".";
- for ($cnt = 0; $cnt < @sysipnms ; $cnt++){
- $head = lc((split /\,/,$sysipnms[$cnt])[1]);
- if($sysn eq $head){
- next;
- }
- $sysn = $head;
- $sysipnms[@sysnms] = $sysipnms[$cnt];
- $sysnms[@sysnms] = $sysn;
- }
-# Now sysnms has the exact number of targets in it while sysipnms has
-# the first @sysnms entries correct!
-
- open (DNSFILE,">".$dnsfile);
- for ($cnt = 0; $cnt < @sysnms ; $cnt++){
- print DNSFILE "$sysipnms[$cnt]\n";
- }
- close (DNSFILE);
-
- open (HTMLF,">".$webdir.$roothtml);
- print HTMLF <<ECHO;
-<HTML>
-</HEAD>
-<BODY BGCOLOR="#ffffff">
-<CENTER><H1>$company Router MRTG Traffic Analysis </H1></CENTER>
-
-<SPACER TYPE=VERTICAL SIZE=4>
-<CENTER><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
- <TR VALIGN=top>
- <TD WIDTH=388 ALIGN="CENTER"><FONT FACE="Arial,Helvetica" SIZE=2>
-ECHO
- for ($cnt = 0; $cnt < @sysnms ; $cnt++){
- $sysn = $sysnms[$cnt];
- $sysnhtml = $sysn.".html";
- print HTMLF "<A HREF=\"$sysn\/$sysnhtml\">$sysn<\/A><br>\n";
- }
- print HTMLF <<ECHO;
-</FONT>
-</TD>
-</TABLE>
-</BODY>
-</HTML>
-ECHO
- close(HTMLF);
- open (MRTGC,">".$cronfile);
- print MRTGC <<ECHO;
-#This file runs the MRTG for each config $rundir/file
-cd $rundir
-ECHO
- for ($cnt = 0; $cnt < @sysnms ; $cnt++){
- print MRTGC "perl $rundir\/mrtg $sysnms[$cnt].cfg $backgrnd\n";
- }
- print MRTGC <<ECHO;
-# Additional commands could go here. Under NT the next line won't return
-$buildhtf
-# End of rebuild ht file
-ECHO
- close (MRTGC);
-# send to management station
-# (local host unless run from a management console)
-`ovevent "" .1.3.6.1.4.1.11.2.17.1.0.58916873 .1.3.6.1.4.1.11.2.17.2.1.0 Integer 14 .1.3.6.1.4.1.11.2.17.2.2.0 OctetString "$ENV{OVwSessionID}" .1.3.6.1.4.1.11.2.17.2.4.0 OctetString "OVMRTG ADD/Update for @ARGV COMPLETED"`
-
-}
-main;
-exit(0);
-sub srtipnms{
- lc((split( /\,/,$a))[1]) cmp lc( (split( /\,/,$b))[1]);
-}
-
diff --git a/src/contrib/ovmrtg/ovcols b/src/contrib/ovmrtg/ovcols
deleted file mode 100644
index f41e9c9..0000000
--- a/src/contrib/ovmrtg/ovcols
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# based on mrtg cfgmaker by Tobias Oetiker <oetiker@ee.ethz.ch>
-# this produces a config file for one router, by pulling info
-# off the router via snmp and then writing files ready for
-# snmpCollect to use (via xnmcollect) and later ovcvtfile calls
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovcols,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use vars '$DEBUG';
-use ovmrtg;
-my $DEBUG = 0;
-my($op,$router,@res);
-
-sub main {
- $op = $ARGV[0];
- $router = $ARGV[1];
- die <<USAGE unless ($router && (($op eq "+") || ($op eq "-")));
-
-USAGE: ovcols +/- 'router IP ADDRESS/S'
-
-EXAMPLE: ovcols + 193.21.1.2
-
-USAGE
- @res=ovcols(@ARGV);
- for($op=0;$op<@res;++$op){
- print $res[$op]."\n";
- }
-}
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/ovcullfile b/src/contrib/ovmrtg/ovcullfile
deleted file mode 100644
index 4ed41fe..0000000
--- a/src/contrib/ovmrtg/ovcullfile
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Remove old data from OV_DB files
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# This reads an OV_DB file for the cut off and interface
-# and calculates how many lines can be removed
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovcullfile,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use strict;
-use vars '$DEBUG';
-my $ov_db = "/var/opt/OV/share/databases";
-my $ovdb= $ov_db."/snmpCollect/";
-my $DEBUG = 0;
- my($days2keep, $interface, $io , $cutoff) ;
- my($cnt, $data, $recno, $junk);
- my @names = ( "IfInErrors", "IfOutErrors",
- "IfInOctets", "IfOutOctets", "avgBusy5");
- my @namext = (".err", "", ".cpu");
- my ($val);
- my $recsz = 24;
- my $fsize = -1;
- my $p = "',\$p'";
- my $parms = '-F\\t \'{printf("%d\\t%d\\t%s\\t%lg\\n", $4, $5, $6, $3)}\'';
- my @resu;
-
-sub main {
-
- my($extn) = "";
- $days2keep = $ARGV[0];
- $interface = $ARGV[1];
- $io = $ARGV[2];
- die <<USAGE unless (defined($days2keep) && defined($interface) && defined($io));
-
-USAGE: ovcullfile '#days Interface# io&errs=1|cpu=0'
-
-EXAMPLE: ovcullfile 30 4 1
-
-Delete all data older than 30 days for
-all interface 4 Input and Output Octets & Errors
-
-
-USAGE
- $cutoff = time - ( 3600 * 24 * $days2keep) ;
- $extn = $namext[$io];
- if ($io) {
- get(2);
- get(3);
- get(0);
- get(1);
- } else {
- get(4);
- }
-}
-
-main;
-exit(0);
-
-sub get {
- my ($ind) = @_;
- my ($starttime, $entime, $IPAdd1, $IPAdd2, $IPAdd3, $IPAdd4, $cnt, $val) ;
- my ($file) = $ovdb.$names[$ind].".".$interface;
- open (RAWIN , $file) or die "Could not open $file";
- my ($junk, $junk, $junk, $junk, $junk, $junk, $junk, $cfsize) = stat $file;
- binmode(RAWIN);
- my ($notfound) = (($cfsize / $recsz) - 1)> -1;
- if (($fsize == $cfsize) && ($recno > 1)){
- seek(RAWIN,($recno - 2) * $recsz, 0);
- $notfound = ($recsz == read(RAWIN, $data, $recsz));
- ($starttime, $entime, $IPAdd1, $IPAdd2, $IPAdd3, $IPAdd4, $cnt, $val) =
- unpack("LLCCCCLd",$data);
- if ($cutoff < $entime) {
- seek(RAWIN, 0, 0);
- $recno = 1;
- }
- } else {
- $fsize = $cfsize;
- $recno = 1;
- }
- while ($notfound){
-# Read from the beginning of file
- $notfound = ($recsz == read(RAWIN, $data, $recsz));
- ($starttime, $entime, $IPAdd1, $IPAdd2, $IPAdd3, $IPAdd4, $cnt, $val) =
- unpack("LLCCCCLd",$data);
- if ($cutoff < $entime) {
- $notfound = 0;
- } else {
- $recno++;
- }
- }
- close (RAWIN);
- if ($recno > 1){
- @resu = `snmpColDump -tTI $file | sed -n $recno$p |
- awk $parms |
- snmpColDump -r - $file`
-# wc -l`
- }
- return ($recno);
-}
diff --git a/src/contrib/ovmrtg/ovcvtfile b/src/contrib/ovmrtg/ovcvtfile
deleted file mode 100644
index 8d145d9..0000000
--- a/src/contrib/ovmrtg/ovcvtfile
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Extract Input and Output values for target
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# This reads an OV_DB file for the target and interface
-# and prints a single line for In, Out, "UPTIME" and Target
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovcvtfile,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use strict;
-use vars '$DEBUG';
-my $ov_db = "/var/opt/OV/share/databases";
-my $DEBUG = 0;
- my($target, $interface, $io , $in, $out, $uptime) ;
- my ($cnt, $data, $recno, $junk);
- my @names = ( "IfInErrors", "IfOutErrors",
- "IfInOctets", "IfOutOctets", "avgBusy5", "sysUpTime");
- my @namext = (".err", "", ".cpu");
- my ($val);
- my $recsz = 24;
- my ($oldtime) = time - 550;
-
-
-sub main {
-
- my($extn) = "";
- $target = $ARGV[0];
- $interface = $ARGV[1];
- $io = $ARGV[2];
- die <<USAGE unless (defined($target) && defined($interface) && defined($io));
-
-USAGE: ovcvtfile 'IPADDress Interface# io=1|err=0|cpu=2'
-
-EXAMPLE: ovcvtfile 193.20.1.1 4 1
-
-Read target 193.20.1.1 for interface 4 Input and Output Octets
-
-
-USAGE
- if ($ov_db eq ""){
- $ov_db = "/var/opt/OV/share/databases";
- }
- $ov_db= $ov_db."/snmpCollect/";
- $extn = $namext[$io];
- $uptime = pretty_uptime_value();
- $in = get(2*$io,$interface);
- if ($io == 2) {
- $out = $in;
- } else {
- $out = get(1+2*$io,$interface);
- }
-
-print <<ECHO;
-$in
-$out
-$uptime
-$target.$interface$extn
-ECHO
-}
-
-main;
-exit(0);
-
-sub get {
- my ($ind,$interface) = @_;
- my ($file) = $ov_db.$names[$ind].".".$interface;
- open (RAWIN , $file) or die "Could not open $file";
- my ($junk, $junk, $junk, $junk, $junk, $junk, $junk, $recno) = stat $file;
- my ($starttime, $entime, $IPAdd1, $IPAdd2, $IPAdd3, $IPAdd4, $cnt, $val) ;
- $recno = ($recno / $recsz) - 1 ;
- my ($notfound) = $recno > -1;
- binmode(RAWIN);
- while ($notfound){
-# Read from the end of file backwards
- seek(RAWIN,$recno * $recsz, 0);
- read(RAWIN, $data, $recsz);
- ($starttime, $entime, $IPAdd1, $IPAdd2, $IPAdd3, $IPAdd4, $junk, $cnt, $val) =
- unpack("NNCCCCNNN",$data);
- if ($oldtime > $entime) {
- $val = 0;
- $notfound = 0;
- } elsif ($target eq $IPAdd1.".".$IPAdd2.".".$IPAdd3.".".$IPAdd4){
- if((pack"s",1) eq (pack"v",1)){
- $notfound = $cnt;
- $cnt = $val;
- $val = $notfound;
- }
- $notfound = 0;
- $val = unpack"d",pack"LL",$cnt,$val;
- } else {
- $recno--;
- if ( $recno < 0 ){
- $notfound = 0;
- }
- }
- }
- close (RAWIN);
- if ($ind < 2){
- $val = $val * ($entime - $starttime);
- }
- $val = int($val);
- return ($val);
-}
-
-sub pretty_uptime_value () {
- my ($uptime) = get(5,0);
- if ($uptime == 0){
- return "An unknown amount of time";
- }
- my ($seconds,$minutes,$hours,$days,$result);
-## We divide the uptime by hundred since we're not interested in
-## sub-second precision.
- $uptime = int ($uptime / 100);
- $days = int ($uptime / (60 * 60 * 24));
- $uptime %= (60 * 60 * 24);
- $hours = int ($uptime / (60 * 60));
- $uptime %= (60 * 60);
- $minutes = int ($uptime / 60);
- $seconds = $uptime % 60;
- if ($days == 0){
- $result = sprintf ("%d:%02d:%02d", $hours, $minutes, $seconds);
- } elsif ($days == 1) {
- $result = sprintf ("%d day, %d:%02d:%02d",
- $days, $hours, $minutes, $seconds);
- } else {
- $result = sprintf ("%d days, %d:%02d:%02d",
- $days, $hours, $minutes, $seconds);
- }
- return $result;
-}
diff --git a/src/contrib/ovmrtg/ovdel b/src/contrib/ovmrtg/ovdel
deleted file mode 100644
index 5896273..0000000
--- a/src/contrib/ovmrtg/ovdel
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file controls the deletion of the MRTG monitoring from OV
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovdel,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $company = "Company";
-my $rundir = "/opt/mrtg/run";
-my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";
-my $cronfile = "mrtgc";
-my $roothtml = "routers.html";
-my $ov_conf = "/etc/opt/OV/share/conf";
-my $ovconf = $ov_conf."/snmpCol.conf";
-my $buildhtf = "buildht";
-my $dnsfile = "ovmrtgc.csv";
-
-# Change the next line to " &" if all jobs are to be submitted at once
-my $backgrnd = " ";
-
-my($router,$sysn,$sysncfg,$sysnhtml,$head,$cnt,$at);
-my(@sysipnms,@mrtgc,@mrtgd,@sysnms,@ovconfd,@ovmrtgc,@buildhtt);
-
-sub main {
-
- $router = $ARGV[0];
- die <<USAGE unless $router;
-
-USAGE: ovdel 'router IP ADDRESS/S'
-
-EXAMPLE: ovdel 193.21.1.2 10.21.1.2 10.21.1.1
-
-
-USAGE
- chdir $rundir;
- @sysipnms=`perl ovsysnms @ARGV`;
- chomp(@sysipnms);
-# Figure out what needs not be monitored and change the conf file
- `perl $rundir\/ovcols - @ARGV > collects`;
- `xnmcollect -merge collects`;
-# eventaully HP may decide to remove lines using xnmcollect and then we would
-# not need the following loop:
- open (SNMPCOL,"<".$ovconf);
-# This next piece of code removes any lines in snmpCol.conf that start with XC
- while(<SNMPCOL>){
- if (/^XC /){
- next;
- } else {
- $ovconfd[@ovconfd] = $_;
- }
- }
- close (SNMPCOL);
- open (SNMPCOL,">".$ovconf);
- for ($cnt = 0; $cnt < @ovconfd ; $cnt++){
- print SNMPCOL "$ovconfd[$cnt]";
- }
- close (SNMPCOL);
- `xnmcollect -event`;
-
-# Remove the .cfg and .ok files as no longer needed
- for ($cnt = 0; $cnt < @sysipnms ; $cnt++){
- ($router,$mrtgd[@mrtgd]) = split /\,/, lc($sysipnms[$cnt]);
- unlink($mrtgd[$cnt].".cfg",$mrtgd[$cnt].".ok");
- }
- @mrtgd = sort(@mrtgd);
-
-# Assumes that the mrtgc.csv file is in alpha order
- open (DNSFILE,"<".$dnsfile);
- $at = 0;
- while(<DNSFILE>){
- chomp;
- $head = $_;
- $sysn = lc((split /\,/,$head)[1]);
- if ($sysn gt $mrtgd[$at]) {
- while($at < @mrtgd) {
- if($sysn le $mrtgd[++$at]){last; }
- }
- }
- if (($sysn lt $mrtgd[$at]) || ($at >= @mrtgd)) {
-#keep these lines
- $mrtgc[@mrtgc] = $sysn;
- $ovmrtgc[@ovmrtgc] = $head;
- }
-# }
- }
- close (DNSFILE);
-#Now rebuild the mrtgc.csv file
- open (DNSFILE,">".$dnsfile);
- for ($cnt = 0 ; $cnt < @ovmrtgc ; ++$cnt){
- print DNSFILE "$ovmrtgc[$cnt]\n";
- }
- close (DNSFILE);
-
-#Build the index by keeping the original lines.
- open (BUILDHT,"<".$buildhtf);
- $head = 0;
- $at = 0;
-# This next piece of code assumes that the $buildhtf file is in alpha order
- while(<BUILDHT>){
- chomp;
- if (/index (.*)\.cfg/){
- $sysn = $1;
- $head = $_;
- if ($sysn gt $mrtgd[$at]) {
- while($at < @mrtgd) {
- if($sysn le $mrtgd[++$at]){last; }
- }
- }
- if (($sysn lt $mrtgd[$at]) || ($at >= @mrtgd)) {
- $buildhtt[@buildhtt] = $head;
- }
- }
- }
- close (BUILDHT);
- open (BUILDHT,">".$buildhtf);
- print BUILDHT <<ECHO;
-#This file builds the HTML for each device being monitored
-cd $rundir
-ECHO
- for ($cnt = 0; $cnt < @buildhtt ; $cnt++){
- print BUILDHT "$buildhtt[$cnt]\n";
- }
- close (BUILDHT);
-
- @mrtgc = sort(@mrtgc);
- open (HTMLF,">".$webdir.$roothtml);
- print HTMLF <<ECHO;
-<HTML>
-</HEAD>
-<BODY BGCOLOR="#ffffff">
-<CENTER><H1>$company Router MRTG Traffic Analysis </H1></CENTER>
-
-<SPACER TYPE=VERTICAL SIZE=4>
-<CENTER><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
- <TR VALIGN=top>
- <TD WIDTH=388 ALIGN="CENTER"><FONT FACE="Arial,Helvetica" SIZE=2>
-ECHO
- for ($cnt = 0; $cnt < @mrtgc ; $cnt++){
- $sysn = $mrtgc[$cnt];
- $sysnhtml = $sysn.".html";
- print HTMLF "<A HREF=\"$sysn\/$sysnhtml\">$sysn<\/A><br>\n";
- }
- print HTMLF <<ECHO;
-</FONT>
-</TD>
-</TABLE>
-</BODY>
-</HTML>
-ECHO
- close(HTMLF);
- open (MRTGC,">".$cronfile);
- print MRTGC <<ECHO;
-#This file runs the MRTG for each config /opt/mrtg/run/file
-cd /opt/mrtg/run
-ECHO
- for ($cnt = 0; $cnt < @mrtgc ; $cnt++){
- print MRTGC "perl $rundir\/mrtg $mrtgc[$cnt].cfg $backgrnd\n";
- }
- print MRTGC <<ECHO;
-# Additonal commands could go here! Under NT the next line will not return
-$buildhtf
-# End of rebuild ht file
-ECHO
- close (MRTGC);
-# send to management station
-# (local host unless run from a management console)
-`ovevent "" .1.3.6.1.4.1.11.2.17.1.0.58916873 .1.3.6.1.4.1.11.2.17.2.1.0 Integer 14 .1.3.6.1.4.1.11.2.17.2.2.0 OctetString "$ENV{OVwSessionID}" .1.3.6.1.4.1.11.2.17.2.4.0 OctetString "OVMRTG Delete for @ARGV COMPLETED"`
-}
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/oveval.txt b/src/contrib/ovmrtg/oveval.txt
deleted file mode 100644
index 09abc32..0000000
--- a/src/contrib/ovmrtg/oveval.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-OVMRTG evaluation questions:
-============================
-
-
-What is your name:
-
-What is your company name:
-
-Your E-mail address:
-
-What HPOV platform do you run (Unix/NT & Version):
-
-What types of systems are you monitoring (Manufacturer & Router/Hub..):
-
-How many systems are you monitoring with OVMRTG:
-
-Can you comment on the resource utilisation from OVMRTG and the original MRTG?
-
-Any suggestions for OVMRTG improvements?
-
-What other details might be useful in understanding problems with OVMRTG?
-
-
-===================================
-
-Please E-mail this page to :
-
-net_improvement@hotmail.com
-
diff --git a/src/contrib/ovmrtg/ovin b/src/contrib/ovmrtg/ovin
deleted file mode 100644
index 50612cc..0000000
--- a/src/contrib/ovmrtg/ovin
+++ /dev/null
@@ -1,6 +0,0 @@
-mv cwdrtr1.cfg cwdrtr1.$1
-mv sydrtr2.cfg sydrtr2.$1
-mv sydrtr3.cfg sydrtr3.$1
-mv cwdrtr1.$2 cwdrtr1.cfg
-mv sydrtr2.$2 sydrtr2.cfg
-mv sydrtr3.$2 sydrtr3.cfg
diff --git a/src/contrib/ovmrtg/ovmrtg.pm b/src/contrib/ovmrtg/ovmrtg.pm
deleted file mode 100644
index 7211a70..0000000
--- a/src/contrib/ovmrtg/ovmrtg.pm
+++ /dev/null
@@ -1,402 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# this produces an array of ip address and system names for each
-# ip address passed to it, by pulling info
-# off the device via snmp
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovmrtg.pm,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-package ovmrtg;
-
-use Socket;
-use strict;
-use vars qw(@ISA @EXPORT $VERSION);
-use Exporter;
-
-$VERSION = '0.00';
-
-@ISA = qw(Exporter);
-
-@EXPORT = qw(ovsysnms ovcols);
-
-sub ovsysnms(@);
-sub ovcols(@);
-
-my $DEBUG = 0;
-my($router,$routerip,@res,@result,$cnt);
-my($op,$vendor);
-
-%snmpget::OIDS = ( 'sysDescr' => '1.3.6.1.2.1.1.1.0',
- 'sysContact' => '1.3.6.1.2.1.1.4.0',
- 'sysName' => '1.3.6.1.2.1.1.5.0',
- 'sysLocation' => '1.3.6.1.2.1.1.6.0',
- 'sysUptime' => '1.3.6.1.2.1.1.3.0',
- 'ifNumber' => '1.3.6.1.2.1.2.1.0',
- ###################################
- # add the ifNumber ....
- 'ifDescr' => '1.3.6.1.2.1.2.2.1.2',
- 'ifType' => '1.3.6.1.2.1.2.2.1.3',
- 'ifIndex' => '1.3.6.1.2.1.2.2.1.1',
- 'ifSpeed' => '1.3.6.1.2.1.2.2.1.5',
- 'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8',
- 'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7',
- # up 1, down 2, testing 3
- 'ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1',
- 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2',
- 'sysObjectID' => '1.3.6.1.2.1.1.2.0',
- 'CiscolocIfDescr' => '1.3.6.1.4.1.9.2.2.1.1.28',
- 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18'
- );
-
-sub ovcols(@) {
- my @args = @_;
- my @r;
- $op = $args[0];
- shift @args;
- if ($op eq "+"){
- $op = "C";
- } else {
- $op = "XC";
- }
- while($router=$args[0]){
- my($sysDescr,$sysContact,$sysName,$sysLocation,$ifNumber,$sysObjectID) =
- snmpget($router,
- 'sysDescr','sysContact','sysName', 'sysLocation', 'ifNumber', 'sysObjectID');
-
- my ($sint2mon);
- my $cc = " ";
- $sysDescr =~ s/\r/<BR>/g; # Change returns to <BR>
- my($ciscobox) = ($sysObjectID =~ /cisco/);
- my($portmaster) = ($sysObjectID =~ /livingston/);
- $vendor = ($ciscobox || $portmaster) ;
- my($ifInErrors) = '1.3.6.1.2.1.2.2.1.14';
- my($ifOutErrors) = '1.3.6.1.2.1.2.2.1.20';
-
- my @ipadent = snmpgettable($router, 'ipAdEntAddr');
- print STDERR "Got Addresses\n" if $DEBUG;
- my @ipadentif = snmpgettable($router, 'ipAdEntIfIndex');
- print STDERR "Got IfTable\n" if $DEBUG;
-
- my(%ipaddr, %iphost,$index);
- while (scalar @ipadentif){
- $index = shift @ipadentif;
- $ipaddr{$index} = shift @ipadent;
- $iphost{$index} =
- gethostbyaddr(pack('C4',split(/\./,$ipaddr{$index})), AF_INET);
- if ($iphost{$index} eq ''){
- $iphost{$index} = $ipaddr{$index};
- }
-
- }
-
- my(@ifdescr) = snmpgettable($router, 'ifDescr');
- print STDERR "Got IfDescr\n" if $DEBUG;
- my(@iftype) = snmpgettable($router, 'ifType');
- print STDERR "Got IfType\n" if $DEBUG;
- my(@ifspeed) = snmpgettable($router, 'ifSpeed');
- print STDERR "Got IfSpeed\n" if $DEBUG;
- my(@ifadminstatus) = snmpgettable($router, 'ifAdminStatus');
- print STDERR "Got IfStatus\n" if $DEBUG;
- my(@ifoperstatus) = snmpgettable($router, 'ifOperStatus');
- print STDERR "Got IfOperStatus\n" if $DEBUG;
- my(@ifindex) = snmpgettable($router, 'ifIndex');
- print STDERR "Got IfIndex\n" if $DEBUG;
-
- my(%sifdesc,%siftype,%sifspeed,%sifadminstatus,%sifoperstatus,%sciscodescr);
-
- ### May need the cisco IOS version number so we know which oid to use
- ### to get the cisco description.
- ###
- ### - mjd 2/5/98 (Mike Diehn) (mdiehn@mindspring.net)
- ###
- my ($cisco_ver, $cisco_descr_oid, @ciscodescr);
- if ( $ciscobox ) {
- ($cisco_ver) = ($sysDescr =~ /Version\s+([\d.]+)/);
- $cisco_descr_oid = ($cisco_ver ge "11.3") ? "ifAlias" : "CiscolocIfDescr";
- }
-
- while (scalar @ifindex) {
-
- # as these arrays get filled from the bottom,
- # we need to empty them from the botom as well ...
- # fifo
-
- $index = shift @ifindex;
- $sifdesc{$index} = shift @ifdescr;
- $siftype{$index} = shift @iftype;
- $sifspeed{$index} = shift @ifspeed;
- $sifadminstatus{$index} = shift @ifadminstatus;
- $sifoperstatus{$index} = shift @ifoperstatus;
-
- if ($portmaster) {
- # Trying to extract extra info livingston
- # We can only approximate speeds
- #
- # so we think that ppp can do 76800 bit/s, and slip 38400.
- # (actualy, slip is a bit faster, but usualy users with newer modems
- # use ppp). Alternatively, you can set async speed to 115200 or
- # 230400 (the maximum speed supported by portmaster).
- #
- # But if the interface is ptpW (sync), max speed is 128000
- # change it to your needs. On various Portmasters there are
- # various numbers of sync interfaces, so modify it.
- #
- # The most commonly used PM-2ER has only one sync.
- #
- # Paul Makeev (mac@redline.ru)
- #
-
- if ($siftype{$index} eq 'ppp') {
- if ($sifdesc{$index} eq 'ptpW1') {
- $sifspeed{$index} = 128000;
- } else {
- $sifspeed{$index} = 76800;
- }
- } elsif ($siftype{$index} eq 'slip') {
- $sifspeed{$index} = 38400;
- } elsif ($siftype{$index} eq 'ethernetCsmacd') {
- $sifspeed{$index} = 10000000;
- }
- }
-
- ### Move this section south so we know what type of
- ### circuit we're looking at before we retrieve
- ### the cisco interface alias.
- ###
- ### This whole cicso thing should be re-written, but since
- ### this script doesn't need to run quickly...
- ###
- ### - mjd 2/5/98
- ###
- # Get the user configurable interface description entered in the config
- # if it's a cisco-box
- #
- if ($ciscobox) {
-
- my ($enoid, @descr);
-
- $enoid = $snmpget::OIDS{"$cisco_descr_oid"} . "." . $index;
-
- if ( $cisco_ver ge "11.2" or $siftype{$index} ne 'frame-relay' ) {
-
- ### This is either not a frame-relay sub-interface or
- ### this router is running IOS 11.2+ and interface
- ### type won't matter. In either of these cases, it's
- ### ok to try getting the ifAlias or ciscoLocIfDesc.
- ###
- @descr = snmpget($router, $enoid);
-
- } else {
-
- ### This is a frame-relay sub-interface *and* the router
- ### is running an IOS older than 11.2. Therefore, we can
- ### get neither ifAlias nor ciscoLocIfDesc. Do something
- ### useful.
- ###
- @descr = ("Cisco PVCs descriptions require IOS 11.2+.");
-
- } # end if else
-
- ### Put whatever I got into the array we'll use later to append the result
- ### of this operation onto the results from the ifDescr fetch.
- ###
- push @ciscodescr, shift @descr;
-
- } # end if ($ciscobox)
-
- # especially since cisco does not return a if
- # descr for each interface it has ...
- ## JB 2/8/97 - sometimes IOS inserts E1 controllers in the standard-MIB
- ## interface table, but not in the local interface table. This puts the
- ## local interface description table out-of-sync. the following
- ## modification skips over E1 cards as interfaces.
- #
- ### I suspect that the mod I made above, to use the ifAlias
- ### oid if possible, may cause problems here. If it seems
- ### that your descriptions are out of sync, try commenting
- ### out the "if ( condition )" and it's closing right brace
- ### so that the "shift @ciscodescr" get executed for *all*
- ### iterations of this loop.
- ###
- ### - mjd 2/5/95
- ###
- if ($ciscobox && $siftype{$index} ne 'ds1') {
- $sciscodescr{$index} = "<BR>" . (shift @ciscodescr) if @ciscodescr;
- }
-}
-
- foreach $index ( sort { $a <=> $b } keys %sifdesc) {
- my $speed = int($sifspeed{$index} / 8); # bits to byte
-# LJG Change to report in Bits
-# my $speed_str=&fmi($speed);
- my $speed_str=&fmi($sifspeed{$index});
- my $name="$router.$index";
- my $namerr="$router.$index.err";
-
- if (($sifadminstatus{$index} ne "up")
-# this check added by Josh - don't query E1-stack controllers
- || ($siftype{$index} eq 'ds1')
- || ($siftype{$index} eq 'softwareLoopback')
- || ($speed == 0 )
-# LJG Change to report all in Bits
-# || ($speed > 400 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($speed > 3200 * 10**6) #speeds of 400 MByte/s are not realistic
- || ($sifoperstatus{$index} eq 'down')
- || (($sifdesc{$index}=~ /Dialer/) && ($ciscobox))) {
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
- }else {
- $sint2mon = $sint2mon .$cc.$index;
- $cc = ",";
- }
- }
- if ($ciscobox){
- $r[@r]="MIB .1.3.6.1.4.1.9.2.1.58 avgBusy5 units INTEGER R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 ALL -";
- }
- $r[@r]="MIB .1.3.6.1.2.1.1.3 sysUpTime units TIMETICKS R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 ALL -";
- $r[@r]="MIB .1.3.6.1.2.1.2.2.1.10 IfInOctets units/sec COUNTER R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 LIST $sint2mon";
- $r[@r]="MIB .1.3.6.1.2.1.2.2.1.16 IfOutOctets units/sec COUNTER R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 LIST $sint2mon";
- $r[@r]="MIB .1.3.6.1.2.1.2.2.1.14 IfInErrors units/sec COUNTER R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 LIST $sint2mon";
- $r[@r]="MIB .1.3.6.1.2.1.2.2.1.20 IfOutErrors units/sec COUNTER R";
- $r[@r]="$op $router .1.3.6.1.* 300 > 0 1 <= 0 1 xA s 58720263 LIST $sint2mon";
- shift @args;
- }
- return (@r);
-}
-
-sub snmpgettable{
- my($host,$var) = @_;
- my($next_oid,$enoid,$orig_oid,
- $response, $bindings, $binding, $t1, $t2,$outoid,
- $upoid,$oid,@table,$tempo);
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var};
-
- $orig_oid = $snmpget::OIDS{$var}." ";
- $enoid=$orig_oid;
- open(SNMPG, "snmpwalk $host $orig_oid |");
-# print STDERR $orig_oid;
- while ($tempo =<SNMPG>){
-# print STDERR $tempo;
- ($t1, $t2, $tempo ) = split /:/ , $tempo ,3;
- if (!$tempo){
- if ($t2){
- $t1 = $t1 .":".$t2;
- }
- $tempo = pop(@table)." ".$t1 ;
- }
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @table, $tempo;
-
- }
- close (SNMPG);
- return (@table);
-}
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
-# LJG Change to report in Bits
-# @short = ("Bytes/s","kBytes/s","MBytes/s","GBytes/s");
- @short = ("Bits/s","kBits/s","MBits/s","GBits/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 3) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
-
-sub ovsysnms (@){
-my @args = @_;
- while($router = $args[0]){
- my($sysName)= snmpget($router, 'sysName');
-### The next three lines can be deleted once Someone gives this box a name
-
- if ($router eq '10.26.254.1') {
- $sysName = 'nrgiga';
- }
- if ($sysName eq ""){
- $sysName = $router;
- }
-# $sysName =~ tr/[A-Z]/[a-z]/;
-# Don't like to do it this way but...
-# @res=`ovtopodump $router`;
-# for ($cnt = 0 ; $cnt < @res; $cnt++){
-# $_ = $res[$cnt];
-# if (/IP ADDR: (.*)/){
- @res=`ping $router -n 1`;
- for ($cnt = 0 ; $cnt < @res; $cnt++){
- $_ = $res[$cnt];
- if (/from (.*):.*/) {
- $routerip = $1;
- last;
- }
- }
- @res= `ovobjprint -a "IP Hostname" "SNMP sysName"=$sysName`;
- $_ = $res[4];
- if(!/NO FIELD VALUES FOUND/){
- ($router) = ($res[4] =~ m@\"(.*)\"@ );
- }
- $result[@result]= $routerip."\,".$sysName."\,".$router;
- shift @args;
- }
- return @result;
-}
-
-sub snmpget{
- my($host,@vars) = @_;
- my(@enoid, $var,$response, $bindings, $binding, $value, $inoid,$outoid,
- $upoid,$oid,@retvals,$t1,$t2,@resp,$tempo);
- my($hackcisco);
- foreach $var (@vars) {
- die "Unknown SNMP var $var\n"
- unless $snmpget::OIDS{$var} || $var =~ /^\d+[\.\d+]*\.\d+$/;
- if ($var =~ /^\d+[\.\d+]*\.\d+/) {
- $value = $value.$var." ";
- $hackcisco = 1;
- } else {
- $value = $value.$snmpget::OIDS{$var}." ";
- $hackcisco = 0;
- }
- }
- open(SNMPG, "snmpget $host $value |");
- while ($tempo =<SNMPG>){
- ($t1, $t2, $tempo ) = split /:/ , $tempo, 3;
- if (!$tempo){
- if ($t2){
- $t1 = $t1 .":".$t2;
- }
- $tempo = pop(@retvals)." ".$t1 ;
- }
- $tempo=~s/\t/ /g;
- $tempo=~s/\n/ /g;
- $tempo=~s/^\s+//;
- $tempo=~s/\s+$//;
- push @retvals, $tempo;
- }
- close (SNMPG);
- return (@retvals);
-}
-1;
-
diff --git a/src/contrib/ovmrtg/ovsho b/src/contrib/ovmrtg/ovsho
deleted file mode 100644
index ce0b919..0000000
--- a/src/contrib/ovmrtg/ovsho
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file controls the creation of all the MRTG config files from OV
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# See newrtrov.txt for a description of what is performed
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovsho,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $rundir = "/opt/mrtg/run";
-my $dnsfile = "ovmrtgc.csv";
-
-my($line,@sysnms);
-
-sub main {
-
- chdir $rundir;
-
- open (DNSFILE,"<".$dnsfile);
- while(<DNSFILE>){
- chomp;
- $line = $_;
- $sysnms[@sysnms]= (split /\,/,$line)[2];
- }
- close (DNSFILE);
- `ovtgts $ENV{OVwSessionID} @sysnms`;
-
-}
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/ovsysnms b/src/contrib/ovmrtg/ovsysnms
deleted file mode 100644
index 33b265b..0000000
--- a/src/contrib/ovmrtg/ovsysnms
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# Config file creator
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# this produces an array of ip address and system names for each
-# ip address passed to it, by pulling info
-# off the device via snmp
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovsysnms,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use ovmrtg;
-use vars '$DEBUG';
-my $DEBUG = 0;
-
-
-my($router,@res,$cnt);
-
-sub main {
-
- $router = $ARGV[0];
- die <<USAGE unless $router;
-
-USAGE: ovsysnms 'router IP ADDRESS/S or HPOV selection Names'
-
-EXAMPLE: ovsysnms 193.21.1.2 >> resolved
-
-
-USAGE
- @res = ovsysnms(@ARGV);
- for($cnt = 0 ; $cnt < @res; ++$cnt){
- print "$res[$cnt]\n";
- }
-}
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/ovtgts b/src/contrib/ovmrtg/ovtgts
deleted file mode 100755
index 1d31fac..0000000
--- a/src/contrib/ovmrtg/ovtgts
+++ /dev/null
Binary files differ
diff --git a/src/contrib/ovmrtg/ovtst b/src/contrib/ovmrtg/ovtst
deleted file mode 100644
index 104d140..0000000
--- a/src/contrib/ovmrtg/ovtst
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file controls the creation of all the MRTG config files from OV
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# See newrtrov.txt for a description of what is performed
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovtst,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $webdir = "/var/opt/ns-fasttrack/docs/mrtg/";
-my $rundir = "/opt/mrtg/run";
-my $testout = "test.out";
-my $roothtml = "routers.html";
-
-my($router,$sysn,$sysncfg,$sysnhtml,$cnt,@sysipnms,@mrtgc,@sysnms);
-
-sub main {
-
- chdir $rundir;
- @sysnms=%ENV;
- chomp(@sysipnms);
- open (MRTGC,">".$testout);
- for ($cnt = 0; $cnt < @sysnms ; $cnt++){
- print MRTGC "$sysnms[$cnt]\n";
- }
- close (MRTGC);
- }
-main;
-exit(0);
-
diff --git a/src/contrib/ovmrtg/ovupdate b/src/contrib/ovmrtg/ovupdate
deleted file mode 100644
index 748119d..0000000
--- a/src/contrib/ovmrtg/ovupdate
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/local/bin/perl5
-# -*- mode: Perl -*-
-##################################################################
-# This file controls the creation of all the MRTG config files from OV
-##################################################################
-# Created by Laurie Gellatly <gellatly@one.net.au>
-# See newrtrov.txt for a description of what is performed
-#################################################################
-#
-# Distributed under the GNU copyleft
-#
-# $Id: ovupdate,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
-#
-use Socket;
-use strict;
-use ovmrtg;
-use vars '$DEBUG';
-my $DEBUG = 0;
-my $rundir = "/opt/mrtg/run";
-my $cronfile = "mrtgc";
-my $dnsfile = "ovmrtgc.csv";
-
-
-my($sysncfg,$cnt);
-my(@sysipnms,@sysips,@mrtgc,@sysnms);
-
-sub main {
-
- chdir $rundir;
- $cnt = 0;
- open (MRTGC,"<".$cronfile);
- while(<MRTGC>){
- chomp;
- if (/mrtg (.*)\.cfg/){
- $mrtgc[@mrtgc] = $1;
- }
- }
- close (MRTGC);
- @mrtgc = sort(@mrtgc);
- for($cnt=0;$cnt<@mrtgc;++$cnt){
- $sysncfg=$mrtgc[$cnt].".cfg";
- open (MRTGC,"<".$sysncfg);
- while(<MRTGC>){
- if (/^Target/){
- if (/^Target.*ovcvtfile ([0-9\.]*)/){
- $sysips[@sysips] = $1;
- last;
- }
- if (/^Target.*\@([0-9\.]*)/){
- $sysips[@sysips] = $1;
- last;
- }
- }
- }
- close (MRTGC);
- }
- @sysipnms=ovsysnms @sysips;
-
- open (DNSFILE,">".$dnsfile);
- for ($cnt = 0; $cnt < @sysipnms ; $cnt++){
-# $sysipnms[$cnt] =~ s/ /,/;
- print DNSFILE "$sysipnms[$cnt]\n";
- }
- close (DNSFILE);
-}
-main;
-exit(0);
-
diff --git a/src/contrib/ping-probe/README b/src/contrib/ping-probe/README
deleted file mode 100644
index 6021390..0000000
--- a/src/contrib/ping-probe/README
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Peter W. Osel <pwo@mc.hl.siemens.de>
-To: Tobias Oetiker <oetiker@ee.ethz.ch>
-Date: Wed, 9 Dec 1998 16:19:18 -0800
-Subject: mrtg distribution and mrtg-ping-probe
-
-Tobi,
-
-to prevent people from using older versions of mrtg-ping-probe,
-could you use the latest version for your next release
-( ftp://ftp.pwo.de/pub/pwo/mrtg/)
-or maybe even removeit from the current distribution of mrtg
-and just add a README file in the contrib directory or so.
-
-Cheers
- --pwo
-
---
-Peter W. Osel Sr. Network Systems Administrator
-Siemens Microelectronics, Inc. Email: pwo@SMI.Siemens.COM
-10950 North Tantau Avenue Phone: +1 (408) 895 5050
-Cupertino, CA 95014 Fax: +1 (408) 895 5020
-USA WWW: http://www.AgiX.NET/~pwo/
diff --git a/src/contrib/portmasters/README b/src/contrib/portmasters/README
deleted file mode 100644
index 6e16ce2..0000000
--- a/src/contrib/portmasters/README
+++ /dev/null
@@ -1,22 +0,0 @@
-From admin@nantucket.net Mon Mar 10 06:15:36 1997
-Date: Wed, 05 Mar 1997 14:22:55 -0500
-From: Chris Johnson <admin@nantucket.net>
-Subject: MRTG for portmasters
-
-Hey Tobias,
-
- I was fooling around with your wonderful program and I ended up
-hacking out a script and config to produce Modem statistics for Livingston
-Portmasters. You can see the results at
-http://www.nantucket.net/users/admin/pmgraph/ if you're interested . I've
-enclosed my work here since, maybe you can post it somewhere and save other
-Portmaster owners some work.
-
- Your Nantucket postcard is on it's way!
-
-
-=====================================================
-Chris Johnson
-admin@nantucket.net
-=====================================================
-
diff --git a/src/contrib/portmasters/gather b/src/contrib/portmasters/gather
deleted file mode 100644
index 69ab319..0000000
--- a/src/contrib/portmasters/gather
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/csh
-
-# run this script ever 5 minutes via cron with a crontab something like:
-# 1,6,11,16,21,26,31,36,41,46,51,56 * * * * /home/admin/pmgraph/bin/getstats
-# note that this script calls MRTG
-
-# set the names or IP's of your Portmasters
-set Portmaster1="sconset.nantucket.net"
-set Portmaster2="scallop.nantucket.net"
-set Portmaster3="surfside.nantucket.net"
-
-# set the SNMP read community of your Portmasters
-set P1comm="public"
-set P2comm="public"
-set P3comm="public"
-
-# Grab a user count for each Portmaster via the snmpwalk command
-# You may need to use "snmpwalk -v 1" depending on your version of snmpwalk
-# You may also need to grep for something other than "23"
-set PM1=`snmpwalk $Portmaster1 $P1comm
-interfaces.ifTable.ifEntry.ifType|grep 23 |wc -l`
-set PM2=`snmpwalk $Portmaster2 $P2comm
-interfaces.ifTable.ifEntry.ifType|grep 23 |wc -l`
-set PM3=`snmpwalk $Portmaster3 $P3comm
-interfaces.ifTable.ifEntry.ifType|grep 23 |wc -l`
-
-# Get a grand total of users online
-@ TOTAL=$PM1 + $PM2 + $PM3
-
-# MRTG needs 4 lines of input to be happy, we're only interested in the 2nd
-# line and possibly the first so we fill the others with junk
-
-# write out the various logs
-# grand total of all your Portmasters
- echo "0" > /home/admin/pmgraph/bin/pmgrand
- echo $TOTAL >> /home/admin/pmgraph/bin/pmgrand
- echo "0" >> /home/admin/pmgraph/bin/pmgrand
- echo "0" >> /home/admin/pmgraph/bin/pmgrand
-
-# Portmaster #1
- echo "0" > /home/admin/pmgraph/bin/pm1-log
- echo $PM1 >> /home/admin/pmgraph/bin/pm1-log
- echo "time" >> /home/admin/pmgraph/bin/pm1-log
- echo "pm1" >> /home/admin/pmgraph/bin/pm1-log
-
-# Portmaster #2
- echo "0" > /home/admin/pmgraph/bin/pm2-log
- echo $PM2 >> /home/admin/pmgraph/bin/pm2-log
- echo "time" >> /home/admin/pmgraph/bin/pm2-log
- echo "pm2" >> /home/admin/pmgraph/bin/pm2-log
-
-# Portmaster #3
- echo "0" > /home/admin/pmgraph/bin/pm3-log
- echo $PM3 >> /home/admin/pmgraph/bin/pm3-log
- echo "time" >> /home/admin/pmgraph/bin/pm3-log
- echo "pm3" >> /home/admin/pmgraph/bin/pm3-log
-
-# and finally, run MRTG specifying our customized .cfg file
-eval `/home/admin/pmgraph/bin/mrtg /home/admin/pmgraph/bin/portmaster.cfg`
diff --git a/src/contrib/portmasters/portm.cfg b/src/contrib/portmasters/portm.cfg
deleted file mode 100644
index 4ef3557..0000000
--- a/src/contrib/portmasters/portm.cfg
+++ /dev/null
@@ -1,70 +0,0 @@
-WorkDir: /home/admin/pmgraph
-Target[portmaster]: `cat /home/admin/pmgraph/bin/pmgrand`
-Title[portmaster]: Modem Traffic for Nantucket.net
-PageTop[portmaster]: <center><H1>Modem Traffic for Nantucket.net</H1></center>
- This page shows the total modem use at Nantucket.net. We currently
-have three Livingston Portmaster terminal servers that each control
-thirty modems, giving us a grand total of 90 dial-in
- lines. We also graph each Portmaster out separately, See:<UL>
- <LI><FONT Size=+2></FONT><A HREF="./sconset.html">Portmaster
-Sconset</A><BR>
- <LI><FONT Size=+2></FONT><A HREF="./scallop.html">Portmaster
-Scallop</A><BR>
- <LI><FONT Size=+2></FONT><A HREF="./surfside.html">Portmaster
-Surfside</A>
- </UL>
-MaxBytes[portmaster]: 90
-AbsMax[portmaster]: 90
-Options[portmaster]: absolute, gauge
-Ylegend[portmaster]: Total lines in use
-RouterUptime[portmaster]:
-ShortLegend[portmaster]: Modems Online
-Unscaled[portmaster]: mwy
-LegendI[portmaster]:
-LegendO[portmaster]: Total
-Legend2[portmaster]: <FONT Size=+2></FONT>Total count of all modems online
-at <A HREF="http://www.Nantucket.net">Nantucket.net</A>
-
-Target[sconset]: `cat /home/admin/pmgraph/bin/pm1-log`
-PageTop[sconset]: <center><H1>Modem Traffic on Portmaster Sconset</H1></center>
-MaxBytes[sconset]: 30
-AbsMax[sconset]: 30
-Options[sconset]: absolute, gauge
-Title[sconset]: Modem Traffic on Portmaster Sconset
-Ylegend[sconset]: Lines in use
-RouterUptime[sconset]:public@sconset.nantucket.net
-ShortLegend[sconset]: Modems Online
-Unscaled[sconset]: dmwy
-LegendI[sconset]:
-LegendO[sconset]: Total
-Legend2[sconset]: Total count of modems used on Portmaster Sconset
-
-Target[scallop]: `cat /home/admin/pmgraph/bin/pm2-log`
-PageTop[scallop]: <center><H1>Modem Traffic on Portmaster Scallop</H1></center>
-MaxBytes[scallop]: 30
-AbsMax[scallop]: 30
-Options[scallop]: absolute, gauge
-Title[scallop]: Modem Traffic on Portmaster Scallop
-Ylegend[scallop]: Lines in use
-RouterUptime[scallop]:public@scallop.nantucket.net
-ShortLegend[scallop]: Modems Online
-Unscaled[scallop]: dmwy
-LegendI[scallop]:
-LegendO[scallop]: Total
-Legend2[scallop]: Total count of modems used on Portmaster Scallop
-
-Target[surfside]: `cat /home/admin/pmgraph/bin/pm3-log`
-PageTop[surfside]: <center><H1>Modem Traffic on Portmaster
-Surfside</H1></center>
-MaxBytes[surfside]: 30
-AbsMax[surfside]: 30
-Options[surfside]: absolute, gauge
-Title[surfside]: Modem Traffic on Portmaster Surfside
-Ylegend[surfside]: Lines in use
-RouterUptime[surfside]:public@surfside.nantucket.net
-ShortLegend[surfside]: Modems Online
-Unscaled[surfside]: dmwy
-LegendI[surfside]:
-LegendO[surfside]: Total
-Legend2[surfside]: Total count of modems used on Portmaster Surfside
-
diff --git a/src/contrib/procmem/README b/src/contrib/procmem/README
deleted file mode 100644
index 54ec259..0000000
--- a/src/contrib/procmem/README
+++ /dev/null
@@ -1,83 +0,0 @@
-===============================================
-Cisco CPU & Memory monitoring
-===============================================
-by Dimitrios Stergiou <dste@intranet.gr>
-
-Contents
---------
-
-MRTG Libraries:
- BER.pm
- MRTG_lib.pm
- SNMP_Session.pm
- SNMP_util.pm
- locales_mrtg.pl
-
-mrtg.cfg creators:
- create-cfg-mem.pl
- create-cfg-proc.pl
-
-actual mrtg scripts:
- getproc.pl
- getmem.pl
-
- Quick Installation
-------------
-
-1. Copy getmem.pl and getproc.pl to an appropriate location. Perhaps, in the dir you have the MRTG binary
-
-2. Edit both scripts and change the line:
- use lib "/home/alexander1/dste/cisco";
- make it point to the lib dir on the directory you have the mrtg distribution
-
-3. Edit create-cfg-mem.pl and create-cfg-proc.pl and change the line:
- Target[$target]: `/home/alexander1/dste/cisco/getmem.pl $ARGV[0] $pool`
- make it point to the executable you installed on step 1
-
-4. Run create-cfg-mem.pl to create a conf file for mrtg. Use:
- create-cfg-mem.pl router_to_poll > memory.cfg
-
-5. Run create-cfg-proc.pl to create a conf file for mrtg. Use:
- create-cfg-proc.pl router_to_poll > proc.cfg
-
-6. Run MRTG with the configuration files generated above
-
-Usage
------
-
-1) Memory monitoring:
-Cisco routers use memory pools to allocate memory to various subsystems. The only mandatory subsystem is "Processor". Additionaly you may have "PCI", "I/O",etc.
-
-create-cfg-mem.pl will query the router about its memory pools, find out how many pools the router uses, and create a configuration file that will monitor all pools found.
-
-In order for the graph to be drawn, we need a MaxBytes value. This value is acquired from the router, using the following formula:
-
-foreach pool on the router {
- MaxBytes = memory used for pool + memory free for pool
-}
-
-If you sum up all the pools (MaxBytes value) you will find that the sum is less than the physical memory of your router. I suppose, that the part we are missing is filled by the IOS.
-
-References:
-http://www.cisco.com/public/mibs/v2/CISCO-MEMORY-POOL-MIB.my
-
-2) CPU Utilization monitoring:
-create-cfg-proc.pl will create a configuration file used to monitor the following 3 variables on a Cisco router:
-- cpmCPUTotal5sec
-- cpmCPUTotal1min
-- cpmCPUTotal15min
-
-Unfortunately, this feature seems to work only on 12.0(x)T IOS, so if it doesn't work on your router, dont blame me. The script will try to find out if your router is capable of returning values about its processor usage though.
-
-References:
-http://www.cisco.com/public/mibs/v2/CISCO-PROCESS-MIB.my
-
-
-----
-I hope this is as useful to you as it has been to me. If you have any
-problems/bug reports/advice/complaints, email me.
-
-Enjoy.
-
-Dimitrios Stergiou
-<dste@intranet.gr>
diff --git a/src/contrib/procmem/create-cfg-mem.pl b/src/contrib/procmem/create-cfg-mem.pl
deleted file mode 100755
index 537b228..0000000
--- a/src/contrib/procmem/create-cfg-mem.pl
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/perl
-
-#-----------------------------------------------
-# Query a router about its memory pools and create MRTG cfg file for the pools
-#
-# Author: Dimitrios Stergiou <dste@intranet.gr> , 25/10/00
-# Version : 1.0
-#
-# Usage: ./create-cfg-mem.pl cisco_hostname
-#
-# 1.0 Initial version, basic functionality
-#-----------------------------------------------
-
-# Import libraries
-use lib "/home/alexander1/dste/cisco";
-use MRTG_lib "2.090006";
-use SNMP_Session "0.77";
-use BER "0.77";
-use SNMP_util "0.77";
-use locales_mrtg "0.07";
-
-# Suppress warnings
-$SNMP_Session::suppress_warnings = 3;
-
-# Locate how many memory pools the router has
-for ($i = 1; $i <= 5; $i++) {
- $command = snmpget($ARGV[0], "enterprises.9.9.48.1.1.1.2.$i");
- if ($command eq "1") { push @pools, $i; }
-}
-
-# loop through pools and find
-# 1) pool names
-# 2) pool usage
-# 3) pool availability
-# maximum pool capacity is defined as: PoolSizeUsed + PoolSizeFree
-
-foreach $pool (@pools) {
- @memtype = snmpget($ARGV[0], "enterprises.9.9.48.1.1.1.2.$pool");
- if ($memtype[0] eq "I/O") { $memtype[0]="IO"; }
- $target = "$ARGV[0]"."_"."$memtype[0]";
-
- @pu = snmpget($ARGV[0], "enterprises.9.9.48.1.1.1.5.$pool");
- @pf = snmpget($ARGV[0], "enterprises.9.9.48.1.1.1.6.$pool");
-
- $maxbytes = $pu[0]+$pf[0];
-
-print<<EOF
-Target[$target]: `/home/alexander1/dste/cisco/getmem.pl $ARGV[0] $pool`
-Title[$target]: $nname memory used
-MaxBytes[$target]: $maxbytes
-Unscaled[$target]: dwmy
-PageTop[$target]: <H1> $nname memory used </H1>
-Suppress[$target]: y
-LegendI[$target]: kbytes used
-LegendO[$target]:
-Legend1[$target]: kbytes used
-Legend2[$target]:
-YLegend[$target]: kbytes used
-ShortLegend[$target]: used
-Options[$target]: gauge,growright
-
-# ===================================
-EOF
-}
diff --git a/src/contrib/procmem/create-cfg-proc.pl b/src/contrib/procmem/create-cfg-proc.pl
deleted file mode 100755
index 205abaa..0000000
--- a/src/contrib/procmem/create-cfg-proc.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl
-
-#-----------------------------------------------
-# Create mrtg.cfg for CPU processor usage
-#
-# Author: Dimitrios Stergiou <dste@intranet.gr> , 25/10/00
-# Version : 1.0
-#
-# Usage: ./create-cfg-proc.pl cisco_hostname
-#
-# 1.0 Initial version, basic functionality
-# 1.1 Check if router supports functionality
-#-----------------------------------------------
-
-# Import libraries
-use lib "/home/alexander1/dste/cisco";
-use MRTG_lib "2.090006";
-use SNMP_Session "0.77";
-use BER "0.77";
-use SNMP_util "0.77";
-use locales_mrtg "0.07";
-
-# Suppress warnings
-$SNMP_Session::suppress_warnings = 3;
-
-# Define processor counters
-@counters=("5sec", "1min", "15min");
-
-# Check if router can support CPU proccess MIB
-# Just poll a "5 sec" valur, for CPU 1, if we get answer it works
-@test = snmpget($ARGV[0], "enterprises.9.9.109.1.1.1.1.3.1");
-die "Processor util poll doesn't work for router $ARGV[0] $!\n" unless ($test[0]=~/[0-9]/);
-
-# loop through processor counters
-foreach $counter (@counters) {
- $target = "$ARGV[0]"."_"."$counter";
- if ($counter eq "5sec") { $instance=3; }
- if ($counter eq "1min") { $instance=4; }
- if ($counter eq "15min") { $instance=5; }
-
-print<<EOF
-Target[$target]: `/home/alexander1/dste/cisco/getproc.pl $ARGV[0] $instance`
-Title[$target]: $counter processor usage
-MaxBytes[$target]: 100
-Unscaled[$target]: dwmy
-PageTop[$target]: <H1> $counter processor usage </H1>
-Suppress[$target]: y
-LegendI[$target]: %
-LegendO[$target]:
-Legend1[$target]: %
-Legend2[$target]:
-YLegend[$target]: %
-ShortLegend[$target]: used
-Options[$target]: gauge,growright
-
-# ===================================
-EOF
-}
diff --git a/src/contrib/procmem/getmem.pl b/src/contrib/procmem/getmem.pl
deleted file mode 100755
index e117252..0000000
--- a/src/contrib/procmem/getmem.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/perl
-
-#-----------------------------------------------
-# Return memory usage for a specific Cisco memory pool
-#
-# Author: Dimitrios Stergiou <dste@intranet.gr> , 25/10/00
-# Version : 1.0
-#
-# Usage: ./getmem.pl cisco_hostname memory_pool
-#
-# 1.0 Initial version, basic functionality
-#-----------------------------------------------
-
-# Import libraries
-use lib "/usr/local/mrtg/lib/mrtg2";
-use MRTG_lib "2.090006";
-use SNMP_Session "0.77";
-use BER "0.77";
-use SNMP_util "0.77";
-use locales_mrtg "0.07";
-
-# Query public community on router, return memory used in current pool
-@command = snmpget($ARGV[0], "enterprises.9.9.48.1.1.1.5.$ARGV[1]");
-print @command[0];
diff --git a/src/contrib/procmem/getproc.pl b/src/contrib/procmem/getproc.pl
deleted file mode 100755
index 8bfddad..0000000
--- a/src/contrib/procmem/getproc.pl
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-
-#-----------------------------------------------
-# Return processor usage, for a specifig time range (5sec, 1min, 15min)
-#
-# Author: Dimitrios Stergiou <dste@intranet.gr> , 26/10/00
-# Version : 1.0
-#
-# Usage: ./getproc.pl cisco_hostname time_range
-# time_range can be:
-# 3 (The overall CPU busy percentage in the last 5 secs)
-# 4 (The overall CPU busy percentage in the last 1 mins)
-# 5 (The overall CPU busy percentage in the last 15 mins)
-#
-# 1.0 Initial version, basic functionality
-#-----------------------------------------------
-
-# Import libraries
-use lib "/usr/local/mrtg/lib/mrtg2";
-use MRTG_lib "2.090006";
-use SNMP_Session "0.77";
-use BER "0.77";
-use SNMP_util "0.77";
-use locales_mrtg "0.07";
-
-# Query public community on router, return proc usage for specific time range
-@command = snmpget($ARGV[0], "enterprises.9.9.109.1.1.1.1.$ARGV[1].1");
-print @command[0];
diff --git a/src/contrib/rdlog2/rdlog2.c b/src/contrib/rdlog2/rdlog2.c
deleted file mode 100755
index e43ea95..0000000
--- a/src/contrib/rdlog2/rdlog2.c
+++ /dev/null
@@ -1,818 +0,0 @@
-/****************************************************************/
-/* */
-/* rdlog2.c (see readme.html for program explanation */
-/* */
-/* author : Philippe Simonet, sip00@vg.swissptt.ch */
-/* */
-/* change log : */
-/* */
-/* v. 1.00 : initial update (SIP) (02.12.97 */
-/* */
-/* */
-/* */
-
-
-/************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <time.h>
-#include "gd.h"
-#include "gdfonts.h"
-
-#define FALSE 0
-#define TRUE 1
-
-#define TEXT 1
-#define RECT 2
-#define POLY 3
-#define COLOR 4
-#define COLORDEF 5
-#define LINK 6
-#define COMPOUND 7
-#define ENDCOMPOUND 8
-#define GIFAREA 9
-#define URL 10
-#define IN 11
-#define OUT 12
-#define INOUT 13
-#define UNKNOWN 99
-
-
-#ifndef max
- #define max(a,b) ((a)>(b))?(a):(b)
-#endif
-
-#ifndef min
- #define min(a,b) ((a)<(b))?(a):(b)
-#endif
-
-
-int colorratetable[256];
-
-int colortable[256] = {
- 0x000000, /* 0 BLACK */
- 0xff0000, /* 1 BLUE */
- 0x00ff00, /* 2 GREEN*/
- 0xffff00, /* 3 CYAN */
- 0x0000ff, /* 4 RED */
- 0xff00ff, /* 5 MAGENTA */
- 0x00ffff, /* 6 YELLOW */
- 0xffffff, /* 7 WHITE */
- 0x900000, /* 8 Blue4 */
- 0xb00000, /* 9 Blue3 */
- 0xd00000, /* 10 Blue2 */
- 0xffce87, /* 11 LtBlue */
- 0x009000, /* 12 Green4 */
- 0x00b000, /* 13 Green3 */
- 0x00d000, /* 14 Green2 */
- 0x909000, /* 15 Cyan4 */
- 0xb0b000, /* 16 Cyan3 */
- 0xd0d000, /* 17 Cyan2 */
- 0x000090, /* 18 Red4 */
- 0x0000b0, /* 19 Red3 */
- 0x0000d0, /* 20 Red2 */
- 0x900090, /* 21 Magenta4 */
- 0xb000b0, /* 22 Magenta3 */
- 0xd000d0, /* 23 Magenta2 */
- 0x003080, /* 24 Brown4 */
- 0x0040a0, /* 25 Brown3 */
- 0x0060c0, /* 26 Brown2 */
- 0x8080ff, /* 27 Pink4 */
- 0xa0a0ff, /* 28 Pink3 */
- 0xc0c0ff, /* 29 Pink2 */
- 0xe0e0ff, /* 30 Pink */
- 0x00d7ff /* 31 gold */
-};
-
-/************************************************************************/
-/* each of these entry contain the description of a graphical object */
-struct sentry {
- int type; /* text, line, link, poly */
- int depth; /* order in which it appears */
- char * str; /* log file name, url, text */
- int maxrate; /* max xfer rate */
- int rate; /* max xfer rate */
- int orientation; /* text orientation, ... */
- int color; /* color */
- int fillcolor; /* color */
- int colorindex; /* color index */
- int npoints; /* fig size */
- int * coords; /* coordinates list */
- struct sentry * next; /* next entry */
-};
-
-int xsize, ysize, rounds, xoffset, yoffset;
-struct sentry * pfirstentry, *pcurrententry, *pareaentry;
-
-/************************************************************************/
-/* analyze command-line options */
-static int optind = 0; /* Global argv index. */
-static char *scan = NULL; /* Private scan pointer. */
-static int scale = 15;
-
-int getopt1( int argc, char *argv[], char *optstring, char ** optarg )
-{
- int c; /* return value */
- char *place;
- char *index();
-
- *optarg = NULL;
-
- /* check argument validity */
- if (scan == NULL || *scan == '\0') {
- if (optind == 0) optind++;
- if (optind >= argc) return EOF;
- place = argv[optind];
- if (place[0] != '-' || place[1] == '\0') return EOF;
- optind++;
- if (place[1] == '-' && place[2] == '\0') return EOF;
- scan = place+1;
- }
-
- c = *scan++; /* get option character */
- place = strchr(optstring, c);
- if (place == NULL || c == ':') return '?';
-
-
- /* set optarg if needed */
- if (*++place == ':') {
- if (*scan != '\0') {
- *optarg = scan; scan = NULL;
- } else {
- *optarg = argv[optind], optind++;
- }
- }
- return c;
-}
-
-/************************************************************************/
-/* computes a traffic in % by reading 'rounds' lines in a MRTG log file */
-/* currently, it takes the maximum of the In or OUT traffic. */
-void read_entry ( struct sentry * pentry) {
-
- FILE * logf;
- int i, j=0, k=0;
-
- logf = fopen ( pentry->str, "r" );
- if ( pentry->maxrate == 0 ) {
- fprintf ( stderr, "Max rate for %s is null.\n", pentry->str );
- return;
- }
-
- if ( logf != NULL ) {
- fscanf(logf, "%*d %d %d", &j, &k); /* get first line */
-
- for ( i = 0; i < rounds; i ++ ) { /* computes mean */
- fscanf(logf, "%*d %d %d %*d %*d", &j, &k); /* get line */
- /*printf(" - [%d %d]\n", j, k);*/
- switch (pentry->orientation) {
- case IN:
- pentry->rate += j;
- break;
- case OUT:
- pentry->rate += k;
- break;
- default:
- if ( j > k ) pentry->rate += j;
- else pentry->rate += k;
- break;
- }
- }
- /* computes the rate 0-9 */
- pentry->rate = pentry->rate / rounds;
- /*printf ( "%s : %u, %u.\n", pentry->str, (pentry->maxrate*100)/pentry->maxrate, (pentry->rate*10)/pentry->maxrate );*/
- pentry->rate = (pentry->rate * 10) / pentry->maxrate;
- if ( pentry->rate > 9 ) pentry->rate = 9;
- if ( pentry->rate < 0 ) pentry->rate = 0;
- fclose ( logf );
- } else {
- fprintf ( stderr, "Cannot open file %s.\n", pentry->str );
- };
-}
-
-/************************************************************************/
-/* in case of trouble ... */
-void print_error ( void )
-{
- fprintf ( stderr, "Read mrtg configuration files and convert them in gif format.\n" );
- fprintf ( stderr, "Use :\n" );
- fprintf ( stderr, " rdlog -i cfile -o gfile [-m mapfile] -r rounds\n" );
- fprintf ( stderr, " ifile : input fig file name,\n" );
- fprintf ( stderr, " gfile : output gif file (will be overwritten),\n" );
- fprintf ( stderr, " mapfile : output map file (optional, will be overwritten),\n" );
- fprintf ( stderr, " rounds : number of 5 min intervals to take.\n" );
-}
-
-/************************************************************************/
-/* free an 'entry' variable */
-void free_entry (struct sentry * pentry) {
- if ( pentry!= NULL ) {
- if ( pentry->str != NULL ) free(pentry->str); pentry->str = NULL;
- if ( pentry->coords != NULL ) free(pentry->coords); pentry->coords = NULL;
- free(pentry);
- }
-}
-
-
-/************************************************************************/
-/* print an entry for debug purpose */
-void print_entry (struct sentry * pentry) {
-
- printf ( "Entry : " );
- if ( pentry->str != NULL ) printf ( "str '%s' ", pentry->str );
- printf ( ".\n type %i, maxrate %i, orientation %i, npoints %i, color %i, depth %i.\n",
- pentry->type,pentry->maxrate,pentry->orientation,pentry->npoints,pentry->color,pentry->depth );
-}
-
-/************************************************************************/
-int new_entry( void ) {
-
- struct sentry * pentry;
-
- if ( ( pentry = malloc ( sizeof (struct sentry) )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- return ( FALSE );
- }
-
- if ( pfirstentry == NULL ) {
- pfirstentry = pentry;
- } else {
- pcurrententry->next = pentry;
- }
-
- pentry->type = UNKNOWN;
- pentry->str = NULL;
- pentry->maxrate = 0;
- pentry->rate = 0;
- pentry->orientation = 0;
- pentry->color = 0;
- pentry->fillcolor = 0;
- pentry->depth = 0;
- pentry->colorindex = 0;
- pentry->npoints = 0;
- pentry->coords = NULL;
- pentry->next = NULL;
-
- pcurrententry = pentry;
-
-return ( TRUE );
-}
-
-
-/************************************************************************/
-#define r(color) ((color&0x0000ff)>>0)
-#define g(color) ((color&0x00ff00)>>8)
-#define b(color) ((color&0xff0000)>>16)
-#define rgb(color) ((color&0x0000ff)>>0),((color&0x00ff00)>>8),((color&0xff0000)>>16)
-
-/************************************************************************/
-/* build a color or find the nearest color in the color table */
-int find_color ( gdImagePtr graph, int color ) {
- int i_col;
-
- if ( (i_col = gdImageColorExact(graph,r(color), g(color), b(color))) == -1 ) {
- if ( (i_col = gdImageColorAllocate(graph,r(color), g(color), b(color))) == -1 ) {
- i_col = gdImageColorClosest(graph,r(color), g(color), b(color));
- }
- }
- return (i_col);
-}
-
-
-/************************************************************************/
-/* draw the gif file, based on the tentry desciption */
-void draw_gif ( FILE * gif )
-{
- #define c_blank 245,245,245 /* base colors */
- #define c_light 194,194,194
- #define c_dark 100,100,100
- #define c_black 0,0,0
- #define c_white 255,255,0
-
- gdImagePtr graph;
- int i_light,i_dark,i_blank, i_black, i_white;
- int bkcolor;
-
- graph = gdImageCreate(xsize, ysize);
-
- /* the first color allocated will be the background color. */
- bkcolor = colortable[pareaentry->fillcolor];
- i_blank = gdImageColorAllocate(graph,rgb(bkcolor));
- i_light = gdImageColorAllocate(graph,c_light);
- i_dark = gdImageColorAllocate(graph,c_dark);
-
- gdImageInterlace(graph, 1);
-
- i_black = gdImageColorAllocate(graph,c_black);
- i_white = gdImageColorAllocate(graph,c_white);
-
- /* draw the image border */
- gdImageLine(graph,0,0,xsize-1,0,i_light);
- gdImageLine(graph,1,1,xsize-2,1,i_light);
- gdImageLine(graph,0,0,0,ysize-1,i_light);
- gdImageLine(graph,1,1,1,ysize-2,i_light);
- gdImageLine(graph,xsize-1,0,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,0,ysize-1,xsize-1,ysize-1,i_dark);
- gdImageLine(graph,xsize-2,1,xsize-2,ysize-2,i_dark);
- gdImageLine(graph,1,ysize-2,xsize-2,ysize-2,i_dark);
-
- { /* date the graph */
- struct tm *newtime;
- time_t aclock;
- time( &aclock ); /* Get time in seconds */
- newtime = localtime( &aclock ); /* Convert time to struct */
- /* tm form */
-
- gdImageString(graph, gdFontSmall,3,3,asctime( newtime ),i_dark);
- };
-
-
- while ( 1 ) {
- int i_col, i_col2, depth;
- struct sentry * pentry;
-
- /* find smallest depth */
- pentry = pfirstentry;
- depth = -1;
- while ( pentry != NULL ) {
- if (pentry->depth > depth) {
- depth = pentry->depth;
- pcurrententry = pentry;
- }
- pentry = pentry->next;
- }
- if ( depth == -1 ) break;
- pcurrententry->depth = -1;
-
- /* draw this fig */
- switch ( pcurrententry->type) {
- case RECT:
- i_col = find_color(graph, colortable[pcurrententry->color]);
-
-
- if ( pcurrententry->fillcolor != -1 ) {
-
- i_col2 = find_color(graph, colortable[pcurrententry->fillcolor]);
-
- gdImageFilledRectangle(graph,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->coords[2],
- pcurrententry->coords[3],i_col2);
- }
-
- gdImageRectangle(graph,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->coords[2],
- pcurrententry->coords[3],i_col);
- break;
- case TEXT:
- i_col = find_color(graph, colortable[pcurrententry->color]);
- if (pcurrententry->orientation == 0) {
- gdImageString(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
- } else {
- gdImageStringUp(graph, gdFontSmall,
- pcurrententry->coords[0],
- pcurrententry->coords[1],
- pcurrententry->str,
- i_col );
- }
- break;
- case POLY:
- case LINK:
- {
- int x = pcurrententry->coords[0];
- int y = pcurrententry->coords[1];
- int x2, y2, j, k;
- gdImagePtr brush_2pix;
-
- if (pcurrententry->type == POLY) {
- i_col = find_color(graph, colortable[pcurrententry->color]);
- } else {
- brush_2pix = gdImageCreate(2,2);
- gdImageColorAllocate(
- brush_2pix,
- r(colortable[colorratetable[pcurrententry->rate]]),
- g(colortable[colorratetable[pcurrententry->rate]]),
- b(colortable[colorratetable[pcurrententry->rate]]) );
- gdImageSetBrush(graph, brush_2pix);
- i_col = gdBrushed;
- }
-
- k = 2;
- for ( j = 1; j < pcurrententry->npoints; j ++ ) {
- x2 = pcurrententry->coords[k++];
- y2 = pcurrententry->coords[k++];
- gdImageLine(graph, x, y, x2, y2,i_col);
- x = x2; y = y2;
- };
-
- if (pcurrententry->type == LINK) {
- gdImageDestroy(brush_2pix);
- };
-
- }
-
- break;
- default:
- break;
- }
- pcurrententry = pcurrententry->next;
- }
-
- gdImageGif(graph, gif);
-
- gdImageDestroy(graph);
-}
-
-
-struct sfigrec {
- int type;
- char text[500];
- int colorindex;
- int depth;
- int color;
- int fillcolor;
- int angle;
- int coords[500];
- int npoints;
-};
-
-
-/************************************************************************/
-int getfig ( FILE * config, struct sfigrec * fig )
-{
- char buf[1000], str[1000], *s;
- int i, n, type, color, colorindex, depth, pen_style, font, flags, x, y;
- int style, thickness, pen_color, fill_color, fill_style, join_style, cap_style, radius, fa, ba, npts;
- float tx_size, angle, style_val;
-
- fig->type = UNKNOWN;
-
- if ( fgets (buf, 1000, config ) == NULL ) {
- return ( TRUE );
- }
-
- switch ( buf[0] ) {
- case '0': /* color ref */
- n = sscanf(buf, "%*d %d #%06x", &colorindex, &color );
- /*printf ( "colordef : %d, %d.\n", colorindex, color );*/
- fig->type = COLORDEF;
- fig->color = ((color & 0xff0000)>>16) | (color & 0x00ff00) | ((color & 0x0000ff)<<16);
- fig->colorindex = colorindex;
- break;
- case '2': /* polyline */
- n = sscanf(buf, "%*d%d%d%d%d%d%d%d%d%f%d%d%d%d%d%d",
- &type, &style, &thickness, &pen_color, &fill_color,
- &depth, &pen_style, &fill_style, &style_val,
- &join_style, &cap_style, &radius, &fa, &ba, &npts);
- /*puts ( buf );*/
- /*printf ("type %d, style %d, thickness %d, pen_color %d, fill_color %d, depth %d, pen_style %d, fill_style %d, style_val %f, join_style %d, cap_style %d, radius %d, fa %d, ba %d, npts %d ",
- type, style, thickness, pen_color, fill_color,
- depth, pen_style, fill_style, style_val,
- join_style, cap_style, radius, fa, ba, npts);*/
- fig->depth = depth;
- fig->color = pen_color;
- fig->npoints = npts;
- for ( i = 0; i < npts; i ++ ) {
- fscanf(config, "%d%d", &x, &y);
- fig->coords[i*2] = x; fig->coords[i*2+1] = y;
- /*printf ( "[%d %d] ", x, y );*/
- }
- fig->type = POLY;
- if ( type == 2 ) { /* rectangle */
- fig->type = RECT;
- if ( fill_style == -1 ) {
- fig->fillcolor = -1;
- } else {
- fig->fillcolor = fill_color;
- }
- x = min(fig->coords[0],fig->coords[4]);
- y = min(fig->coords[1],fig->coords[5]);
- fig->coords[2] = max(fig->coords[0],fig->coords[4]);
- fig->coords[3] = max(fig->coords[1],fig->coords[5]);
- fig->coords[0] = x;
- fig->coords[1] = y;
- fig->npoints = 2;
- }
- /*printf ( ".\n" );*/
- break;
- case '4': /* text */
- n = sscanf(buf, "%*d%d%d%d%d%d%f%f%d%*f%*f%d%d %[^\n]",
- &type, &color, &depth, &pen_style, &font, &tx_size, &angle, &flags, &x, &y, str);
- s = strstr ( str, "\\001" );
- if ( s != NULL ) s[0] = 0;
- /*printf ( "text : type %d, color %d, depth %d, pen_style %d, font %d, ty_size %f, angle %f, flags %d, x %d, y %d, s [%s].\n",
- type, color, depth, pen_style, font, tx_size, angle, flags, x, y, str );*/
- fig->type = TEXT;
- strcpy (fig->text, str);
- fig->depth = depth;
- fig->color = color;
- if ( angle < 1) {
- fig->angle = 0;
- fig->coords[0] = x;
- fig->coords[1] = y-150;
- } else {
- fig->angle = 1;
- fig->coords[0] = x-150;
- fig->coords[1] = y;
- }
- fig->npoints = 1;
- break;
- case '6': /* compound */
- fig->type = COMPOUND;
- /*printf ( "compound.\n" );*/
- break;
- case '-': /* compound end */
- fig->type = ENDCOMPOUND;
- /*printf ( "end of compound.\n" );*/
- break;
- default:
- break;
- }
-
- return ( FALSE );
-
-}
-
-
-/************************************************************************/
-void main ( int argc, char * argv[] )
-{
- FILE *config = NULL, *gif = NULL, *map = NULL;
- char *sconfig = NULL, *sgif = NULL, *smap = NULL;
- char *optarg;
- int i;
-
- /* globals */
- xsize = 100, ysize = 100;
- rounds = 6;
-
- do {
- /***************************************************************/
- /* 0 : read program arguments */
- while ( ( i = getopt1( argc, argv, "o:i:r:m:", &optarg ) ) != EOF ) {
- switch ( i ) {
- case 'i':
- sconfig = optarg;
- break;
- case 'o':
- sgif = optarg;
- break;
- case 'm':
- smap = optarg;
- break;
- case 'r':
- rounds = atoi (optarg);
- if ( rounds < 1 ) {
- print_error();
- exit (0);
- };
- break;
- case '?':
- print_error();
- exit (0);
- break;
- default:
- break;
- }
- }
-
-
- if ( sconfig == NULL || sgif == NULL ) {
- print_error();
- break;
- }
-
-
- /***************************************************************/
- /* 1 : OPEN FILES */
- config = fopen ( sconfig, "r" );
- if ( config == NULL ) {
- fprintf ( stderr, "Error opening %s.\n", sconfig );
- break;
- }
-
- gif = fopen ( sgif, "wb" );
- if ( gif == NULL ) {
- fprintf ( stderr, "Error opening %s.\n", sgif );
- fclose ( config );
- break;
- }
-
- if ( smap != NULL ) {
- map = fopen ( smap, "w" );
- if ( map == NULL ) {
- fprintf ( stderr, "Error opening %s.\n", sgif );
- fclose ( config );
- fclose ( gif );
- break;
- }
- fprintf ( map, " <map name=\"map1\">\n" );
- }
-
-
- /***************************************************************/
- /* 2 : SCAN CONFIG FILE */
- pcurrententry = NULL; pfirstentry = NULL; pareaentry = NULL;
- for ( i = 0; i < 256; i++ ) {
- colorratetable[i] = 0;
- }
- for ( i = 32; i < 256; i++ ) {
- colortable[i] = 0;
- }
-
- while ( TRUE ) {
- struct sfigrec figrec;
-
- /********************************************/
- /* get one fig record */
- if ( getfig ( config, &figrec ) == TRUE ) break;
-
- switch (figrec.type) {
- case COLORDEF:
- if ( figrec.colorindex < 256 ) colortable[figrec.colorindex] = figrec.color;
- /*printf ( "color table[%i] : %i.\n", figrec.colorindex, colortable[figrec.colorindex] );*/
- break;
- case TEXT:
- if ( new_entry() == FALSE ) break;
- pcurrententry->type = UNKNOWN;
- pcurrententry->color = figrec.color;
- pcurrententry->depth = figrec.depth;
-
- if ( strncmp("color:", figrec.text, 6 ) == 0 ) { /* special 'color:' text */
- i = atoi ( figrec.text+6 );
- if ( i < 256 ) colorratetable[i] = figrec.color;
- /*printf ( "color rate[%i] : %i.\n", i, colorratetable[i] );*/
- break;
- }
-
- if ( (pcurrententry->str = malloc ( strlen(figrec.text) + 1 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- break;
- }
- if ( (pcurrententry->coords = (int *)malloc(figrec.npoints * (sizeof (int)) * 2 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- break;
- }
- pcurrententry->type = TEXT;
- pcurrententry->npoints = figrec.npoints;
- pcurrententry->orientation = figrec.angle;
- strcpy (pcurrententry->str,figrec.text);
- memcpy (pcurrententry->coords,figrec.coords,figrec.npoints * (sizeof (int)) * 2);
- break;
- case POLY:
- case RECT:
- if ( new_entry() == FALSE ) break;
- pcurrententry->type = UNKNOWN;
- pcurrententry->depth = figrec.depth;
- pcurrententry->color = figrec.color;
- pcurrententry->fillcolor = figrec.fillcolor;
- if ( (pcurrententry->coords = (int *)malloc(figrec.npoints * (sizeof (int)) * 2 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- continue;
- }
- pcurrententry->type = figrec.type;
- pcurrententry->npoints = figrec.npoints;
- memcpy (pcurrententry->coords,figrec.coords,figrec.npoints * (sizeof (int)) * 2);
- break;
- case COMPOUND: /* compound must be links ... */
- if ( new_entry() == FALSE ) break;
- do {
- if ( getfig ( config, &figrec ) == TRUE ) break;
- if ( figrec.type == ENDCOMPOUND ) break;
- if ( figrec.type == TEXT ) {
- /*printf (" txt %s.\n", figrec.text );*/
- if ( strncmp("gifarea", figrec.text, 7 ) == 0 ) {
- pcurrententry->type = GIFAREA;
- pareaentry = pcurrententry;
- /*printf ( " gifarea : [%i / %i] ", pcurrententry->coords[0], pcurrententry->coords[1]);
- printf ( " [%i / %i].\n", pcurrententry->coords[2], pcurrententry->coords[3]);*/
- } else if ( strncmp("url:", figrec.text, 4 ) == 0 ) {
- if ( (pcurrententry->str = malloc ( strlen(figrec.text) + 1 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- break;
- }
- pcurrententry->type = URL;
- strcpy (pcurrententry->str,figrec.text+4);
- /*printf (" url %s.\n", pcurrententry->str );*/
- } else if ( strncmp("log:", figrec.text, 4 ) == 0 ) {
- char * s = figrec.text + 4;
- if ( s[0] == '>' ) {
- pcurrententry->orientation = OUT;
- s++;
- } else if ( s[0] == '<' ) {
- pcurrententry->orientation = IN;
- s++;
- } else {
- pcurrententry->orientation = INOUT;
- }
- if ( (pcurrententry->str = malloc ( strlen(s) + 1 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- break;
- }
- pcurrententry->type = LINK;
- strcpy (pcurrententry->str,s);
- /*printf (" str %s.\n", pcurrententry->str );*/
- } else if ( strncmp("speed:", figrec.text, 6 ) == 0 ) {
- pcurrententry->maxrate = atoi ( figrec.text+6 );
- /*printf (" max rate : %i.\n", pcurrententry->maxrate );*/
- }
- }
- if ( (figrec.type == POLY) || (figrec.type == RECT) ) {
- pcurrententry->color = figrec.color; /* default color */
- pcurrententry->depth = figrec.depth;
- pcurrententry->fillcolor = figrec.fillcolor;
- if ( (pcurrententry->coords = (int *)malloc(figrec.npoints * (sizeof (int)) * 2 )) == NULL ) {
- fprintf ( stderr, "Error : memory allocation failure.\n" );
- break;
- }
- pcurrententry->npoints = figrec.npoints;
- memcpy (pcurrententry->coords,figrec.coords,figrec.npoints * (sizeof (int)) * 2);
- }
- } while ( 1 );
- if ( pcurrententry->type==LINK && pcurrententry->coords != NULL ) {
- read_entry ( pcurrententry );
- /*printf (" link : log : %s.log, max rate : %i.\n", pcurrententry->str, pcurrententry->maxrate );*/
- }
- break;
- case ENDCOMPOUND:
- case UNKNOWN:
- default:
- break;
- }
-
- }
-
- /***************************************************************/
- /* checks */
- if ( pareaentry == NULL ) {
- fprintf ( stderr, "Error : no gif area specified.\n");
- break;
- }
- xsize = (pareaentry->coords[2] - pareaentry->coords[0]);
- ysize = (pareaentry->coords[3] - pareaentry->coords[1]);
- xoffset = pareaentry->coords[0]; yoffset = pareaentry->coords[1];
- /*printf ( "size : %i %i.\n", xsize, ysize );
- printf ( "offset : %i %i.\n", xoffset, yoffset );*/
-
- /***************************************************************/
- /* do translations */
- pcurrententry = pfirstentry;
- while ( pcurrententry != NULL ) {
- for (i = 0; i < pcurrententry->npoints; i ++) {
- pcurrententry->coords[i*2] -= xoffset;
- pcurrententry->coords[i*2+1] -= yoffset;
- pcurrententry->coords[i*2] /= scale;
- pcurrententry->coords[i*2+1] /= scale;
- }
- if ( smap != NULL ) {
- if ( pcurrententry->type==URL && pcurrententry->coords != NULL ) {
- fprintf ( map, " <area href=%s alt=\"%s\" shape=rect coords=\"%i,%i,%i,%i\">\n",
- pcurrententry->str,pcurrententry->str,
- pcurrententry->coords[0],pcurrententry->coords[1],
- pcurrententry->coords[2],pcurrententry->coords[3] );
- }
- }
- pcurrententry = pcurrententry->next;
- }
- xsize /= scale; ysize /=scale;
-
- /***************************************************************/
- /* 3 : draw gif file */
- draw_gif ( gif );
-
- /***************************************************************/
- /* 4 : clean-up all */
- {
- struct sentry * pentry;
- pcurrententry = pfirstentry;
- do {
- pentry = pcurrententry->next;
- free_entry(pcurrententry);
- pcurrententry = pentry;
- } while ( pentry != NULL );
- }
-
- fclose ( gif );
- fclose ( config );
-
- if ( smap != NULL ) {
- /*<area href=lk311.html alt="lk311.html" shape=rect coords="240,12,270,24">*/
- fprintf ( map, " </map>\n" );
- fclose ( map );
- }
-
- break;
-
- } while ( TRUE );
-
-}
-
diff --git a/src/contrib/rdlog2/readme.html b/src/contrib/rdlog2/readme.html
deleted file mode 100755
index be7f7f8..0000000
--- a/src/contrib/rdlog2/readme.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-
-<head>
-<meta http-equiv="Content-Type"
-content="text/html; charset=iso-8859-1">
-<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
-<title>RDLOG tool for MRTG</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<h1>RDLOG2 tool for MRTG</h1>
-
-<h2>Introduction</h2>
-
-<p>Rdlog is a small (and primitive) tool that gives indication on
-network traffic on a graphic map. It takes information from <a
-href="http://www.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg.html">MRTG</a>
-log files, and draw a GIF file with links that have colors based
-on the current traffic on your network. This small test explain
-how to use this tool : </p>
-
-<ul>
- <li><a href="#History list">history list</a></li>
- <li><a href="#RDLOG configuration file">how to build a RDLOG2
- draw file</a></li>
- <li><a href="#Building RDLOG">how to compile RDLOG2</a></li>
- <li><a href="#Calling RDLOG">RDLOG2 command-line arguments</a></li>
- <li><a href="#remarks">your remarks</a></li>
-</ul>
-
-<h2><a name="History list">History list</a></h2>
-
-<p>v 1.1, 5.5.97 : </p>
-
-<ul>
- <li>from a proposition of <a
- href="mailto:Christophe.Denervaud@swisstelecom.com">Christophe.Denervaud@swisstelecom.com</a>,
- add depth possibilies,</li>
- <li>add 'in' and 'out' difference,</li>
- <li>use the gifarea background color</li>
-</ul>
-
-<p>v1.0, feb. 1997: initial revision, port from rdlog</p>
-
-<h2><a name="RDLOG configuration file">RDLOG2 configuration file</a></h2>
-
-<p>To build a gif, RDLOG2 needs a configuration file, that you
-must build with XGIF (ftp.x.org, in
-/contrib/applications/drawing_tools/xfig), a 'X draw' program
-(tested with version 3.1). You can look at the example (wan.fig)
-in order to understand how works RDLOG2. When you draw with XFIG,
-you must observe some rules :</p>
-
-<h4>General Rules</h4>
-
-<p>You can draw : text, polylines, rectangles. Don't try to make
-rounded corners, arrows, splines, play with line style and width
-... All your draw must be 'flat', except for special object.
-Don't group/ungroup all your objects. The order of object drawing
-is defined with the xfig 'DEPTH' parameter (biggest first). Here
-follow a description of all you must know to build a RDLOG2 FIG
-file : </p>
-
-<h4>Draw text</h4>
-
-<p>RDLOG use the 'gd' package to build GIF files. You can only
-use one font, one size, and 2 orientations (0°, 90°). Use the
-font 'courier 10' to have the better matching between XFIG and
-the gif output.</p>
-
-<h4>Draw rectangles</h4>
-
-<p>The rectangle are the only figure that you can fill with
-colors. You can specify a border and a fill color.</p>
-
-<h4>Draw polylines</h4>
-
-<p>The polylines has only a color attribute.</p>
-
-<h4>Rate colors definition</h4>
-
-<p>For each link defined in the FIG file, the color is computed
-based on the traffic. There are 10 different color, (0-10 %,
-10-20%, ...). And they are define with a special text string,
-that contains 'color:x' (x is 0 for 0-10%, 1 for 10-20%, ...).
-The text color define the link color for the corresponding rate.</p>
-
-<h4>Draw 'links'</h4>
-
-<p>A link is a polyline whose color change, depending on traffic
-present on this link (in the mrtg log file). To build a link, you
-must group the following elements : </p>
-
-<ul>
- <li>a polyline the represent the link, with a default color,</li>
- <li>a text string that define the maximum speed for this
- link, with the following form 'speed:ssssssss'</li>
- <li>a text string with the mrtg log file name, of style
- 'log:link33.log' (maximum input or output), or of style
- 'log:&gt;link33.log' (maximum output) or 'log:&lt;link33.log'
- (maximum input)</li>
-</ul>
-
-<p>The link must only contains this 3 objects.</p>
-
-<h4>Define GIF area</h4>
-
-<p>The GIF area is define with 2 elements, that must be grouped :
-</p>
-
-<ul>
- <li>a rectangle that define the GIF region. The color of the
- rectangle define the background color of the GIF file.</li>
- <li>a text string, containing 'gifarea'</li>
-</ul>
-
-<h4>Define clickable region</h4>
-
-<p>With the '-m' command line option, RDLOG2 build a html file,
-that contains the GIF file, and where you can click to reach the
-corresponding mrtg files. You must define the clickable region,
-by creating a group with the following elements : </p>
-
-<ul>
- <li>a rectangle that define the clickable region</li>
- <li>a text string, containing 'url:linkname.html'</li>
-</ul>
-
-<h2><a name="Building RDLOG">Building RDLOG</a></h2>
-
-<p>RDLOG use the <a href="http://www.boutell.com/gd/">gd library</a>.
-In order to built it, you must have the following files :</p>
-
-<ul>
- <li><tt>RDLOG2.C</tt></li>
-</ul>
-
-<p>and from the gd library,</p>
-
-<ul>
- <li><tt>GDFONTS.H</tt></li>
- <li><tt>GDFONTS.C</tt></li>
- <li><tt>MTABLES.C</tt></li>
- <li><tt>GD.H</tt></li>
- <li><tt>GD.C</tt></li>
-</ul>
-
-<p>To build it, on unix , you can type : </p>
-
-<p><tt>gcc rdlog2.c -I/yourgdinclude -L/yourgdlibrary -lgd -lm -o
-RDLOG2 </tt></p>
-
-<p>On a PC with NT or 95, make a project with <tt>RDLOG2.C, GD.C,
-GDFONTS.C</tt></p>
-
-<h2><a name="Calling RDLOG">Calling RDLOG</a></h2>
-
-<p>The command-line parameters are : </p>
-
-<p><tt>rdlog2 -i cfile -o gfile [-m htmlfile] -r rounds</tt></p>
-
-<ul>
- <li><tt>ifile : </tt>input config file name</li>
- <li><tt>gfile : </tt>output gif file (will be overwritten)</li>
- <li><tt>mfile : </tt><font size="4" face="Times New Roman"><tt>html
- file with clickable map</tt></font> (optional, will be
- overwritten)</li>
- <li><tt>rounds : </tt>number of 5 min intervals to take</li>
-</ul>
-
-<p>for example : <tt>rdlog2 -i wan.fig -o wan.gif -m wan.html -r
-12 &gt; wan1.txt</tt></p>
-
-<p>You can so make an average of the x last 5 minutes intervals.
-Here, the map is drawn for the last hour.</p>
-
-<p>5.5.97, <a name="remarks">Philippe Simonet</a>, <a
-href="mailto:philippe.simonet@swisstelecom.com">philippe.simonet@swisstelecom.com</a></p>
-</body>
-</html>
diff --git a/src/contrib/rdlog2/wan.fig b/src/contrib/rdlog2/wan.fig
deleted file mode 100755
index 61e9aa5..0000000
--- a/src/contrib/rdlog2/wan.fig
+++ /dev/null
@@ -1,141 +0,0 @@
-#FIG 3.1
-Landscape
-Center
-Inches
-1200 2
-0 32 #c2c9dc
-0 33 #aee9c3
-0 34 #7cd0a6
-0 35 #29a889
-0 36 #17855c
-0 37 #ffc8c8
-0 38 #ffaaaa
-0 39 #ff8c8c
-0 40 #ff6464
-0 41 #ff0000
-0 42 #f5f5f5
-6 3000 2700 4725 3750
-2 2 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 5
- 3000 2700 3300 2700 3300 3750 3000 3750 3000 2700
-4 0 0 0 0 12 10 0.0000 4 105 1260 3405 3330 url:lk003.html\001
--6
-6 4425 600 6975 900
-2 2 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 5
- 4425 600 5475 600 5475 900 4425 900 4425 600
-4 0 0 0 0 12 10 0.0000 4 105 1260 5655 780 url:lk002.html\001
--6
-6 7800 2550 9675 3750
-2 2 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 5
- 7800 2550 8175 2550 8175 3750 7800 3750 7800 2550
-4 0 0 0 0 12 10 0.0000 4 105 1260 8355 3180 url:lk001.html\001
--6
-6 4425 5175 5775 6300
-2 2 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 5
- 4500 6000 5700 6000 5700 6300 4500 6300 4500 6000
-4 0 0 0 0 12 10 0.0000 4 105 1260 4455 5280 url:lk004.html\001
--6
-6 3300 2400 4575 4200
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 2
- 3300 2400 3300 4200
-4 0 0 0 0 12 10 0.0000 4 135 1080 3375 2925 speed:262144\001
-4 0 0 0 0 12 10 0.0000 4 135 1170 3375 3150 log:lk003.log\001
--6
-6 8100 1800 9525 4800
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 2
- 8100 1800 8100 4800
-4 0 0 0 0 12 10 0.0000 4 135 1170 8325 2700 log:lk001.log\001
-4 0 0 0 0 12 10 0.0000 4 135 1080 8325 2925 speed:262144\001
--6
-6 2400 300 10800 7200
-2 2 0 1 42 11 5 0 20 0.000 0 0 7 0 0 5
- 2400 300 10800 300 10800 7200 2400 7200 2400 300
-4 0 0 0 0 12 10 0.0000 4 135 630 2580 6985 gifarea\001
--6
-6 3675 4125 6525 6450
-2 1 0 1 0 34 2 0 -1 0.000 0 0 -1 0 0 16
- 5098 4198 5536 4198 5973 4417 6411 4855 6521 5293 6411 5731
- 6083 6168 5536 6387 4660 6387 4222 6168 3784 5731 3675 5293
- 3784 4855 4222 4417 4660 4198 5098 4198
-4 0 0 0 0 12 10 0.0000 4 135 1260 4500 4875 speed:12500000\001
-4 0 0 0 0 12 10 0.0000 4 135 1170 4500 5100 log:lk004.log\001
--6
-6 3000 975 7200 1800
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 7
- 7200 1800 7200 975 3150 975 3150 1800 3000 1575 3150 1800
- 3300 1575
-4 0 0 0 0 12 10 0.0000 4 135 1080 3750 1275 speed:262144\001
-4 0 0 0 0 12 10 0.0000 4 135 1260 3675 1500 log:>lk002.log\001
--6
-6 3525 1125 6825 1800
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 7
- 3525 1800 3525 1125 6675 1125 6675 1800 6825 1575 6675 1800
- 6525 1575
-4 0 0 0 0 12 10 0.0000 4 135 1080 5325 1275 speed:262144\001
-4 0 0 0 0 12 10 0.0000 4 135 1260 5325 1425 log:<lk002.log\001
--6
-2 2 0 1 13 30 1 0 20 0.000 0 0 -1 0 0 5
- 2700 1800 3900 1800 3900 2400 2700 2400 2700 1800
-2 2 0 1 13 30 1 0 20 0.000 0 0 -1 0 0 5
- 6300 1800 7500 1800 7500 2400 6300 2400 6300 1800
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 1
- 3300 2400
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 1
- 3300 2400
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 1
- 7500 2100
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 2
- 7500 2100 8100 2100
-2 1 0 1 0 34 0 0 -1 0.000 0 0 -1 0 0 2
- 7500 4500 8100 4500
-2 2 0 1 0 32 0 0 20 0.000 0 0 -1 0 0 5
- 9450 3900 9675 3900 9675 4125 9450 4125 9450 3900
-2 2 0 1 0 33 0 0 20 0.000 0 0 -1 0 0 5
- 9450 4125 9675 4125 9675 4350 9450 4350 9450 4125
-2 2 0 1 0 34 0 0 20 0.000 0 0 -1 0 0 5
- 9450 4350 9675 4350 9675 4575 9450 4575 9450 4350
-2 2 0 1 0 35 0 0 20 0.000 0 0 -1 0 0 5
- 9450 4575 9675 4575 9675 4800 9450 4800 9450 4575
-2 2 0 1 0 36 0 0 20 0.000 0 0 -1 0 0 5
- 9450 4800 9675 4800 9675 5025 9450 5025 9450 4800
-2 2 0 1 0 37 0 0 20 0.000 0 0 -1 0 0 5
- 9450 5025 9675 5025 9675 5250 9450 5250 9450 5025
-2 2 0 1 0 38 0 0 20 0.000 0 0 -1 0 0 5
- 9450 5250 9675 5250 9675 5475 9450 5475 9450 5250
-2 2 0 1 0 39 0 0 20 0.000 0 0 -1 0 0 5
- 9450 5475 9675 5475 9675 5700 9450 5700 9450 5475
-2 2 0 1 0 40 0 0 20 0.000 0 0 -1 0 0 5
- 9450 5700 9675 5700 9675 5925 9450 5925 9450 5700
-2 2 0 1 0 41 0 0 20 0.000 0 0 -1 0 0 5
- 9450 5925 9675 5925 9675 6150 9450 6150 9450 5925
-2 2 0 1 13 30 1 0 20 0.000 0 0 -1 0 0 5
- 2700 4200 4050 4200 4050 4950 2700 4950 2700 4200
-2 2 0 1 13 30 3 0 20 0.000 0 0 -1 0 0 5
- 6150 4200 7500 4200 7500 4950 6150 4950 6150 4200
-4 0 0 0 0 12 10 0.0000 4 105 630 6600 2175 router2\001
-4 0 0 0 0 12 10 0.0000 4 105 630 2925 4575 router3\001
-4 0 0 0 0 12 10 0.0000 4 105 630 6600 4575 router4\001
-4 0 0 0 0 12 10 0.0000 4 105 720 4500 825 link 002\001
-4 0 0 0 0 12 10 1.5708 4 105 900 8025 3600 link lk001\001
-4 0 0 0 0 12 10 0.0000 4 105 900 4650 6225 link lk004\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 4500 20-30%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 4725 30-40%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 4950 40-50%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 5175 50-60%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 4050 0-10 %\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 4275 10-20%\001
-4 0 0 0 0 12 10 1.5708 4 105 900 3225 3675 link lk003\001
-4 0 33 0 0 12 10 0.0000 4 105 630 8700 4275 color:1\001
-4 0 34 0 0 12 10 0.0000 4 105 630 8700 4500 color:2\001
-4 0 35 0 0 12 10 0.0000 4 105 630 8700 4725 color:3\001
-4 0 36 0 0 12 10 0.0000 4 105 630 8700 4950 color:4\001
-4 0 37 0 0 12 10 0.0000 4 105 630 8700 5175 color:5\001
-4 0 38 0 0 12 10 0.0000 4 105 630 8700 5400 color:6\001
-4 0 39 0 0 12 10 0.0000 4 105 630 8700 5625 color:7\001
-4 0 40 0 0 12 10 0.0000 4 105 630 8700 5850 color:8\001
-4 0 41 0 0 12 10 0.0000 4 105 630 8700 6075 color:9\001
-4 0 32 0 0 12 10 0.0000 4 105 630 8700 4050 color:0\001
-4 0 0 0 0 12 10 0.0000 4 105 630 9825 6075 90-100%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 5850 80-90%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 5625 70-80%\001
-4 0 0 0 0 12 10 0.0000 4 105 540 9825 5400 60-70%\001
-4 0 0 0 0 12 10 0.0000 4 105 630 2925 2175 router1\001
diff --git a/src/contrib/routers/README b/src/contrib/routers/README
deleted file mode 100644
index 8f5316a..0000000
--- a/src/contrib/routers/README
+++ /dev/null
@@ -1,9 +0,0 @@
-Folks,
-
-Steve is much faster with putting out new versions of his great tools, than
-I can release new versions of mrtg ... so please fetch hist stuff from
-
-http://www.steveshipway.org/software/
-
-cheers
-tobi
diff --git a/src/contrib/rumb-stat/README b/src/contrib/rumb-stat/README
deleted file mode 100644
index 3355380..0000000
--- a/src/contrib/rumb-stat/README
+++ /dev/null
@@ -1,16 +0,0 @@
-From anthonyr@ce.com.au Wed Feb 26 16:29:59 1997
-Date: Mon, 24 Feb 1997 11:17:36 +1100 (EST)
-From: Anthony Rumble <anthonyr@ce.com.au>
-To: mrtg@list.ee.ethz.ch
-Subject: Some handy scripts
-Resent-Date: Mon, 24 Feb 1997 01:19:13 +0100 (MET)
-Resent-From: mrtg@list.ee.ethz.ch
-
-
-Heres some handy scripts to get byte stats from apache (web server) 1.1.1
-and better and squid (proxy server) 1.1.1 and better.
-
---
-Anthony Rumble - Online Ordering Systems
-Corporate Express Australia Limited
-Phone 02-9335-0669 Fax 02-9335-0753 Mobile 015-955-042 Pager 016-634-997
diff --git a/src/contrib/rumb-stat/gethttpstats b/src/contrib/rumb-stat/gethttpstats
deleted file mode 100644
index 3854ffb..0000000
--- a/src/contrib/rumb-stat/gethttpstats
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/perl
-
-#######################################################
-# Get Web stats from Apache 1.1.1 and better
-#######################################################
-# Author: Anthony Rumble <anthony@rumble.waratah.id.au>
-#
-# Revision: $Revision: 1.1.1.1 $
-#######################################################
-
-use strict;
-use Socket;
-
-my($request) = "/status/?auto"; # Request to send
-my($host) = "enterprise.ce.com.au"; # Host to send it to
-my($p) = 80; # Port no
-
-my ($sin, $port, $iaddr, $paddr, $proto, $line, $uptime, $bytes);
-
-$proto = getprotobyname('tcp');
-if (!$proto)
-{
- die("getsockbyname");
-}
-socket(S, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
-
-$port = shift || $p;
-
-$iaddr = gethostbyname($host);
-if (!$iaddr)
-{
- die("gethostbyname");
-}
-$sin = sockaddr_in($port, $iaddr);
-if (!$sin)
-{
- die("sockaddr_in");
-}
-connect(S, $sin) || die "connect: $!";
-
-select(S);
-$| = 1;
-select(STDOUT);
-
-print S "GET $request\n";
-while (<S>)
-{
- $bytes=$1 if (m|^Total\ Bytes:\ (\S+)|);
- $uptime=$1 if (m|^Uptime:\ (\S+)|);
-}
-close(S);
-
-print "0\n$bytes\n$uptime\nenterprise\n";
diff --git a/src/contrib/rumb-stat/getsquidstats b/src/contrib/rumb-stat/getsquidstats
deleted file mode 100644
index 1ac17e7..0000000
--- a/src/contrib/rumb-stat/getsquidstats
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl
-
-#######################################################
-# Get Web stats from Squid version 1.1.1 or higher
-#######################################################
-# Author: Anthony Rumble <anthony@rumble.waratah.id.au>
-#
-# Revision: $Revision: 1.1.1.1 $
-#######################################################
-
-use strict;
-use Socket;
-
-my ($request) = "cache_object://localhost/stats/utilization HTTP/1.0\n";# Request
-my ($host) = "localhost"; # Host
-my ($p) = 8080; # Port number
-
-my ($j, $good, $junk, $sin, $port, $iaddr, $paddr, $proto, $line, $uptime, $bytes);
-
-$proto = getprotobyname('tcp');
-if (!$proto)
-{
- die("getsockbyname");
-}
-socket(S, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
-
-$port = shift || $p;
-
-$iaddr = gethostbyname($host);
-if (!$iaddr)
-{
- die("gethostbyname");
-}
-$sin = sockaddr_in($port, $iaddr);
-if (!$sin)
-{
- die("sockaddr_in");
-}
-connect(S, $sin) || die "connect: $!";
-
-select(S);
-$| = 1;
-select(STDOUT);
-
-print S "GET $request\n";
-
-while (<S>)
-{
- ($junk, $b, $junk, $junk, $junk, $junk, $junk, $junk, $junk, $j) = split(' ');
- if ($b eq "TOTAL")
- {
- ($good) = split('}', $j);
- printf ("0\n%u\n1\nsquid\n", $good*1000);
- exit(0);
- }
-}
-
-close(S);
diff --git a/src/contrib/snmpping/README b/src/contrib/snmpping/README
deleted file mode 100644
index 6889a20..0000000
--- a/src/contrib/snmpping/README
+++ /dev/null
@@ -1,7 +0,0 @@
-From: x <tomm02@yahoo.com>
-
-
-I came up with a diagnostic tool called snmpping.pl to make sure I have the
-right information on a device. I have posted it bellow. It just goes out
-and grabs a gid and displays it on the screen.
-
diff --git a/src/contrib/snmpping/snmpping.pl b/src/contrib/snmpping/snmpping.pl
deleted file mode 100755
index 886e4fc..0000000
--- a/src/contrib/snmpping/snmpping.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sepp/bin/perl
-use lib qw(../../run);
-use BER;
-require 'SNMP_Session.pm';
-
-my $host = @ARGV[0];
-my $community = @ARGV[1];
-my $port = 161;
-
-$session = SNMP_Session->open ($host, $community, $port)
- || die "couldn't open SNMP session to $host";
-
-$oid1 = encode_oid (1, 3, 6, 1, 2, 1, 1, 1, 0);
-
-if ($session->get_request_response ($oid1)) {
- ($bindings) = $session->decode_get_response($session->{pdu_buffer});
- while ($bindings ne '') {
- ($binding,$bindings) = &decode_sequence ($bindings);
- ($oid,$value) = &decode_by_template ($binding, "%O%@");
- print $pretty_oids{$oid}," => ",
- &pretty_print ($value), "\n";
- }
-}
diff --git a/src/contrib/stat/README b/src/contrib/stat/README
deleted file mode 100644
index f8658cd..0000000
--- a/src/contrib/stat/README
+++ /dev/null
@@ -1,59 +0,0 @@
-# $Id: README,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-
-stat.pl
-
- You could use this script to monitor youre DNS activities.
- Its a very simple perl script and youre free to do any updates on
- it, but please send a copy to me calle@volvo.se.
- you have to do some small changes like hostname and path to named.stats.
- if youre using it please let me know so i could send you updates.
-
-
-INSTALLATION:
-
- To get it to work do execute the script once before you make mrtg to do
- it for you. This will make an OLD file with the last requested queries.
- You might get an error messages , but the next time you execute it the
- stats will come as you want it.
-
-
-
-USAGE:
-
- If you run this on a DNS server just add an script that will make a stat
- file (Bind 4 (kill -ABRT `/var/run/named.pid`)),
- (Bind 8.1. (kill -ILL `/var/run/named.pid)) and remove the old named.stats.
- and put this into cron.
- For Bind 8.2.1 you will need to be using ndc (ndc stats).
-
- ex. script to run from cron
-
- #!/bin/sh
- rm /var/tmp/named.stats
- kill -ABRT `cat /var/run/named.pid`
- <PATH to MRTG>/mrtg <PATH to mrtg.cfg>
-
-
-MRTG:
-
- To set up this in MRTG:
- Target[dns]: `/<PATH to stat.pl>/stat.pl`
-
-REMOTE:
- I did a small script called dns.named that will collect named from a
- remote DNS, but i strongly recomend to rewrite this so instead of using
- FTP use scp.
- this script requires expect.
-
-
-UPDATES:
-
- The new stat.pl you could use 2 diffrent graph in one session , that is lets say you want to
- logg all Requested queries and maybe count of zone transfers.
- all you have to do is to specify these in $OUTGOING and $INCOMING in stat.pl.
- The script also looks how for how long the named have been runing without a reset.
-
-
-
-
-
diff --git a/src/contrib/stat/dns.named b/src/contrib/stat/dns.named
deleted file mode 100755
index 880032b..0000000
--- a/src/contrib/stat/dns.named
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/expect
-# $Id: dns.named,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-spawn ftp HOST.YOURE.DOMAIN
-expect "Name"
-send "USER\r"
-expect "^Password:"
-send "PASSWORD\r"
-expect "ftp>"
-send "cd /var/tmp\r"
-expect "ftp>"
-send "ascii\r"
-expect "ftp>"
-send "lcd DIRECTORY/WICH/STAT.pl/WILL/USE/TO/GET/NAMED.STATS\r"
-expect "ftp>"
-send "get named.stats\r"
-expect "ftp>"
-send "quit\r"
-sleep 4
diff --git a/src/contrib/stat/dns_mrtg b/src/contrib/stat/dns_mrtg
deleted file mode 100755
index 8095811..0000000
--- a/src/contrib/stat/dns_mrtg
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# $Id: dns_mrtg,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#thnis file should be run by cron
-DIRECTORY/TO/THIS/SCRIPT/dns.named
-/PATH/TO/MRTG/mrtg PATH/TO/MRTG.CFG/mrtg.cfg
diff --git a/src/contrib/stat/mrtg.cfg b/src/contrib/stat/mrtg.cfg
deleted file mode 100755
index 580b106..0000000
--- a/src/contrib/stat/mrtg.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-# this is a mrtg test setup
-#im gonna try using some fine examples (hopefully) to make this work.
-# this is gonna be a DNS graph (when if ever im ready).
-# $Id: mrtg.cfg,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-
-WorkDir: WWW/PATH/TO/SITE/
-## Intervall set to 5 min
-Interval: 10
-# now lets set up a Target to get stats from
-Target[bn]: `PATH/stat.pl`
-MaxBytes[bn]: 32000
-AbsMax[bn]: 64000
-Options[bn]: gauge
-Title[bn]: DNS statististics
-PageTop[bn]: <h2> DNS1 statistic </h2>\n
-XSize[bn]: 500
-Supress[bn]: y
-Ysize[bn]: 200
-YLegend[bn]: No. Questions asked/10 min
-ShortLegend[bn]: q/10 min
-LegendO[bn]: &nbsp; dnsqueries:
-LegendI[bn]:
-WithPeak[bn]: ym
diff --git a/src/contrib/stat/stat.pl b/src/contrib/stat/stat.pl
deleted file mode 100755
index 454e44a..0000000
--- a/src/contrib/stat/stat.pl
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/usr/bin/perl -w
-# $Id: stat.pl,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-####################
-# New updates for stat.pl
-####################
-%D_STAT=(
- RQ => 0,
- RR => 1,
- RIQ => 2,
- RNXD => 3,
- RFwdQ => 4,
- RFwdR => 5,
- RDupQ => 6,
- RDupR => 7,
- RFail => 8,
- RFErr => 9,
- RErr => 10,
- RTCP => 11,
- RAXFR => 12,
- RLame => 13,
- ROpts => 14,
- SSysQ => 15,
- SAns => 16,
- SFwdQ => 17,
- SDupQ => 18,
- SFail => 19,
- SFErr => 20,
- SErr => 21,
- RNotNsq => 22,
- SNaAns => 23,
- SNXD => 24,
-);
-# This file is to feed mrtg with right information.
-# You could do this more fancy with up-time and stuff like that,
-# but that will be maybe in a couple of versions upward.
-# This works and i dont want to be like other big companys that gives out
-# Programs that want work but is all that fancy.
-#
-# Any way please do change this files so the right PATH to youre scripts
-# are there.
-# Requirements:
-# this scripts require MRTG (of course), i wont get in how to configure this,
-# because im not sure how to do it correctly, i manged to get it to work.
-# but i sugest you take a real good look how to configure MRTG.
-# more requirement is , perl version 5.004_05. Look at the documentation
-# on MRTG this one needs you to have some patches for some OS.
-#
-# If you want to use getting iformation from a remote DNS, sure you could use
-# my script dns.named but beware that this is NOT safe maybe you should use
-# If you want to use getting iformation from a remote DNS, sure you could use
-# scp to get youre file, but if not, be sure to set the rights so no non-auth
-# could see what password is.
-# dns.named requires expect version 5.26.0 (i havent tested on other versions)
-#
-# im not the greatest script maker but i managed this to work, but if
-# you have any comments or you have some great changes please be free to send them to calle@volvo.se
-
-# HOSTNAME youre domain this will show up in the web-page
-#
-# OK now to this new version of this program
-# $LOG is where you find youre named.stats *
-# in Bind 8.2.1 the way to get youre named.stats is "ndc stats"
-# in Bind 4.9.3 kill -ABRT `cat /var/run/named.pid`
-# in Bind kill -ILL `cat /var/run/named.pid`
-#
-# $RUN you have to set that to where youre script is set to run ex my $RUN = "/home/myhomeaccount/";
-#
-# now to the real new thing that is you can have 2 graphs in one MRTG session
-# you have to set the $INCOMING and $OUTGOING, $INCOMING = $D_STAT{"RQ"}; <-- this one needs to be set to look
-# for wich Data you want to see on the first Graph (RQ is Requested Queries)
-#
-# now to the other $OUTGOING = $D_STAT{"RFail"}; i set default but can be changed for what you want
-# RFail Requested Failure i done a short list of What some of them means , but if you want to have a complete list
-# you could look into the DNS and Bind book from O'reilly page 166
-#
-# Short list of some of the things you could pull out
-#
-# RQ: Requested Queries.
-# RR: Count of responses recieved from relay.
-# RIQ: Count of reverse queries recieved from relay.
-# RNXD: Count of "no such domain" answeres.
-# RFwdQ: Count of queries received from relay that nedded more processing
-# RFwdR: Count of is the reponses recived from relay that answered the
-# original query and were passed back to application.
-# RDupR: Is the count of duplicat response from relay.
-# RFail: Is the count of SERVFAIL response from relay.
-# RFErr: is the count of FORMERR response from relay.
-# RErr: is the count of errors that werent either SERVFAIL or FORMERR
-# RLame: Count of lame DELEGATIONS.
-# and so on read the book.
-
-my $HOSTNAME = "HOST\.YOURE\.DOMAIN";
-my $LOG = "/home/";
-my $RUN = "/home/";
-
-my $INCOMING = $D_STAT{"RQ"};
-my $OUTGOING = $D_STAT{"RFail"};
-
-
-
-#######################################
-#### Please Dont toch this part
-######################################
-my $QUE_P_MIN =();
-my $QUE_P_OTHER = ();
-my @N_STATS=();
-my @OLD_S=();
-my $UPTIME = ();
-
-
-sub HIST {
-
- open (STAT , "$LOG") or die "could not find or open file $LOG";
- @N_STAT = <STAT>;
- close (STAT);
-
-
- open (V_OLD , "$RUN/OLD");
- my @OLD_S = <V_OLD>;
- close (V_OLD);
-
-
-
- my $G_FLAG = "no";
-
-
-
- foreach $line (@N_STAT) {
-
- if ( $line =~ m/^([0-9]+)\s+\S+\s+\S+\sreset/ ){
- $UPTIME = $1;
- }
-
- if ( $G_FLAG =~ /yes/) {
-
- my @NUM_QUE=split ' ',$line;
- open ( LOGGER , "> $RUN/OLD");
-
- print LOGGER "$NUM_QUE[$INCOMING]\n";
- print LOGGER "$NUM_QUE[$OUTGOING]\n";
-
- close ( LOGGER );
- $QUE_P_MIN = $NUM_QUE[$INCOMING]-$OLD_S[0];
- $QUE_P_OTHER = $NUM_QUE[$OUTGOING]-$OLD_S[1];
- $G_FLAG = "no";
- }
-
-
-
-
- if ($line =~ /(Global)/) {
- $G_FLAG = "yes";
- }
- }
-
- print "$QUE_P_MIN\n$QUE_P_OTHER\n$UPTIME\n$HOSTNAME\n";
-}
-
-&HIST();
-
-
-
-
-
-
-
-
-
-
diff --git a/src/contrib/stfc/README b/src/contrib/stfc/README
deleted file mode 100644
index 6fb39c7..0000000
--- a/src/contrib/stfc/README
+++ /dev/null
@@ -1,35 +0,0 @@
- Mihai Claudiu Capatina <mick@aignet.ro>
- aka Mick
-
- This is a small script that I use on FreeBSD machines running ALTQ
- This machines acts like a traffic management system and I need to see
- the traffic for each class ( CBQ )
-
- All you need to change in this script is the path to "altqstat"
- and the name of the interfaces
-
- In my case fxp0 is connected to my LAN and fxp1 is connected to my ISP
- so...I measure on fxp0 the download and on the fxp1 the upload for each class
-
- This script has only one parameter....this is the class number assigned
- by ALTQ.
-
- If you want to use this script I suppose that you already instaled ALTQ
- In any case do "altqstat -w 0 -c 2 -i your_interface" to see what your
- class number is...for each class
-
- If you want to count packets instead of bytes change the st line of the script
- instead of $octeti_down and $octeti_up put $pakete_down and $pakete_up
-
- You will call this script from mrtg.conf like this :
- Target[name]: `/your/path/to/my/script/stfc [class_number]
- - name - can be an ip address or a client name or whatever you want
- - class_number - explained above...
-
- VERY IMPORTANT : always define classes in the same order for upload and
- download...so they will have the same class number
-
- If you need additional information please feel free to mail me...I'll be glad
- to help you...;-))
-
-Mick <mick@aignet.ro>
diff --git a/src/contrib/stfc/stfc b/src/contrib/stfc/stfc
deleted file mode 100755
index a60cd6d..0000000
--- a/src/contrib/stfc/stfc
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/perl
-#
-# Mihai Claudiu Capatina <mick@aignet.ro>
-# aka Mick
-#
-# This is a small script that I use on FreeBSD machines running ALTQ
-# This machines acts like a traffic management system and I need to see
-# the traffic for each class ( CBQ )
-# All you need to change in this script is the path to "altqstat"
-# and the name of the interfaces
-# In my case fxp0 is connected to my LAN and fxp1 is connected to my ISP
-# so...I measure on fxp0 the download and on the fxp1 the upload for each class
-#
-# This script has only one parameter....this is the class number assigned
-# by ALTQ.
-# If you want to use this script I suppose that you already instaled ALTQ
-# In any case do "altqstat -w 0 -c 2 -i your_interface" to see what your
-# class number is...for each class
-# If you want to count packets instead of bytes change the st line of the script# instead of $octeti_down and $octeti_up put $pakete_down and $pakete_up
-#
-# You will call this script from mrtg.conf like this :
-# Target[name]: `/your/path/to/my/script/stfc [class_number]
-# - name - can be an ip address or a client name or whatever you want
-# - class_number - explained above...
-# VERY IMPORTANT : always define classes in the same order for upload and
-# download...so they will have the same class number
-#
-# If you need additional information please feel free to mail me...I'll be glad
-# to help you...;-))
-
-
-$numar_clasa = $ARGV[0];
-
-@rezultat_down=`/usr/local/bin/altqstat -w 0 -c 2 -i fxp0`;
-foreach (@rezultat_down) {
- $count++;
- if ( /^Class(\s+)(\d+)(.*)/ ) {
- if ( $2 == $numar_clasa) {
- if ($rezultat_down[$count+2] =~ /^(\s+)pkts: (\d+),(\s+)bytes: (\d+)(.*)/) {
- $pakete_down = $2;
- $octeti_down = $4;
- }
- }
- }
-}
-
-@rezultat_up=`/usr/local/bin/altqstat -w 0 -c 2 -i fxp1`;
-foreach (@rezultat_up) {
- $count1++;
- if ( /^Class(\s+)(\d+)(.*)/ ) {
- if ( $2 == $numar_clasa) {
- if ($rezultat_up[$count1+2] =~ /^(\s+)pkts: (\d+),(\s+)bytes: (\d+)(.*)/) {
- $pakete_up = $2;
- $octeti_up = $4;
- }
- }
- }
-}
-
-open(UPTIME,"uptime |cut -b 13-26|");
-$upTime=<UPTIME>;
-close(UPTIME);
-chop $upTime;
-$host=`/bin/hostname --fqdn`;
-
-print("$octeti_down\n$octeti_up\n$upTime\n$host");
-
diff --git a/src/contrib/switchmaker/README b/src/contrib/switchmaker/README
deleted file mode 100644
index 63d596a..0000000
--- a/src/contrib/switchmaker/README
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Markley P. Dykeman <mdykeman@micron.net>
-Date: Sun, 21 Nov 1999 15:14:00 -0700
-
-I have enjoyed using your MRTG program to accomplish my tasks. Thank you
-for a wonderful toolbox.
-
-Attached to this document is a perl program called switchmaker which
-will simply make an mrtg config file for a Cisco Catylst 5XXX switch.
-Unfortunatly, I had to use the SNMP-Util-1.6 and SNMP-1.8 libraries
-because I had trouble getting the libraries distrubuted with 2.7.2 to
-work correctly with my code--more of an inadequacy on my part. But,
-providing you have those libraries or are willing to port it, it does
-work very well. At any rate it does document the MIBS you need to know
-to get the correct port information out of the switch...
-
-Enjoy.
-
---
-
- Markley Dykeman
diff --git a/src/contrib/switchmaker/switchmaker b/src/contrib/switchmaker/switchmaker
deleted file mode 100644
index c4f1aaf..0000000
--- a/src/contrib/switchmaker/switchmaker
+++ /dev/null
@@ -1,270 +0,0 @@
-#!/usr/local/bin/perl
-#######################################################
-# switchmaker for MRTG
-#######################################################
-# Author: Markley Dykeman - 04/27/99
-# Purpose: This program makes an MRTG configuration
-# file for Cisco 5500 switches.
-# Usage: switchmaker <fqdm> <snmpRO>
-# Requires: SNMP-Util-1.6 and SNMP-1.8
-#######################################################
-
-my $testing = 0;
-
-# Libraries
-use SNMP::Util;
-use Socket;
-use strict;
-
-# Environment
-$ENV{'MAX_LOG_LEVEL'} = 'status';
-
-# Usage display
-if (@ARGV < 1){
- print "Usage: \n";
- print " switchmaker <IP> <community string>\n";
- print "\n";
- print " IP = IP address or Switch name\n";
- print " comm = defaults to hostname\n";
- exit;
-}
-
-# Arrays
-my(%iftype)=( '1'=>'other',
- '2'=>'cddi',
- '3'=>'fddi',
- '4'=>'tppmd',
- '5'=>'mlt3',
- '6'=>'sddi',
- '7'=>'smf',
- '8'=>'e10BaseT',
- '9'=>'e10BaseF',
- '10'=>'scf',
- '11'=>'e100BaseTX',
- '12'=>'e100BaseT4',
- '13'=>'e100BaseF',
- '14'=>'atmOc3mmf',
- '15'=>'atmOc3smf',
- '16'=>'atmOc3utp',
- '17'=>'e100BaseFsm',
- '18'=>'e10a100BaseTX',
- '19'=>'mii',
- '20'=>'vlanRouter',
- '22'=>'tokenring',
- '23'=>'atmOc12mmf',
- '24'=>'atmOc12smf',
- '25'=>'atmDs3',
- '26'=>'tokenringMmf',
- '27'=>'e1000BaseLX'
- );
-
-# Declare working variables
-my ($sysDescr, $sysName, $sysIpAddr, %portGrp, $portIfIndex, $interfacecnt, @result, @oid_list, $iphost);
-my (@oid_cutoff, $i);
-
-# Get command line arguments
-my $IP = $ARGV[0];
-my $Comm_string = $ARGV[1];
-
-# Open connection to device
-my $snmp = new SNMP::Util(-device => $IP,
- -community => $Comm_string);
-
-########################
-# Get system information
-########################
-
-@result = $snmp->next( 'ne', '1.3.6.1.2.1.1.1'); #sysDescr
-$sysDescr = $result[1];
-
-@result = $snmp->next( 'ne', '1.3.6.1.2.1.1.5'); #sysName
-$sysName = $result[1];
-
-@result = $snmp->next( 'ne', '1.3.6.1.4.1.9.5.1.1.2'); #sysIpAddr
-$sysIpAddr = $result[1];
-
-$iphost = gethostbyaddr(pack('C4',split(/\./,$sysIpAddr)), AF_INET); #iphost
-if (!defined $iphost || ($iphost eq '')){
- $iphost = 'Unknown DNS name';
-}
-
-#########################
-# Walk through ports
-#########################
-@oid_list = ( '1.3.6.1.4.1.9.5.1.4.1.1.11', #portIfIndex
- '1.3.6.1.4.1.9.5.1.4.1.1.5', #portType
- '1.3.6.1.4.1.9.5.1.4.1.1.10', #portDuplex
- '1.3.6.1.4.1.9.5.1.4.1.1.1', #portModuleIndex
- '1.3.6.1.4.1.9.5.1.4.1.1.2', #portIndex
- '1.3.6.1.4.1.9.5.1.4.1.1.4', #portName
- );
-@oid_cutoff = '1.3.6.1.4.1.9.5.1.4.1.1.11';
-
-# Walk the MIBs...
-my ($more) = 1;
-while ($more) {
- @result = $snmp->next( -format => 'one',
- -oids => \@oid_list,
- );
-
- # Are we done walking?
- if (@result[0] !~ /@oid_cutoff/) {
- $more = 0;
- }
-
- # if not, process the data
- if ($more) {
- $portIfIndex = $result[2];
- $interfacecnt = $result[2];
- $portGrp{$portIfIndex}{'portIfIndex'} = $result[2];
- $portGrp{$portIfIndex}{'portType'} = $result[5];
- $portGrp{$portIfIndex}{'portDuplex'} = $result[8];
- $portGrp{$portIfIndex}{'portModuleIndex'} = $result[11];
- $portGrp{$portIfIndex}{'portIndex'} = $result[14];
- $portGrp{$portIfIndex}{'portName'} = $result[17];
- }
-
- # Update OID for snmp->next
- @oid_list = ($result[0],$result[3],$result[6],$result[9],$result[12],$result[15]);
-
-}
-
-##############################
-# Walk through MIB2 interfaces
-##############################
-@oid_list = ( '1.3.6.1.2.1.2.2.1.1', #ifIndex
- '1.3.6.1.2.1.2.2.1.2', #ifDescr
- '1.3.6.1.2.1.2.2.1.3', #ifType
- '1.3.6.1.2.1.2.2.1.5', #ifSpeed
- '1.3.6.1.2.1.2.2.1.7', #ifAdminStatus
- '1.3.6.1.2.1.2.2.1.8', #ifOperStatus
- );
-@oid_cutoff = '1.3.6.1.2.1.2.2.1.1';
-
-
-# Walk the MIBs...
-my ($more) = 1;
-while ($more) {
- @result = $snmp->next( -format => 'one',
- -oids => \@oid_list,
- );
-
- # Are we done walking?
- if (@result[0] !~ /@oid_cutoff/) {
- $more = 0;
- }
-
- # if not, process the data
- if ($more) {
- $portIfIndex = $result[2];
-
- # deal with non-workgroup ports (1 & 2
- if ($portGrp{$portIfIndex}{'portIfIndex'} eq "") {
- $portGrp{$portIfIndex}{'portIfIndex'} = $result[2];
- if ($portIfIndex eq "1") {
- $portGrp{$portIfIndex}{'portName'} = $iphost
- } else {
- $portGrp{$portIfIndex}{'portName'} = $result[5];
- $portGrp{$portIfIndex}{'ifDescr'} = $result[8];
- }
- }
- $portGrp{$portIfIndex}{'ifDescr'} = $result[5] if (!($portGrp{$portIfIndex}{'ifDescr'} eq $result[8]));
- $portGrp{$portIfIndex}{'ifType'} = $result[8];
- $portGrp{$portIfIndex}{'ifSpeed'} = $result[11];
- $portGrp{$portIfIndex}{'ifAdminStatus'} = $result[14];
- $portGrp{$portIfIndex}{'ifOperStatus'} = $result[17];
- }
-
- # Update OID for snmp->next
- @oid_list = ($result[0],$result[3],$result[6],$result[9],$result[12],$result[15]);
-
-}
-
-if ($testing) {
- print "Summary for $sysName ($sysIpAddr), $sysDescr\n";
- for ($i = 1;$i <= $interfacecnt; $i++) {
- print "$portGrp{$i}{'portIfIndex'} ";
- print "$portGrp{$i}{'portType'} ";
- print "$portGrp{$i}{'portDuplex'} ";
- print "$portGrp{$i}{'portModuleIndex'}/";
- print "$portGrp{$i}{'portIndex'} ";
- print "$portGrp{$i}{'portName'}\n";
- print "$portGrp{$i}{'ifDescr'} ";
- print "$portGrp{$i}{'ifType'} ";
- print "$portGrp{$i}{'ifSpeed'} ";
- print "$portGrp{$i}{'ifAdminStatus'} ";
- print "$portGrp{$i}{'ifOperStatus'}\n";
- }
-}
-
-#######################################
-# Start creating the configuration file
-#######################################
-print "# Add a WorkDir: /some/path line to this file\n\n";
-
-for ($i = 1;$i <= $interfacecnt; $i++) {
-
- my $slash;
- if ($portGrp{$i}{'portModuleIndex'} eq '') {
- $slash = " ";
- } else {
- $slash = "/";
- }
-
- my $c;
- my $ifSpeed = $portGrp{$i}{'ifSpeed'};
- my $speedStr = &fmi($ifSpeed);
-
- if (!($portGrp{$i}{'ifAdminStatus'} eq "up")) {
- print <<ECHO;
-########
-######## This Interface is one of the following
-######## - administratively not UP
-######## - it is in test mode
-######## - it is a softwareLoopback interface
-######## - has a unrealistic speed setting
-######## It is commented out for this reason.
-########
-ECHO
- $c="# ";
- } else {
- $c = '';
- }
- print <<ECHO;
-${c}
-${c}Target[$iphost.$i]: $i:$Comm_string\@$sysIpAddr
-${c}MaxBytes[$iphost.$i]: $ifSpeed
-${c}Title[$iphost.$i]: $portGrp{$i}{'portModuleIndex'}$slash$portGrp{$i}{'portIndex'} $portGrp{$i}{'portName'} -- $portGrp{$i}{'ifDescr'}
-${c}Options[$iphost.$i]: growright, bits
-${c}PageTop[$iphost.$i]: <H1>Traffic Analysis for $portGrp{$i}{'portModuleIndex'}$slash$portGrp{$i}{'portIndex'} $portGrp{$i}{'portName'} </H1>
-${c} <TABLE>
-${c} <TR><TD>System:</TD><TD>$iphost.$i</TD></TR>
-${c} <TR><TD>Interface:</TD><TD> $portGrp{$i}{'portModuleIndex'}$slash$portGrp{$i}{'portIndex'} $portGrp{$i}{'portName'} -- $portGrp{$i}{'ifDescr'} ($i)</TD></TR>
-${c} <TR><TD>Max Speed:</TD>
-${c} <TD> $speedStr ($portGrp{$i}{'portType'}) ($portGrp{$i}{'portDuplex'})</TD></TR>
-${c} </TABLE>
-${c}
-##---------------------------------------------------------------
-ECHO
-
-}
-
-##############################
-# Any errors?
-##############################
-my $error = $snmp->error;
-if ($error){
- print "error = $error\n";
-}
-
-sub fmi {
- my($number) = $_[0];
- my(@short);
- $number=$number;
- @short = ("b/s","kb/s","Mb/s","Gb/s");
- my $digits=length("".$number);
- my $divm=0;
- while ($digits-$divm*3 > 4) { $divm++; }
- my $divnum = $number/10**($divm*3);
- return sprintf("%1.1f %s",$divnum,$short[$divm]);
-}
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph.pm b/src/contrib/whodo/GIFgraph/GIFgraph.pm
deleted file mode 100644
index 0e8c26b..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph.pm
+++ /dev/null
@@ -1,1114 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph.pm
-#
-# Description:
-# Module to create graphs from a data set, outputting
-# GIF format graphics.
-#
-# Package of a number of graph types:
-# GIFgraph::bars
-# GIFgraph::lines
-# GIFgraph::points
-# GIFgraph::linespoints
-# GIFgraph::area
-# GIFgraph::pie
-# GIFgraph::mixed
-#
-# $Id: GIFgraph.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-require 5.004;
-
-use strict;
-
-use vars qw(@ISA);
-
-# Use Lincoln Stein's GD and Thomas Boutell's libgd.a
-use GD;
-
-#
-# GIFgraph
-#
-# Parent class containing data all graphs have in common.
-#
-
-package GIFgraph;
-
-$GIFgraph::prog_name = 'GIFgraph.pm';
-$GIFgraph::prog_rcs_rev = '$Revision: 1.1.1.1 $';
-$GIFgraph::prog_version =
- ($GIFgraph::prog_rcs_rev =~ /\s+(\d*\.\d*)/) ? $1 : "0.0";
-
-$GIFgraph::VERSION = '1.10';
-
-# Some tools and utils
-use GIFgraph::colour qw(:colours);
-
-my $OS;
-
-# Let's guess what the OS is
-# (from CGI.pm by Lincoln Stein)
-# OVERRIDE THE OS HERE IF THE GUESS IS WRONG
-
-# $OS = 'UNIX';
-# $OS = 'MACINTOSH';
-# $OS = 'WINDOWS';
-# $OS = 'VMS';
-# $OS = 'OS2';
-
-# FIGURE OUT THE OS WE'RE RUNNING UNDER
-# Some systems support the $^O variable. If not
-# available then require() the Config library
-unless ($OS) {
- unless ($OS = $^O) {
- require Config;
- $OS = $Config::Config{'osname'};
- }
- if ($OS=~/Win/i) {
- $OS = 'WINDOWS';
- } elsif ($OS=~/vms/i) {
- $OS = 'VMS';
- } elsif ($OS=~/Mac/i) {
- $OS = 'MACINTOSH';
- } elsif ($OS=~/os2/i) {
- $OS = 'OS2';
- } else {
- $OS = 'UNIX';
- }
-}
-
-$GIFgraph::needs_binmode = $OS=~/^(WINDOWS|VMS|OS2)/;
-
-my %GIFsize = (
- 'x' => 400,
- 'y' => 300
-);
-
-my %Defaults = (
-
- # Set the top, bottom, left and right margin for the GIF. These
- # margins will be left empty.
-
- t_margin => 0,
- b_margin => 0,
- l_margin => 0,
- r_margin => 0,
-
- # Set the factor with which to resize the logo in the GIF (need to
- # automatically compute something nice for this, really), set the
- # default logo file name, and set the logo position (UR, BR, UL, BL)
-
- logo_resize => 1.0,
- logo => undef,
- logo_position => 'LR',
-
- # Write a transparent GIF?
-
- transparent => 1,
-
- # Write an interlaced GIF?
-
- interlaced => 1,
-
- # Set the background colour, the default foreground colour (used
- # for axes etc), the textcolour, the colour for labels, the colour
- # for numbers on the axes, the colour for accents (extra lines, tick
- # marks, etc..)
-
- bgclr => 'white',
- fgclr => 'dblue',
- textclr => 'dblue',
- labelclr => 'dblue',
- axislabelclr => 'dblue',
- accentclr => 'gray',
-
- # number of pixels to use as text spacing
-
- text_space => 8,
-);
-
-{
- #
- # PUBLIC methods, documented in pod.
- #
- sub new # ( width, height ) optional;
- {
- my $type = shift;
- my $self = {};
- bless $self, $type;
-
- if (@_)
- {
- # If there are any parameters, they should be the size
- $self->{gifx} = shift;
-
- # If there's an x size, there should also be a y size.
- die "Usage: GIFgraph::<type>::new( [x_size, y_size] )\n" unless @_;
- $self->{gify} = shift;
- }
- else
- {
- # There were obviously no parameters, so use defaults
- $self->{gifx} = $GIFsize{'x'};
- $self->{gify} = $GIFsize{'y'};
- }
-
- # Initialise all relevant parameters to defaults
- # These are defined in the subclasses. See there.
- $self->initialise( );
-
- return $self;
- }
-
- sub set
- {
- my $s = shift;
- my %args = @_;
-
- foreach (keys %args)
- {
- $s->{$_} = $args{$_};
- }
- }
-
- # These should probably not be used, or be rewritten to
- # accept some keywords. Problem is that GD is very limited
- # on fonts, and this routine just accepts GD font names.
- # But.. it's not nice to require the user to include GD.pm
- # just because she might want to change the font.
-
- sub set_title_font # (fontname)
- {
- my $self = shift;
-
- $self->{tf} = shift;
- $self->set(
- tfw => $self->{tf}->width,
- tfh => $self->{tf}->height,
- );
- }
-
- sub set_text_clr # (colour name)
- {
- my $s = shift;
- my $c = shift;
-
- $s->set(
- textclr => $c,
- labelclr => $c,
- axislabelclr => $c,
- );
- }
-
- sub plot # (\@data)
- {
- # ABSTRACT
- my $s = shift;
- $s->die_abstract( "sub plot missing," );
- }
-
- sub plot_to_gif # ("file.gif", \@data)
- {
- my $s = shift;
- my $file = shift;
- my $data = shift;
-
- open (GIFPLOT,">$file") || do
- {
- warn "Cannot open $file for writing: $!";
- return 0;
- };
- binmode GIFPLOT if ($GIFgraph::needs_binmode);
- print GIFPLOT $s->plot( $data );
- close(GIFPLOT);
- }
-
- # Routine to read GNU style data files
- # NOT USEABLE
-
- sub ReadFile
- {
- my $file = shift;
- my @cols = @_;
- my (@out, $i, $j);
-
- @cols = 1 if ( $#cols < 1 );
-
- open (DATA, $file) || do {
- warn "Cannot open file: $file";
- return [];
- };
-
- $i=0;
- while (defined(<DATA>))
- {
- s/^\s+|\s+$//;
- next if ( /^#/ || /^!/ || /^[ \t]*$/ );
- @_ = split(/[ \t]+/);
- $out[0][$i] = $_[0];
- $j=1;
- foreach (@cols)
- {
- if ( $_ > $#_ ) {
- warn "Data column $_ not present";
- return [];
- }
- $out[$j][$i] = $_[$_]; $j++;
- }
- $i++;
- }
- close(DATA);
-
- return @out;
-
- } # ReadFile
-
- #
- # PRIVATE methods
- #
-
- # Set defaults that apply to all graph/chart types.
- # This is called by the default initialise methods
- # from the objects further down the tree.
-
- sub initialise()
- {
- my $self = shift;
-
- foreach (keys %Defaults)
- {
- $self->set( $_ => $Defaults{$_} );
- }
-
- $self->set_title_font(GD::gdLargeFont);
-
- $self->open_graph();
- }
-
-
- # Check the integrity of the submitted data
- #
- # Checks are done to assure that every input array
- # has the same number of data points, it sets the variables
- # that store the number of sets and the number of points
- # per set, and kills the process if there are no datapoints
- # in the sets, or if there are no data sets.
-
- sub check_data($) # \@data
- {
- my $self = shift;
- my $data = shift;
-
- $self->set(numsets => $#$data);
- $self->set(numpoints => $#{@$data[0]});
-
- ( $self->{numsets} < 1 || $self->{numpoints} < 0 ) && die "No Data";
-
- my $i;
- for $i ( 1..$self->{numsets} )
- {
- die "Data array $i: length misfit"
- unless ( $self->{numpoints} == $#{@$data[$i]} );
- }
- }
-
- # Open the graph output canvas by creating a new GD object.
-
- sub open_graph()
- {
- my $self = shift;
- if ( !exists $self->{graph} )
- {
- my $graph = new GD::Image($self->{gifx}, $self->{gify});
- $self->{graph} = $graph;
- return $graph;
- }
- else
- {
- return $self->{graph};
- }
- }
-
- # Initialise the graph output canvas, setting colours (and getting back
- # index numbers for them) setting the graph to transparent, and
- # interlaced, putting a logo (if defined) on there.
-
- sub init_graph($) # GD::Image
- {
- my $self = shift;
- my $graph = shift;
-
- $self->{bgci} = $self->set_clr( $graph, _rgb($self->{bgclr}) );
- $self->{fgci} = $self->set_clr( $graph, _rgb($self->{fgclr}) );
- $self->{tci} = $self->set_clr( $graph, _rgb($self->{textclr}) );
- $self->{lci} = $self->set_clr( $graph, _rgb($self->{labelclr}) );
- $self->{alci} = $self->set_clr( $graph, _rgb($self->{axislabelclr}) );
- $self->{acci} = $self->set_clr( $graph, _rgb($self->{accentclr}) );
- $graph->transparent($self->{bgci}) if $self->{transparent};
- $graph->interlaced($self->{interlaced});
- $self->put_logo($graph);
- }
-
- # read in the logo, and paste it on the graph canvas
-
- sub put_logo($) # GD::Image
- {
- my $self = shift;
- my $graph = shift;
-
- return unless(defined($self->{logo}));
-
- my ($x, $y, $glogo);
- my $r = $self->{logo_resize};
-
- my $r_margin = (defined $self->{r_margin_abs}) ?
- $self->{r_margin_abs} : $self->{r_margin};
- my $b_margin = (defined $self->{b_margin_abs}) ?
- $self->{b_margin_abs} : $self->{b_margin};
-
- open(GIFLOGO, $self->{logo}) || return;
- binmode(GIFLOGO) if ($GIFgraph::needs_binmode);
- unless ( $glogo = newFromGif GD::Image(\*GIFLOGO) )
- {
- warn "Problems reading $self->{logo}";
- close(GIFLOGO);
- return;
- }
- close(GIFLOGO);
-
- my ($w, $h) = $glogo->getBounds;
- LOGO: for ($self->{logo_position}) {
- /UL/i && do {
- $x = $self->{l_margin};
- $y = $self->{t_margin};
- last LOGO;
- };
- /UR/i && do {
- $x = $self->{gifx} - $r_margin - $w * $r;
- $y = $self->{t_margin};
- last LOGO;
- };
- /LL/i && do {
- $x = $self->{l_margin};
- $y = $self->{gify} - $b_margin - $h * $r;
- last LOGO;
- };
- # default "LR"
- $x = $self->{gifx} - $r_margin - $r * $w;
- $y = $self->{gify} - $b_margin - $r * $h;
- last LOGO;
- }
- $graph->copyResized($glogo, $x, $y, 0, 0, $r * $w, $r * $h, $w, $h);
- undef $glogo;
- }
-
- # Set a colour to work with on the canvas, by rgb value.
- # Return the colour index in the palette
-
- sub set_clr($$$$) # GD::Image, r, g, b
- {
- my $s = shift;
- my $g = shift;
- my $i;
-
- # Check if this colour already exists on the canvas
- if ( ( $i = $g->colorExact( @_ ) ) < 0 )
- {
- # if not, allocate a new one, and return it's index
- return $g->colorAllocate( @_ );
- }
- return $i;
- }
-
- # Set a colour, disregarding wether or not it already exists.
-
- sub set_clr_uniq($$$$) # GD::Image, r, g, b
- {
- my $s=shift;
- my $g=shift;
-
- $g->colorAllocate( @_ );
- }
-
- # Return an array of rgb values for a colour number
-
- sub pick_data_clr($) # number
- {
- my $s = shift;
-
- # Set up the data colour list if it doesn't exist yet.
- # It seemed easier & more robust to me to do it here rather than
- # relying on users doing it. AF
- $s->set(
- dclrs => [ qw(lred lgreen lblue lyellow lpurple lbrown cyan
- lorange marine dyellow red green yellow blue
- lgray dbrown purple orange pink gold)]
- ) unless ( exists $s->{dclrs} );
-
- return _rgb( $s->{dclrs}[ $_[0] % (1+$#{$s->{dclrs}}) -1 ] );
- }
-
- # DEBUGGING
- # data_dump obsolete now, use Data::Dumper
-
- sub die_abstract()
- {
- my $s = shift;
- my $msg = shift;
- # ABSTRACT
- die
- "Subclass (" .
- ref($s) .
- ") not implemented correctly: " .
- (defined($msg) ? $msg : "unknown error");
- }
-
- # Return the gif contents
-
- sub gifdata()
- {
- my $s = shift;
-
- return $s->{graph}->gif;
- }
-
-} # End of package GIFgraph
-
-$GIFgraph::prog_name;
-
-__END__
-
-=head1 NAME
-
-GIFgraph - Graph Plotting Module for Perl 5
-
-=head1 SYNOPSIS
-
-use GIFgraph::moduleName;
-
-=head1 DESCRIPTION
-
-B<GIFgraph> is a I<perl5> module to create and display GIF output
-for a graph.
-The following classes for graphs with axes are defined:
-
-=over 4
-
-=item C<GIFgraph::lines>
-
-Create a line chart.
-
-=item C<GIFgraph::bars>
-
-Create a bar chart.
-
-=item C<GIFgraph::points>
-
-Create an chart, displaying the data as points.
-
-=item C<GIFgraph::linespoints>
-
-Combination of lines and points.
-
-=item C<GIFgraph::area>
-
-Create a graph, representing the data as areas under a line.
-
-=item C<GIFgraph::mixed>
-
-Create a mixed type graph, any combination of the above. At the moment
-this is fairly limited. Some of the options that can be used with some
-of the individual graph types won't work very well. Multiple bar
-graphs in a mixed graph won't display very nicely.
-
-=back
-
-Additional types:
-
-=over 4
-
-=item C<GIFgraph::pie>
-
-Create a pie chart.
-
-=back
-
-=head1 EXAMPLES
-
-See the samples directory in the distribution.
-
-=head1 USAGE
-
-Fill an array of arrays with the x values and the values of the data
-sets. Make sure that every array is the same size, otherwise
-I<GIFgraph> will complain and refuse to compile the graph.
-
- @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4]
- [ sort { $a <=> $b } (1, 2, 5, 6, 3, 1.5, 1, 3, 4) ]
- );
-
-If you don't have a value for a point in a certain dataset, you can
-use B<undef>, and I<GIFgraph> will skip that point.
-
-Create a new I<GIFgraph> object by calling the I<new> operator on the
-graph type you want to create (I<chart> is I<bars, lines, points,
-linespoints> or I<pie>).
-
- $my_graph = new GIFgraph::chart( );
-
-Set the graph options.
-
- $my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'Some simple graph',
- y_max_value => 8,
- y_tick_number => 8,
- y_label_skip => 2
- );
-
-Output the graph
-
- $my_graph->plot_to_gif( "sample01.gif", \@data );
-
-=head1 METHODS AND FUNCTIONS
-
-=head2 Methods for all graphs
-
-=over 4
-
-=item new GIFgraph::chart([width,height])
-
-Create a new object $graph with optional width and heigth.
-Default width = 400, default height = 300. I<chart> is either
-I<bars, lines, points, linespoints, area> or I<pie>.
-
-=item set_text_clr( I<colour name> )
-
-Set the colour of the text. This will set the colour of the titles,
-labels, and axis labels to I<colour name>. Also see the options
-I<textclr>, I<labelclr> and I<axislabelclr>.
-
-=item set_title_font( I<fontname> )
-
-Set the font that will be used for the title of the chart. Possible
-choices are defined in L<GD>.
-B<NB.> If you want to use this function, you'll
-need to use L<GD>. At some point I'll rewrite this, so you can give this a
-number from 1 to 4, or a string like 'large' or 'small'. On the other
-hand, I might not, if Thomas Boutell decides to support more fonts.
-
-=item plot( I<\@data> )
-
-Plot the chart, and return the GIF data.
-
-=item plot_to_gif( F<filename>, I<\@data> )
-
-Plot the chart, and write the GIF data to I<filename>.
-
-=item set( key1 => value1, key2 => value2 .... )
-
-Set chart options. See OPTIONS section.
-
-=back
-
-=head2 Methods for Pie charts
-
-=over 4
-
-=item set_label_font( I<fontname> )
-
-=item set_value_font( I<fontname> )
-
-Set the font that will be used for the label of the pie or the
-values on the pie. Possible choices are defined in L<GD>.
-See also I<set_title_font>.
-
-=back
-
-
-=head2 Methods for charts with axes.
-
-=over 4
-
-=item set_x_label_font ( I<font name> )
-
-=item set_y_label_font ( I<font name> )
-
-=item set_x_axis_font ( I<font name> )
-
-=item set_y_axis_font ( I<font name> )
-
-Set the font for the x and y axis label, and for the x and y axis
-value labels.
-See also I<set_title_font>.
-
-=back
-
-
-=head1 OPTIONS
-
-=head2 Options for all graphs
-
-=over 4
-
-=item gifx, gify
-
-The width and height of the gif file in pixels
-Default: 400 x 300.
-B<NB> At the moment, these are read-only options. If you want to set
-the size of a graph, you will have to do that with the I<new> method.
-
-=item t_margin, b_margin, l_margin, r_margin
-
-Top, bottom, left and right margin of the GIF. These margins will be
-left blank.
-Default: 0 for all.
-
-=item logo
-
-Name of a logo file. This should be a GIF file.
-Default: no logo.
-
-=item logo_resize, logo_position
-
-Factor to resize the logo by, and the position on the canvas of the
-logo. Possible values for logo_position are 'LL', 'LR', 'UL', and
-'UR'. (lower and upper left and right).
-Default: 'LR'.
-
-=item transparent
-
-If set to a true value, the produced GIF will have the background
-colour marked as transparent (see also option I<bgclr>). Default: 1.
-
-=item interlaced
-
-If set to a true value, the produced GIF will be interlaced.
-Default: 1.
-
-=item bgclr, fgclr, textclr, labelclr, axislabelclr, accentclr
-
-Background, foreground, text, label, axis label and accent colours.
-
-=item dclrs (short for datacolours)
-
-This controls the colours for the bars, lines, markers, or pie slices.
-This should be a reference to an array of colour names as defined in
-L<GIFgraph::colour> (C<S<perldoc GIFgraph::colour>> for the names available).
-
- $graph->set( dclrs => [ qw(green pink blue cyan) ] );
-
-The first (fifth, ninth) data set will be green, the next pink, etc.
-Default: [ qw(lred lgreen lblue lyellow lpurple cyan lorange) ]
-
-=back
-
-=head2 Options for graphs with axes.
-
-options for I<bars>, I<lines>, I<points>, I<linespoints> and
-I<area> charts.
-
-=over 4
-
-=item long_ticks, tick_length
-
-If I<long_ticks> is a true value, ticks will be drawn the same length
-as the axes. Otherwise ticks will be drawn with length
-I<tick_length>. if I<tick_length> is negative, the ticks will be drawn
-outside the axes. Default: long_ticks = 0, tick_length = 4.
-
-=item x_ticks
-
-If I<x_ticks> is a true value, ticks will be drawm for the x axis.
-These ticks are subject to the values of I<long_ticks> and
-I<tick_length>. Default: 1.
-
-=item y_tick_number
-
-Number of ticks to print for the Y axis. Use this, together with
-I<y_label_skip> to control the look of ticks on the y axis.
-Default: 5.
-
-=item y_number_format
-
-This can be either a string, or a reference to a subroutine. If it is
-a string, it will be taken to be the first argument to an sprintf,
-with the value as the second argument:
-
- $label = sprintf( $s->{y_number_format, $value );
-
-If it is a code reference, it will be executed with the value as the
-argument:
-
- $label = &{$s->{y_number_format}}($value);
-
-This can be useful, for example, if you want to reformat your values
-in currency, with the - sign in the right spot. Something like:
-
- sub y_format
- {
- my $value = shift;
- my $ret;
-
- if ($value >= 0)
- {
- $ret = sprintf("\$%d", $value * $refit);
- }
- else
- {
- $ret = sprintf("-\$%d", abs($value) * $refit);
- }
-
- return $ret;
- }
-
- $my_graph->set( 'y_number_format' => \&y_format );
-
-(Yes, I know this can be much shorter and more concise)
-
-Default: undef.
-
-=item x_label_skip, y_label_skip
-
-Print every I<x_label_skip>th number under the tick on the x axis, and
-every I<y_label_skip>th number next to the tick on the y axis.
-Default: 1 for both.
-
-=item x_all_ticks
-
-Force a print of all the x ticks, even if x_label_skip is set to a value
-Default: 0.
-
-=item x_label_position
-
-Controls the position of the X axis label (title). The value for this
-should be between 0 and 1, where 0 means aligned to the left, 1 means
-aligned to the right, and 1/2 means centered.
-Default: 3/4
-
-=item y_label_position
-
-Controls the position of both Y axis labels (titles). The value for
-this should be between 0 and 1, where 0 means aligned to the bottom, 1
-means aligned to the top, and 1/2 means centered.
-Default: 1/2
-
-=item x_labels_vertical
-
-If set to a true value, the X axis labels will be printed vertically.
-This can be handy in case these labels get very long.
-Default: 0.
-
-=item x_plot_values, y_plot_values
-
-If set to a true value, the values of the ticks on the x or y axes
-will be plotted next to the tick. Also see I<x_label_skip,
-y_label_skip>. Default: 1 for both.
-
-=item box_axis
-
-Draw the axes as a box, if true.
-Default: 1.
-
-=item two_axes
-
-Use two separate axes for the first and second data set. The first
-data set will be set against the left axis, the second against the
-right axis. If this is set to a true value, trying to use anything
-else than 2 datasets will generate an error. Default: 0.
-
-=item zero_axis
-
-If set to a true value, the axis for y values of 0 will always be
-drawn. This might be useful in case your graph contains negative
-values, but you want it to be clear where the zero value is. (see also
-I<zero_axis_only> and I<box_axes>).
-Default: 0.
-
-=item zero_axis_only
-
-If set to a true value, the zero axis will be drawn (see
-I<zero_axis>), and no axis at the bottom of the graph will be drawn.
-The labels for X values will be placed on the zero exis.
-Default: 0.
-
-=item y_max_value, y_min_value
-
-Maximum and minimum value displayed on the y axis. If two_axes is a
-true value, then y1_min_value, y1_max_value (for the left axis),
-and y2_min_value, y2_max_value (for the right axis) take precedence
-over these.
-
-The range (y_min_value..y_max_value) has to include all the values of
-the data points, or I<GIFgraph> will die with a message.
-
-For bar and area graphs, the range (y_min_value..y_max_value) has to
-include 0. If it doesn't, the values will be adapted before attempting
-to draw the graph.
-
-Default: Computed from data sets.
-
-=item axis_space
-
-This space will be left blank between the axes and the text.
-Default: 4.
-
-=item overwrite
-
-If set to 0, bars of different data sets will be drawn next to each
-other. If set to 1, they will be drawn in front of each other. If set
-to 2 they will be drawn on top of each other.
-Default: 0.
-
-If you have negative values in your data sets, setting overwrite to 2
-might produce odd results. Of course, the graph itself would be quite
-meaningless, because overwrite = 2 is meant to show some cumulative
-effect.
-
-=back
-
-=head2 Options for graphs with a numerical X axis
-
-First of all: GIFgraph does B<not> support numerical x axis the way it
-should. Data for X axes should be equally spaced. That understood:
-There is some support to make the printing of graphs with numerical X
-axis values a bit better, thanks to Scott Prahl. If the option
-C<x_tick_number> is set to a defined value, GIFgraph will attempt to
-treat the X data as numerical.
-
-Extra options are:
-
-=over 4
-
-=item x_tick_number
-
-If set to I<'auto'>, GIFgraph will attempt to format the X axis in a
-nice way, based on the actual X values. If set to a number, that's the
-number of ticks you will get. If set to undef, GIFgraph will treat X
-data as labels.
-Default: undef.
-
-=item x_min_value, x_max_value
-
-The minimum and maximum value to use for the X axis.
-Default: computed.
-
-=item x_number_format
-
-See y_number_format
-
-=item x_label_skip
-
-See y_label_skip
-
-=back
-
-
-=head2 Options for graphs with bars
-
-=over 4
-
-=item bar_spacing
-
-Number of pixels to leave open between bars. This works well in most
-cases, but on some platforms, a value of 1 will be rounded off to 0.
-Default: 0
-
-=back
-
-=head2 Options for graphs with lines
-
-=over 4
-
-=item line_types
-
-Which line types to use for I<lines> and I<linespoints> graphs. This
-should be a reference to an array of numbers:
-
- $graph->set( line_types => [3, 2, 4] );
-
-Available line types are 1: solid, 2: dashed, 3: dotted, 4:
-dot-dashed.
-
-Default: [1] (always use solid)
-
-=item line_type_scale
-
-Controls the length of the dashes in the line types. default: 6.
-
-=item line_width
-
-The width of the line used in I<lines> and I<linespoints> graphs, in pixels.
-Default: 1.
-
-=back
-
-=head2 Options for graphs with points
-
-=over 4
-
-=item markers
-
-This controls the order of markers in I<points> and I<linespoints>
-graphs. This should be a reference to an array of numbers:
-
- $graph->set( markers => [3, 5, 6] );
-
-Available markers are: 1: filled square, 2: open square, 3: horizontal
-cross, 4: diagonal cross, 5: filled diamond, 6: open diamond, 7:
-filled circle, 8: open circle.
-
-Default: [1,2,3,4,5,6,7,8]
-
-=item marker_size
-
-The size of the markers used in I<points> and I<linespoints> graphs,
-in pixels. Default: 4.
-
-=back
-
-=head2 Options for mixed graphs
-
-=over 4
-
-=item types
-
-A reference to an array with graph types, in the same order as the
-data sets. Possible values are:
-
- $graph->set( types => [qw(lines bars points area linespoints)] );
- $graph->set( types => ['lines', undef, undef, 'bars'] );
-
-values that are undefined or unknown will be set to C<default_type>.
-
-Default: all set to C<default_type>
-
-=item default_type
-
-The type of graph to draw for data sets that either have no type set,
-or that have an unknown type set.
-
-Default: lines
-
-=back
-
-=head2 Graph legends (axestype graphs only)
-
-At the moment legend support is minimal.
-
-B<Methods>
-
-=over 4
-
-=item set_legend( I<@legend_keys> );
-
-Sets the keys for the legend. The elements of @legend_keys correspond
-to the data sets as provided to I<plot()> or I<plot_to_gif()>.
-
-If a key is I<undef> or an empty string, the legend entry will be skipped.
-
-=item set_legend_font( I<font name> );
-
-Sets the font for the legend text (see also I<set_title_font>).
-Default: GD::gdTinyFont.
-
-=back
-
-B<Options>
-
-=over 4
-
-=item legend_placement
-
-Where to put the legend. This should be a two letter key of the form:
-'B[LCR]|R[TCB]'. The first letter sigifies the placement (I<B>ottom or
-I<R>ight), and the second letter signifies the alignment (I<L>eft,
-I<R>ight, I<C>enter, I<T>op, or I<B>ottom).
-Default: 'BC'
-
-If the legend is placed at the bottom, some calculations will be made
-to ensure that there is some 'intelligent' wrapping going on. if the
-legend is placed at the right, all entries will be placed below each
-other.
-
-=item legend_spacing
-
-The number of pixels to place around a legend item, and between a
-legend 'marker' and the text.
-Default: 4
-
-=item legend_marker_width, legend_marker_height
-
-The width and height of a legend 'marker' in pixels.
-Defaults: 12, 8
-
-=item lg_cols
-
-If you, for some reason, need to force the legend at the bottom to
-have a specific number of columns, you can use this.
-Default: computed
-
-=back
-
-
-=head2 Options for pie graphs
-
-=over 4
-
-=item 3d
-
-If set to a true value, the pie chart will be drawn with a 3d look.
-Default: 1.
-
-=item pie_height
-
-The thickness of the pie when I<3d> is true.
-Default: 0.1 x GIF y size.
-
-=item start_angle
-
-The angle at which the first data slice will be displayed, with 0 degrees
-being "6 o'clock".
-Default: 0.
-
-=back
-
-=head1 NOTES
-
-All references to colours in the options for this module have been
-shortened to clr. The main reason for this was that I didn't want to
-support two spellings for the same word ('colour' and 'color')
-
-Wherever a colour is required, a colour name should be used from the
-package L<GIFgraph::colour>. C<S<perldoc GIFgraph::colour>> should give
-you the documentation for that module, containing all valid colour
-names. I will probably change this to read the systems rgb.txt file if
-it is available.
-
-Wherever a font name is required, a font from L<GD> should be used.
-
-=head1 AUTHOR
-
-Martien Verbruggen
-
-=head2 Contact info
-
-email: mgjv@comdyn.com.au
-
-=head2 Copyright
-
-Copyright (C) 1995-1998 Martien Verbruggen.
-All rights reserved. This package is free software; you can redistribute it
-and/or modify it under the same terms as Perl itself.
-
-=cut
-
-# WWW: L<http://www.tcp.chem.tue.nl/~tgtcmv/>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm b/src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm
deleted file mode 100644
index 0aabea6..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm
+++ /dev/null
@@ -1,182 +0,0 @@
-package GIFgraph::EvenlySpaced;
-
-use strict;
-
-use MRP::BaseClass;
-
-use vars qw(@ISA %fields $AUTOLOAD $VERSION);
-
-$VERSION = 1.0;
-
-sub AUTOLOAD {
- my $thing = shift;
- my ($package, $function) = $AUTOLOAD =~ m/^(.*)::([^:]+)$/;
- return if $function eq 'DESTROY';
-
- if(ref($thing)) {
- return $thing->_DelegateGraph->$function(@_);
- }
-# my $super = join '::', 'SUPER', $function;
-# return $thing->$super(@_);
- die "Could not find $AUTOLOAD via $thing ";
-}
-
-sub new {
- my $class = shift;
- my $graph = shift;
- my $self = new MRP::BaseClass;
- $self->rebless($class);
- $self->_DelegateGraph($graph);
- return $self;
-}
-
-sub plot {
- my ($self, $data) = @_;
- my $fudge = $self->fudge;
- my @processed;
-
- my @x = @{$data->[0]};
- my @distances;
- my ($min, $max) = ($x[0], $x[$#x]);
- my $len = $max-$min;
- foreach my $i (1 .. $#x) {
- $distances[$i-1] = $x[$i] - $x[$i-1];
- }
- my @sdist = sort { $a<=>$b } @distances;
-
- my $sd = shift @sdist;
- while(@sdist) {
- my $nd = shift @sdist;
- my $diff = $nd/$sd;
- $diff = $diff - int($diff);
- $diff = 1-$diff if $diff > 0.5;
- next if $diff < $fudge;
- my $rat = $nd/$sd;
- my $continue = 1;
- for(my $ax = 2; $continue; $ax++) {
- my $yx = $ax*$rat;
- if($yx !~ /\./) {
- $sd = $nd/$yx;
- $continue = 0;
- }
- }
- }
-
- my $lowest = shift @x;
- my $column = 0;
- for(my $newX = $min; ($newX-$sd) < $max; $newX+=$sd) {
- if($newX >= $lowest) {
- foreach my $series (0 .. $#$data) {
- push @{$processed[$series]}, $data->[$series][$column];
- }
- $column++;
- $lowest = shift @x;
- } else {
- foreach my $series (0 .. $#$data) {
- push @{$processed[$series]}, undef;
- }
- }
- }
-
- local $^W = undef;
- return $self->_DelegateGraph->plot(\@processed);
-}
-
-sub isa {
- my ($thing, $type) = @_;
- return $thing->_DelegateGraph->isa($type) || $thing->SUPER::isa($type);
-}
-
-BEGIN {
- @ISA = qw(MRP::BaseClass);
- %fields = (
- fudge => 0.1,
- _DelegateGraph => undef,
- );
- GIFgraph::EvenlySpaced->check4Clashes;
-}
-
-$VERSION;
-
-__END__
-
-=head1 NAME
-
-GIFgraph::EvenlySpaced - spaces the data points evenly
-
-=head1 DESCRIPTION
-
-This module wraps a GIFgraph object so that the data points become
-numericaly spaced (aproximately).
-
-=head1 SYNOPSIS
-
-Wrapps a GIFgraph object (probably a GIFgraph::lines) so that the x
-values are spaced numericaly. Use exactly as your GIFgraph object. Due
-to a problem I had with AUTOLOAD, it must be the outer wrapper class.
-
-=head1 Use
-
- $graph = new GIFgraph::lines(400,300);
- $es = new GIFgraph::EvenlySpaced($graph);
-
-or
-
- $graph = new GIFgraph::lines(400,300);
- $withmap = new GIFgraph::WithMap($graph);
- $es = new GIFgraph::EvenlySpaced($withmap);
-
-or even
-
- $es = new GIFgraph::EvenlySpaced(new GIFgraph::WithMap(new GIFgraph::lines(400,300)));
-
-etc. etc. etc.
-
-=head1 Functions
-
-=over
-
-=item new
-
-Returns a new GIFgraph::EvenlySpaced object
-
- $es = new GIFgraph::EvenlySpaced($parentGraph);
-
-where $parentGraph is any object that behaves like a GIFgraph::lines
-type object such as a GIFgraph::WithMap.
-
-=item plot
-
-This function is overridden to space the data numericaly along the
-x-axis.
-
-=back
-
-=head1 Fields
-
-=over
-
-=item fudge
-
-This is a fudge factor used in checking whether one number roughly
-devides into another. It defaults to 0.1 but if it is obviously doing
-silly things then change it. Good luck - I don't realy know how it
-works.
-
-=back
-
-=head1 Guts
-
-This module uses MRP::BaseClass to implement member access functions.
-
-To make the 'parent' object behave as if it the super class I have
-done some magic with AUTOLOAD. This has produced the restriction that
-you can not wrap an EvenlySpaced object inside another - such as
-WithMap - that also uses magic.
-
-@ISA does not include the parent type as it is not known. The isa()
-method is overridden to account for this.
-
-=head1 AUTHOR
-
-Matthew Pocock mrp@sanger.ac.uk
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm b/src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm
deleted file mode 100644
index b340306..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm
+++ /dev/null
@@ -1,189 +0,0 @@
-package GIFgraph::WithMap;
-
-use strict;
-use vars qw (@ISA %fields $AUTOLOAD $VERSION);
-use Carp;
-use CGI;
-
-use MRP::BaseClass;
-
-$VERSION = 1.0;
-
-# use AUTOLOAD to pass everything that we can't do to _GIFgraph.
-# don't know if this is kosha. AHHHH.
-sub AUTOLOAD {
- my $thing = shift;
- my ($package, $function) = $AUTOLOAD =~ m/^(.*)::([^:]+)$/;
-
- if(ref($thing)) {
- my $delegate = $thing->_GIFgraph;
- $function = join '::', $delegate, $function;
- return $thing->$function(@_);
- }
- die "Could not find method $AUTOLOAD via $thing";
-}
-
-sub isa {
- my ($thing, $type) = @_;
- return $thing->_GIFgraph->isa($type) || $thing->SUPER::isa($type);
-}
-
-sub new {
- my $class = shift;
- my $GIFgraph = shift;
- my $baseClass = new MRP::BaseClass;
-
- my $self = $class->rebless($GIFgraph, $baseClass);
-
- $self->_GIFgraph(ref $GIFgraph);
-
- return $self;
-}
-
-sub draw_data {
- my ($self, $gd, $data) = @_;
- my $fuzz = $self->fuzz;
- my $map = "";
- my $mapname = $self->mapname || confess "You must set the name for this map before calling plot";
- my $seriesnames = $self->seriesnames;
- my $links = $self->links;
-
- my $delegateFunc = join '::', $self->_GIFgraph, 'draw_data';
- $self->$delegateFunc($gd, $data);
-
- $map = '<MAP NAME="' . $mapname . '">'."\n";
- foreach my $series (1 .. $self->{numsets}) {
- my (@up, @down);
- foreach my $point (0 .. $self->{numpoints}) {
- next unless defined($$data[$series][$point]);
- my ($x, $y) = $self->val_to_pixel($point+1, $$data[$series][$point], $series);
- push @up, $x, $y+$fuzz;
- unshift @down, $x, $y-$fuzz;
- }
- my $seriesname = $seriesnames->[$series-1] || 'series '.$series;
- my $link = $links->[$series-1] || "#$seriesname";
- $map .= join("\n\t",
- '<AREA',
- 'alt="' . $seriesname . '"',
- 'href="' . $link . '"',
- 'onMouseOver="self.status=' . "'$seriesname'" . '; return true"',
- 'onMouseOut="self.status=' . "''" . '; return true"',
- 'shape=polygon',
- 'coords="' . join(', ', @up, @down) . '"',
- );
- $map .= ">\n";
- }
- $map .= "</MAP>\n";
-
- $self->map($map);
-}
-
-BEGIN {
- @ISA = qw (MRP::BaseClass);
- %fields = (
- 'fuzz' => 1,
- 'map' => undef,
- 'mapname' => undef,
- 'seriesnames' => [],
- 'links' => [],
- '_GIFgraph' => undef,
- );
- GIFgraph::WithMap->check4Clashes;
-}
-
-$VERSION;
-
-__END__
-
-=head1 NAME
-
-GIFgraph::WithMap - generates HTML map text while plotting graph
-
-=head1 DESCRIPTION
-
-Generates the html map block for a graph so that data series become
-'clickable',
-
-=head1 SYNOPSIS
-
-This module extends GIFgraph objects such as GIFgraph::lines. You can
-do everything that you would with a GIFgraph object. In addition, when
-the data is plotted, it generates some MAP html text.
-
-The series will be labeled 'series 1', 'series 2' etc. unless the
-$obj->seriesnames has been set. For each series, it will create a
-polygon area, with the following structure (assuming series is named
-'Green', and that the links member array is empty:
-
- <AREA
- alt="Green"
- href="#Green"
- onMouseOver="self.status='Green'; return true"
- onMouseOut="self.status=''; return true"
- shape=polygon
- coords="87, 41, 165, 250, 165, 246, 87, 37">
-
-So - clicking on the series will take you to #Green. If you don't
-specify #Green in the document, clicking on it will do very little. If
-you have (e.g. in the key) then it should take you there.
-
-=head1 new
-
-Use something like
-
- $map = new GIFgraph::WithMap(new GIFgraph::lines(400,300));
-
-=head1 fields
-
-=over
-
-=item map
-
-Once plot has been called, map contains the map text.
-
- print $graphWithMap->map;
-
-=item fuzz
-
-This is the up/down fuzz used to construct the ploygon. It defaults to
-1 - so the polygon will be three pixles wide (the pixle drawn and one
-above and below it).
-
-=item mapname
-
-Set this before calling plot. This is the name of the map, as given by
-usemap="#mapname" in <img>. It is a fatal error to try to plot without
-a name.
-
-=item seriesnames
-
-Array of names for the series. If a name is absent for a series (or
-all series) then it will be named Series #. This must be set before
-the graph is plotted.
-
- $graphWithMap->seriesnames('name1', 'name2');
-
-=links
-
-Array of links for the series. If a link is absent for a series (or
-all series) then it will be named #SeriesName (where SeriesName is
-generated as described in L<seriwsnames>).
-
-=back
-
-=head1 Guts
-
-This module uses MRP::BaseClass to implement member access functions.
-
-In the constructor, a new object is created that is a meld of an
-MRP::BaseClass derived object, and the GIFgraph object passed in. The
-type of that object is stoored in _GIFgraph. In AUTOLOAD, first I
-check to see if the GIFgraph object's package named in _GIFgraph
-implements the function. If it does, then I return the value of that
-function - i.e. it behaves as if the object inherits from that
-package. If that fails, then I return the value of SUPER::AUTLOLOAD,
-which will presumably handle it or die gracefully. Hey presto -
-dynamic parenting.
-
-@ISA does not include anything to implement a GIFgraph object as a
-parent. However, I have overridden 'isa' to account for this.
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/area.pm b/src/contrib/whodo/GIFgraph/GIFgraph/area.pm
deleted file mode 100644
index 4c23e6d..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/area.pm
+++ /dev/null
@@ -1,73 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::area.pm
-#
-# $Id: area.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::area;
-
-use strict qw(vars refs subs);
-
-use GIFgraph::axestype;
-
-@GIFgraph::area::ISA = qw( GIFgraph::axestype );
-
-{
- # PRIVATE
- sub draw_data_set($$$) # GD::Image, \@data, $ds
- {
- my $s = shift; # object reference
- my $g = shift; # gd object reference
- my $d = shift; # reference to data set
- my $ds = shift; # number of the data set
-
- my $num = 0;
-
- # Select a data colour
- my $dsci = $s->set_clr( $g, $s->pick_data_clr($ds) );
-
- # Create a new polygon
- my $poly = new GD::Polygon();
-
- # Add the first 'zero' point
- my ($x, $y) = $s->val_to_pixel(1, 0, $ds);
- $poly->addPt($x, $y);
-
- # Add the data points
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- next unless (defined $d->[$i]);
-
- ($x, $y) = $s->val_to_pixel($i + 1, $d->[$i], $ds);
- $poly->addPt($x, $y);
-
- $num = $i;
- }
-
- # Add the last zero point
- ($x, $y) = $s->val_to_pixel($num + 1, 0, $ds);
- $poly->addPt($x, $y);
-
- # Draw a filled and a line polygon
- $g->filledPolygon($poly, $dsci);
- $g->polygon($poly, $s->{acci});
-
- # Draw the accent lines
- for $i (1 .. ($s->{numpoints} - 1))
- {
- next unless (defined $d->[$i]);
-
- ($x, $y) = $s->val_to_pixel($i + 1, $d->[$i], $ds);
- $g->dashedLine( $x, $y, $x, $s->{zeropoint}, $s->{acci} );
- }
- }
-
-} # End of package GIFgraph::area
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm b/src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm
deleted file mode 100644
index 147c8e5..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm
+++ /dev/null
@@ -1,923 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::axestype.pm
-#
-# $Id: axestype.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::axestype;
-
-use strict;
-
-use GIFgraph;
-use GIFgraph::legend;
-use GIFgraph::utils qw(:all);
-
-@GIFgraph::axestype::ISA = qw( GIFgraph::legend GIFgraph );
-
-my %Defaults = (
-
- # Set the length for the 'short' ticks on the axes.
-
- tick_length => 4,
-
- # Do you want ticks to span the entire width of the graph?
-
- long_ticks => 0,
-
- # Number of ticks for the y axis
-
- y_tick_number => 5,
- x_tick_number => undef, # CONTRIB Scott Prahl
-
- # Skip every nth label. if 1 will print every label on the axes,
- # if 2 will print every second, etc..
-
- x_label_skip => 1,
- y_label_skip => 1,
-
- # Do we want ticks on the x axis?
-
- x_ticks => 1,
- x_all_ticks => 0,
-
- # Where to place the x and y labels
-
- x_label_position => 3/4,
- y_label_position => 1/2,
-
- # vertical printing of x labels
-
- x_labels_vertical => 0,
-
- # Draw axes as a box? (otherwise just left and bottom)
-
- box_axis => 1,
-
- # Use two different axes for the first and second dataset. The first
- # will be displayed using the left axis, the second using the right
- # axis. You cannot use more than two datasets when this option is on.
-
- two_axes => 0,
-
- # Print values on the axes?
-
- x_plot_values => 1,
- y_plot_values => 1,
-
- # Space between axis and text
-
- axis_space => 4,
-
- # Do you want bars to be drawn on top of each other, or side by side?
-
- overwrite => 0,
-
- # Draw the zero axis in the graph in case there are negative values
-
- zero_axis => 0,
-
- # Draw the zero axis, but do not draw the bottom axis, in case
- # box-axis == 0
- # This also moves the x axis labels to the zero axis
- zero_axis_only => 0,
-
- # Format of the numbers on the x and y axis
-
- y_number_format => undef,
- x_number_format => undef, # CONTRIB Scott Prahl
-);
-
-{
-
- # PUBLIC
- sub plot($) # (\@data)
- {
- my $self = shift;
- my $data = shift;
-
- $self->check_data($data);
- $self->init_graph($self->{graph});
- $self->plot_legend($self->{graph});
- $self->setup_coords($data);
- $self->draw_text($self->{graph});
- $self->draw_axes($self->{graph}, $data);
- $self->draw_ticks($self->{graph}, $data);
- $self->draw_data($self->{graph}, $data);
-
- return $self->{graph}->gif
- }
-
- sub set_x_label_font($) # (fontname)
- {
- my $self = shift;
- $self->{xlf} = shift;
- $self->set(
- xlfw => $self->{xlf}->width,
- xlfh => $self->{xlf}->height,
- );
- }
- sub set_y_label_font($) # (fontname)
- {
- my $self = shift;
- $self->{ylf} = shift;
- $self->set(
- ylfw => $self->{ylf}->width,
- ylfh => $self->{ylf}->height,
- );
- }
- sub set_x_axis_font($) # (fontname)
- {
- my $self = shift;
- $self->{xaf} = shift;
- $self->set(
- xafw => $self->{xaf}->width,
- xafh => $self->{xaf}->height,
- );
- }
- sub set_y_axis_font($) # (fontname)
- {
- my $self = shift;
- $self->{yaf} = shift;
- $self->set(
- yafw => $self->{yaf}->width,
- yafh => $self->{yaf}->height,
- );
- }
-
- # PRIVATE
- # called on construction, by new
- # use inherited defaults
-
- sub initialise()
- {
- my $self = shift;
-
- $self->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $self->set( $key => $Defaults{$key} );
- }
-
- $self->set_x_label_font(GD::gdSmallFont);
- $self->set_y_label_font(GD::gdSmallFont);
- $self->set_x_axis_font(GD::gdTinyFont);
- $self->set_y_axis_font(GD::gdTinyFont);
- }
-
- # inherit check_data from GIFgraph
-
- sub setup_coords($)
- {
- my $s = shift;
- my $data = shift;
-
- # Do some sanity checks
- $s->{two_axes} = 0 if ( $s->{numsets} != 2 || $s->{two_axes} < 0 );
- $s->{two_axes} = 1 if ( $s->{two_axes} > 1 );
-
- delete $s->{y_label2} unless ($s->{two_axes});
-
- # Set some heights for text
- $s->set( tfh => 0 ) unless ( $s->{title} );
- $s->set( xlfh => 0 ) unless ( $s->{x_label} );
-
- if ( ! $s->{y1_label} && $s->{y_label} )
- {
- $s->{y1_label} = $s->{y_label};
- }
-
- $s->set( ylfh1 => $s->{y1_label} ? 1 : 0 );
- $s->set( ylfh2 => $s->{y2_label} ? 1 : 0 );
-
- $s->set( xafh => 0, xafw => 0 ) unless ($s->{x_plot_values});
- $s->set( yafh => 0, yafw => 0 ) unless ($s->{y_plot_values});
-
- $s->{x_axis_label_height} = $s->get_x_axis_label_height($data);
-
- my $lbl = ($s->{xlfh} ? 1 : 0) + ($s->{xafh} ? 1 : 0);
-
- # calculate the top and bottom of the bounding box for the graph
- $s->{bottom} =
- $s->{gify} - $s->{b_margin} - 1 -
- ( $s->{xlfh} ? $s->{xlfh} : 0 ) -
- ( $s->{x_axis_label_height} ? $s->{x_axis_label_height} : 0) -
- ( $lbl ? $lbl * $s->{text_space} : 0 );
-
- $s->{top} = $s->{t_margin} +
- ( $s->{tfh} ? $s->{tfh} + $s->{text_space} : 0 );
- $s->{top} = $s->{yafh}/2 if ( $s->{top} == 0 );
-
- $s->set_max_min($data);
-
- # Create the labels for the y_axes, and calculate the max length
-
- $s->create_y_labels();
- $s->create_x_labels(); # CONTRIB Scott Prahl
-
- # calculate the left and right of the bounding box for the graph
- my $ls = $s->{yafw} * $s->{y_label_len}[1];
- $s->{left} = $s->{l_margin} +
- ( $ls ? $ls + $s->{axis_space} : 0 ) +
- ( $s->{ylfh1} ? $s->{ylfh} + $s->{text_space} : 0 );
-
- $ls = $s->{yafw} * $s->{y_label_len}[2] if $s->{two_axes};
- $s->{right} = $s->{gifx} - $s->{r_margin} - 1 -
- $s->{two_axes} * (
- ( $ls ? $ls + $s->{axis_space} : 0 ) +
- ( $s->{ylfh2} ? $s->{ylfh} + $s->{text_space} : 0 )
- );
-
- # CONTRIB Scott Prahl
- # make sure that we can generate valid x tick marks
- undef($s->{x_tick_number}) if $s->{numpoints} < 2;
- undef($s->{x_tick_number}) if (
- !defined $s->{x_max} ||
- !defined $s->{x_min} ||
- $s->{x_max} == $s->{x_min}
- );
-
- # calculate the step size for x data
- # CONTRIB Changes by Scott Prahl
- if (defined $s->{x_tick_number})
- {
- my $delta = ($s->{right}-$s->{left})/($s->{x_max}-$s->{x_min});
- $s->{x_offset} =
- ($s->{true_x_min} - $s->{x_min}) * $delta + $s->{left};
- $s->{x_step} =
- ($s->{true_x_max} - $s->{true_x_min}) * $delta/$s->{numpoints};
- }
- else
- {
- $s->{x_step} = ($s->{right} - $s->{left})/($s->{numpoints} + 2);
- $s->{x_offset} = $s->{left};
- }
-
- # get the zero axis level
- my $dum;
- ($dum, $s->{zeropoint}) = $s->val_to_pixel(0, 0, 1);
-
- # Check the size
- die "Vertical Gif size too small"
- if ( ($s->{bottom} - $s->{top}) <= 0 );
-
- die "Horizontal Gif size too small"
- if ( ($s->{right} - $s->{left}) <= 0 );
-
- # More sanity checks
- $s->{x_label_skip} = 1 if ( $s->{x_label_skip} < 1 );
- $s->{y_label_skip} = 1 if ( $s->{y_label_skip} < 1 );
- $s->{y_tick_number} = 1 if ( $s->{y_tick_number} < 1 );
- }
-
- sub create_y_labels
- {
- my $s = shift;
-
- $s->{y_label_len}[1] = 0;
- $s->{y_label_len}[2] = 0;
-
- my $t;
- foreach $t (0 .. $s->{y_tick_number})
- {
- my $a;
- foreach $a (1 .. ($s->{two_axes} + 1))
- {
- my $label =
- $s->{y_min}[$a] +
- $t *
- ($s->{y_max}[$a] - $s->{y_min}[$a])/$s->{y_tick_number};
-
- $s->{y_values}[$a][$t] = $label;
-
- if (defined $s->{y_number_format})
- {
- if (ref $s->{y_number_format} eq 'CODE')
- {
- $label = &{$s->{y_number_format}}($label);
- }
- else
- {
- $label = sprintf($s->{y_number_format}, $label);
- }
- }
-
- my $len = length($label);
-
- $s->{y_labels}[$a][$t] = $label;
-
- ($len > $s->{y_label_len}[$a]) and
- $s->{y_label_len}[$a] = $len;
- }
- }
- }
-
- # CONTRIB Scott Prahl
- sub create_x_labels
- {
- my $s = shift;
- return unless defined($s->{x_tick_number});
-
- $s->{x_label_len} = 0;
-
- my $t;
- foreach $t (0..$s->{x_tick_number})
- {
- my $label =
- $s->{x_min} +
- $t * ($s->{x_max} - $s->{x_min})/$s->{x_tick_number};
-
- $s->{x_values}[$t] = $label;
-
- if (defined $s->{x_number_format})
- {
- if (ref $s->{x_number_format} eq 'CODE')
- {
- $label = &{$s->{x_number_format}}($label);
- }
- else
- {
- $label = sprintf($s->{x_number_format}, $label);
- }
- }
-
- my $len = length($label);
-
- $s->{x_labels}[$t] = $label;
-
- ($len > $s->{x_label_len}) and $s->{x_label_len} = $len;
- }
- }
-
-
- sub get_x_axis_label_height
- {
- my $s = shift;
- my $data = shift;
-
- return $s->{xafh} unless $s->{x_labels_vertical};
-
- my $len = 0;
- my $labels = $data->[0];
- my $label;
- foreach $label (@$labels)
- {
- my $llen = length($label);
- ($llen > $len) and $len = $llen;
- }
-
- return $len * $s->{xafw}
- }
-
- # inherit open_graph from GIFgraph
-
- sub draw_text($) # GD::Image
- {
- my $s = shift;
- my $g = shift;
-
- # Title
- if ($s->{tfh})
- {
- my $tx =
- $s->{left} +
- ($s->{right} - $s->{left})/2 -
- length($s->{title}) * $s->{tfw}/2;
- my $ty = $s->{top} - $s->{text_space} - $s->{tfh};
-
- $g->string($s->{tf}, $tx, $ty, $s->{title}, $s->{tci});
- }
-
- # X label
- if ($s->{xlfh})
- {
- my $tx =
- $s->{left} +
- $s->{x_label_position} * ($s->{right} - $s->{left}) -
- $s->{x_label_position} * length($s->{x_label}) * $s->{xlfw};
- my $ty = $s->{gify} - $s->{xlfh} - $s->{b_margin};
-
- $g->string($s->{xlf}, $tx, $ty, $s->{x_label}, $s->{lci});
- }
-
- # Y labels
- if ($s->{ylfh1})
- {
- my $tx = $s->{l_margin};
- my $ty =
- $s->{bottom} -
- $s->{y_label_position} * ($s->{bottom} - $s->{top}) +
- $s->{y_label_position} * length($s->{y1_label}) * $s->{ylfw};
-
- $g->stringUp($s->{ylf}, $tx, $ty, $s->{y1_label}, $s->{lci});
- }
- if ( $s->{two_axes} && $s->{ylfh2} )
- {
- my $tx = $s->{gifx} - $s->{ylfh} - $s->{r_margin};
- my $ty =
- $s->{bottom} -
- $s->{y_label_position} * ($s->{bottom} - $s->{top}) +
- $s->{y_label_position} * length($s->{y2_label}) * $s->{ylfw};
-
- $g->stringUp($s->{ylf}, $tx, $ty, $s->{y2_label}, $s->{lci});
- }
- }
-
- sub draw_axes($) # GD::Image
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- my ($l, $r, $b, $t) =
- ( $s->{left}, $s->{right}, $s->{bottom}, $s->{top} );
-
- if ( $s->{box_axis} )
- {
- $g->rectangle($l, $t, $r, $b, $s->{fgci});
- }
- else
- {
- $g->line($l, $t, $l, $b, $s->{fgci});
- $g->line($l, $b, $r, $b, $s->{fgci})
- unless ($s->{zero_axis_only});
- $g->line($r, $b, $r, $t, $s->{fgci})
- if ($s->{two_axes});
- }
-
- if ($s->{zero_axis} or $s->{zero_axis_only})
- {
- my ($x, $y) = $s->val_to_pixel(0, 0, 1);
- $g->line($l, $y, $r, $y, $s->{fgci});
- }
- }
-
- #
- # Ticks and values for y axes
- #
- sub draw_y_ticks($$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- #
- # Ticks and values for y axes
- #
- my $t;
- foreach $t (0 .. $s->{y_tick_number})
- {
- my $a;
- foreach $a (1 .. ($s->{two_axes} + 1))
- {
- my $value = $s->{y_values}[$a][$t];
- my $label = $s->{y_labels}[$a][$t];
-
- my ($x, $y) = $s->val_to_pixel(0, $value, $a);
- #my ($x, $y) = $s->val_to_pixel(
- # ($a-1) * ($s->{numpoints} + 2),
- # $value,
- # $a
- #);
-
- $x = ($a == 1) ? $s->{left} : $s->{right};
-
- if ($s->{long_ticks})
- {
- $g->line(
- $x, $y,
- $x + $s->{right} - $s->{left}, $y,
- $s->{fgci}
- ) unless ($a-1);
- }
- else
- {
- $g->line(
- $x, $y,
- $x + (3 - 2 * $a) * $s->{tick_length}, $y,
- $s->{fgci}
- );
- }
-
- next
- if ( $t % ($s->{y_label_skip}) || ! $s->{y_plot_values} );
-
- $x -=
- (2-$a) * length($label) * $s->{yafw} +
- (3 - 2 * $a) * $s->{axis_space};
- $y -= $s->{yafh}/2;
- $g->string($s->{yaf}, $x, $y, $label, $s->{alci});
- }
- }
- }
-
- #
- # Ticks and values for x axes
- #
- sub draw_x_ticks($$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- #
- # Ticks and values for X axis
- #
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- my ($x, $y) = $s->val_to_pixel($i + 1, 0, 1);
-
- $y = $s->{bottom} unless $s->{zero_axis_only};
-
- next
- if ( !$s->{x_all_ticks} and
- $i%($s->{x_label_skip}) and $i != $s->{numpoints} );
-
- if ($s->{x_ticks})
- {
- if ($s->{long_ticks})
- {
- $g->line(
- $x, $s->{bottom}, $x,
- $s->{top},
- $s->{fgci}
- );
- }
- else
- {
- $g->line( $x, $y, $x, $y - $s->{tick_length},
- $s->{fgci} );
- }
- }
-
- next
- if ( $i%($s->{x_label_skip}) and $i != $s->{numpoints} );
-
- if ($s->{x_labels_vertical})
- {
- $x -= $s->{xafw};
- my $yt =
- $y + $s->{text_space}/2 + $s->{xafw} * length($d->[0][$i]);
- $g->stringUp($s->{xaf}, $x, $yt, $d->[0][$i], $s->{alci});
- }
- else
- {
- $x -= $s->{xafw} * length($d->[0][$i])/2;
- my $yt = $y + $s->{text_space}/2;
- $g->string($s->{xaf}, $x, $yt, $d->[0][$i], $s->{alci});
- }
- }
- }
-
-
- # CONTRIB Scott Prahl
- # Assume x array contains equally spaced x-values
- # and generate an appropriate axis
- #
- sub draw_x_ticks_number($$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- my $i;
- for $i (0 .. $s->{x_tick_number})
- {
- my $value = $s->{numpoints}
- * ($s->{x_values}[$i] - $s->{true_x_min})
- / ($s->{true_x_max} - $s->{true_x_min});
-
- my $label = $s->{x_values}[$i];
-
- my ($x, $y) = $s->val_to_pixel($value + 1, 0, 1);
-
- $y = $s->{bottom} unless $s->{zero_axis_only};
-
- if ($s->{x_ticks})
- {
- if ($s->{long_ticks})
- {
- $g->line($x, $s->{bottom}, $x, $s->{top},$s->{fgci});
- }
- else
- {
- $g->line( $x, $y, $x, $y - $s->{tick_length}, $s->{fgci} );
- }
- }
-
- next
- if ( $i%($s->{x_label_skip}) and $i != $s->{x_tick_number} );
-
- if ($s->{x_labels_vertical})
- {
- $x -= $s->{xafw};
- my $yt =
- $y + $s->{text_space}/2 + $s->{xafw} * length($d->[0][$i]);
- $g->stringUp($s->{xaf}, $x, $yt, $label, $s->{alci});
- }
- else
- {
-# $x -= $s->{xafw} * length($$d[0][$i])/2;
- $x -= length($d->[0][$i])/2;
- my $yt = $y + $s->{text_space}/2;
- $g->string($s->{xaf}, $x, $yt, $label, $s->{alci});
- }
- }
- }
-
- sub draw_ticks($$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- $s->draw_y_ticks($g, $d);
-
- return unless ( $s->{x_plot_values} );
-
- if (defined $s->{x_tick_number})
- {
- $s->draw_x_ticks_number($g, $d);
- }
- else
- {
- $s->draw_x_ticks($g, $d);
- }
- }
-
- sub draw_data($$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- my $ds;
- foreach $ds (1 .. $s->{numsets})
- {
- $s->draw_data_set($g, $d->[$ds], $ds);
- }
- }
-
- # draw_data_set is in sub classes
-
- sub draw_data_set()
- {
- # ABSTRACT
- my $s = shift;
- $s->die_abstract( "sub draw_data missing, ")
- }
-
- # Figure out the maximum values for the vertical exes, and calculate
- # a more or less sensible number for the tops.
-
- sub set_max_min($)
- {
- my $s = shift;
- my $d = shift;
-
- my @max_min;
-
- # First, calculate some decent values
-
- if ( $s->{two_axes} )
- {
- my $i;
- for $i (1 .. 2)
- {
- my $true_y_min = get_min_y(@{$$d[$i]});
- my $true_y_max = get_max_y(@{$$d[$i]});
- ($s->{y_min}[$i], $s->{y_max}[$i], $s->{y_tick_number}) =
- _best_ends($true_y_min, $true_y_max, $s->{y_tick_number});
- }
- }
- else
- {
- my ($true_y_min, $true_y_max) = $s->get_max_min_y_all($d);
- ($s->{y_min}[1], $s->{y_max}[1], $s->{y_tick_number}) =
- _best_ends($true_y_min, $true_y_max, $s->{y_tick_number});
- }
-
- if (defined( $s->{x_tick_number} ))
- {
- $s->{true_x_min} = get_min_y(@{$d->[0]});
- $s->{true_x_max} = get_max_y(@{$d->[0]});
-
- ($s->{x_min}, $s->{x_max}, $s->{x_tick_number}) =
- _best_ends( $s->{true_x_min}, $s->{true_x_max},
- $s->{x_tick_number});
- }
-
- # Make sure bars and area always have a zero offset
-
- if (ref($s) eq 'GIFgraph::bars' or ref($s) eq 'GIFgraph::area')
- {
- $s->{y_min}[1] = 0 if $s->{y_min}[1] > 0;
- $s->{y_min}[2] = 0 if $s->{y_min}[2] && $s->{y_min}[2] > 0;
- }
-
- # Overwrite these with any user supplied ones
-
- $s->{y_min}[1] = $s->{y_min_value} if defined $s->{y_min_value};
- $s->{y_min}[2] = $s->{y_min_value} if defined $s->{y_min_value};
-
- $s->{y_max}[1] = $s->{y_max_value} if defined $s->{y_max_value};
- $s->{y_max}[2] = $s->{y_max_value} if defined $s->{y_max_value};
-
- $s->{y_min}[1] = $s->{y1_min_value} if defined $s->{y1_min_value};
- $s->{y_max}[1] = $s->{y1_max_value} if defined $s->{y1_max_value};
-
- $s->{y_min}[2] = $s->{y2_min_value} if defined $s->{y2_min_value};
- $s->{y_max}[2] = $s->{y2_max_value} if defined $s->{y2_max_value};
-
- $s->{x_min} = $s->{x_min_value} if defined $s->{x_min_value};
- $s->{x_max} = $s->{x_max_value} if defined $s->{x_max_value};
-
- # Check to see if we have sensible values
-
- if ( $s->{two_axes} )
- {
- my $i;
- for $i (1 .. 2)
- {
- die "Minimum for y" . $i . " too large\n"
- if ( $s->{y_min}[$i] > get_min_y(@{$d->[$i]}) );
- die "Maximum for y" . $i . " too small\n"
- if ( $s->{y_max}[$i] < get_max_y(@{$d->[$i]}) );
- }
- }
-# else
-# {
-# die "Minimum for y too large\n"
-# if ( $s->{y_min}[1] > $max_min[1] );
-# die "Maximum for y too small\n"
-# if ( $s->{y_max}[1] < $max_min[0] );
-# }
- }
-
- # return maximum value from an array
-
- sub get_max_y(@) # array
- {
- my $max = undef;
-
- my $i;
- foreach $i (@_)
- {
- next unless defined $i;
- $max = (defined($max) && $max >= $i) ? $max : $i;
- }
-
- return $max
- }
-
- sub get_min_y(@) # array
- {
- my $min = undef;
-
- my $i;
- foreach $i (@_)
- {
- next unless defined $i;
- $min = ( defined($min) and $min <= $i) ? $min : $i;
- }
-
- return $min
- }
-
- # get maximum y value from the whole data set
-
- sub get_max_min_y_all($) # \@data
- {
- my $s = shift;
- my $d = shift;
-
- my $max = undef;
- my $min = undef;
-
- if ($s->{overwrite} == 2)
- {
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- my $sum = 0;
-
- my $j;
- for $j (1 .. $s->{numsets})
- {
- $sum += $d->[$j][$i];
- }
-
- $max = _max( $max, $sum );
- $min = _min( $min, $sum );
- }
- }
- else
- {
- my $i;
- for $i ( 1 .. $s->{numsets} )
- {
- $max = _max( $max, get_max_y(@{$d->[$i]}) );
- $min = _min( $min, get_min_y(@{$d->[$i]}) );
- }
- }
-
- return ($max, $min)
- }
-
-
- # CONTRIB Scott Prahl
- #
- # Calculate best endpoints and number of intervals for an axis and
- # returns ($nice_min, $nice_max, $n), where $n is the number of
- # intervals and
- #
- # $nice_min <= $min < $max <= $nice_max
- #
- # Usage:
- # ($nmin,$nmax,$nint) = _best_ends(247, 508);
- # ($nmin,$nmax) = _best_ends(247, 508, 5);
- # use 5 intervals
- # ($nmin,$nmax,$nint) = _best_ends(247, 508, 4..7);
- # best of 4,5,6,7 intervals
-
- sub _best_ends {
- my ($min, $max, @n) = @_;
- my ($best_min, $best_max, $best_num) = ($min, $max, 1);
-
- # fix endpoints, fix intervals, set defaults
- ($min, $max) = ($max, $min) if ($min > $max);
- ($min, $max) = ($min) ? ($min * 0.5, $min * 1.5) : (-1,1)
- if ($max == $min);
-
- @n = (3..6) if (@n <= 0 || $n[0] =~ /auto/i);
-
- my $best_fit = 1e30;
- my $range = $max - $min;
-
- # create array of interval sizes
- my $s = 1;
- while ($s < $range) { $s *= 10 }
- while ($s > $range) { $s /= 10 }
- my @step = map {$_ * $s} (0.2, 0.5, 1, 2, 5);
-
- for (@n)
- {
- # Try all numbers of intervals
- my $n = $_;
- next if ($n < 1);
-
- for (@step)
- {
- next if ($n != 1) && ($_ < $range/$n); # $step too small
-
- my $nice_min = $_ * int($min/$_);
- $nice_min -= $_ if ($nice_min > $min);
- my $nice_max = ($n == 1)
- ? $_ * int($max/$_ + 1)
- : $nice_min + $n * $_;
- my $nice_range = $nice_max - $nice_min;
-
- next if ($nice_max < $max); # $nice_min too small
- next if ($best_fit <= $nice_range - $range); # not closer fit
-
- $best_min = $nice_min;
- $best_max = $nice_max;
- $best_fit = $nice_range - $range;
- $best_num = $n;
- }
- }
- return ($best_min, $best_max, $best_num)
- }
-
- # Convert value coordinates to pixel coordinates on the canvas.
-
- sub val_to_pixel($$$) # ($x, $y, $i) in real coords ($Dataspace),
- { # return [x, y] in pixel coords
- my $s = shift;
- my ($x, $y, $i) = @_;
-
- my $y_min =
- ($s->{two_axes} && $i == 2) ? $s->{y_min}[2] : $s->{y_min}[1];
-
- my $y_max =
- ($s->{two_axes} && $i == 2) ? $s->{y_max}[2] : $s->{y_max}[1];
-
- my $y_step = abs(($s->{bottom} - $s->{top})/($y_max - $y_min));
-
- return (
- _round( ($s->{x_tick_number} ? $s->{x_offset} : $s->{left})
- + $x * $s->{x_step} ),
- _round( $s->{bottom} - ($y - $y_min) * $y_step )
- )
- }
-
-} # End of package GIFgraph::axestype
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/bars.pm b/src/contrib/whodo/GIFgraph/GIFgraph/bars.pm
deleted file mode 100644
index 1bac098..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/bars.pm
+++ /dev/null
@@ -1,176 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::bars.pm
-#
-# $Id: bars.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::bars;
-
-use strict qw(vars refs subs);
-
-use GIFgraph::axestype;
-use GIFgraph::utils qw(:all);
-
-@GIFgraph::bars::ISA = qw( GIFgraph::axestype );
-
-my %Defaults = (
-
- # Spacing between the bars
- bar_spacing => 0,
-);
-
-{
- sub initialise()
- {
- my $self = shift;
-
- $self->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $self->set( $key => $Defaults{$key} );
- }
- }
-
- # PRIVATE
- sub draw_data{
-
- my $s = shift;
- my $g = shift;
- my $d = shift;
-
- if ( $s->{overwrite} )
- {
- $s->draw_data_overwrite($g, $d);
- }
- else
- {
- $s->SUPER::draw_data($g, $d);
- }
-
- # redraw the 'zero' axis
- $g->line(
- $s->{left}, $s->{zeropoint},
- $s->{right}, $s->{zeropoint},
- $s->{fgci} );
- }
-
- # Draws the bars on top of each other
-
- sub draw_data_overwrite {
-
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $bar_s = _round($s->{bar_spacing}/2);
-
- my $zero = $s->{zeropoint};
-
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- my $bottom = $zero;
- my ($xp, $t);
-
- my $j;
- for $j (1 .. $s->{numsets})
- {
- next unless (defined $d->[$j][$i]);
-
- # get data colour
- my $dsci = $s->set_clr( $g, $s->pick_data_clr($j) );
-
- # get coordinates of top and center of bar
- ($xp, $t) = $s->val_to_pixel($i + 1, $d->[$j][$i], $j);
-
- # calculate left and right of bar
- my $l = $xp - _round($s->{x_step}/2) + $bar_s;
- my $r = $xp + _round($s->{x_step}/2) - $bar_s;
-
- # calculate new top
- $t -= ($zero - $bottom) if ($s->{overwrite} == 2);
-
- # draw the bar
- if ($d->[$j][$i] >= 0)
- {
- # positive value
- $g->filledRectangle( $l, $t, $r, $bottom, $dsci );
- $g->rectangle( $l, $t, $r, $bottom, $s->{acci} );
- }
- else
- {
- # negative value
- $g->filledRectangle( $l, $bottom, $r, $t, $dsci );
- $g->rectangle( $l, $bottom, $r, $t, $s->{acci} );
- }
-
- # reset $bottom to the top
- $bottom = $t if ($s->{overwrite} == 2);
- }
- }
- }
-
- sub draw_data_set($$$)
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $ds = shift;
- my $bar_s = _round($s->{bar_spacing}/2);
-
- # Pick a data colour
- my $dsci = $s->set_clr( $g, $s->pick_data_clr($ds) );
-
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- next unless (defined $d->[$i]);
-
- # get coordinates of top and center of bar
- my ($xp, $t) = $s->val_to_pixel($i + 1, $d->[$i], $ds);
-
- # calculate left and right of bar
- my ($l, $r);
-
- if ($s->{mixed})
- {
- $l = $xp - _round($s->{x_step}/2) + $bar_s;
- $r = $xp + _round($s->{x_step}/2) - $bar_s;
- }
- else
- {
- $l = $xp
- - _round($s->{x_step}/2)
- + _round(($ds - 1) * $s->{x_step}/$s->{numsets})
- + $bar_s;
- $r = $xp
- - _round($s->{x_step}/2)
- + _round($ds * $s->{x_step}/$s->{numsets})
- - $bar_s;
- }
-
- # draw the bar
- if ($d->[$i] >= 0)
- {
- # positive value
- $g->filledRectangle( $l, $t, $r, $s->{zeropoint}, $dsci );
- $g->rectangle( $l, $t, $r, $s->{zeropoint}, $s->{acci} );
- }
- else
- {
- # negative value
- $g->filledRectangle( $l, $s->{zeropoint}, $r, $t, $dsci );
- $g->rectangle( $l, $s->{zeropoint}, $r, $t, $s->{acci} );
- }
- }
- }
-
-} # End of package GIFgraph::bars
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/colour.pm b/src/contrib/whodo/GIFgraph/GIFgraph/colour.pm
deleted file mode 100644
index 597736a..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/colour.pm
+++ /dev/null
@@ -1,290 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::colour.pm
-#
-# Description:
-# Package of colour manipulation routines, to be used
-# with GIFgraph.
-#
-# $Id: colour.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-
-package GIFgraph::colour;
-
-use vars qw( @EXPORT_OK %EXPORT_TAGS );
-use strict qw( vars refs subs );
-require Exporter;
-
-@GIFgraph::colour::ISA = qw( Exporter );
-
-$GIFgraph::colour::prog_name = 'GIFgraph::colour.pm';
-$GIFgraph::colour::prog_rcs_rev = '$Revision: 1.1.1.1 $';
-$GIFgraph::colour::prog_version =
- ($GIFgraph::colour::prog_rcs_rev =~ /\s+(\d*\.\d*)/) ? $1 : "0.0";
-
-@EXPORT_OK = qw(
- _rgb _luminance _hue
- colour_list sorted_colour_list
- read_rgb
-);
-%EXPORT_TAGS = (
- colours => [qw( _rgb _luminance _hue )],
- lists => [qw( colour_list sorted_colour_list )],
- files => [qw( read_rgb )],
- );
-
-{
- my %RGB = (
- white => [0xFF,0xFF,0xFF],
- lgray => [0xBF,0xBF,0xBF],
- gray => [0x7F,0x7F,0x7F],
- dgray => [0x3F,0x3F,0x3F],
- black => [0x00,0x00,0x00],
- lblue => [0x00,0x00,0xFF],
- blue => [0x00,0x00,0xBF],
- dblue => [0x00,0x00,0x7F],
- gold => [0xFF,0xD7,0x00],
- lyellow => [0xFF,0xFF,0x00],
- yellow => [0xBF,0xBF,0x00],
- dyellow => [0x7F,0x7F,0x00],
- lgreen => [0x00,0xFF,0x00],
- green => [0x00,0xBF,0x00],
- dgreen => [0x00,0x7F,0x00],
- lred => [0xFF,0x00,0x00],
- red => [0xBF,0x00,0x00],
- dred => [0x7F,0x00,0x00],
- lpurple => [0xFF,0x00,0xFF],
- purple => [0xBF,0x00,0xBF],
- dpurple => [0x7F,0x00,0x7F],
- lorange => [0xFF,0xB7,0x00],
- orange => [0xFF,0x7F,0x00],
- pink => [0xFF,0xB7,0xC1],
- dpink => [0xFF,0x69,0xB4],
- marine => [0x7F,0x7F,0xFF],
- cyan => [0x00,0xFF,0xFF],
- lbrown => [0xD2,0xB4,0x8C],
- dbrown => [0xA5,0x2A,0x2A],
- );
-
- sub colour_list
- {
- my $n = ( $_[0] ) ? $_[0] : keys %RGB;
- return (keys %RGB)[0 .. $n-1];
- }
-
- sub sorted_colour_list
- {
- my $n = $_[0] ? $_[0] : keys %RGB;
- return (sort by_luminance keys %RGB)[0 .. $n-1];
-# return (sort by_hue keys %rgb)[0..$n-1];
-
- sub by_luminance
- {
- _luminance(@{$RGB{$b}}) <=> _luminance(@{$RGB{$a}});
- }
- sub by_hue
- {
- _hue(@{$RGB{$b}}) <=> _hue(@{$RGB{$a}});
- }
-
- }
-
- # return the luminance of the colour (RGB)
- sub _luminance
- {
- (0.212671 * $_[0] + 0.715160 * $_[1] + 0.072169 * $_[2])/0xFF;
- }
-
- # return the hue of the colour (RGB)
- sub _hue
- {
- ($_[0] + $_[1] + $_[2])/(3 * 0xFF);
- }
-
-my %WarnedColours = ();
-
- # return the RGB values of the colour name
- sub _rgb
- {
- my $clr = shift;
- my $rgb_ref;
- $rgb_ref = $RGB{$clr} or do {
- $rgb_ref = $RGB{'black'};
- unless ($WarnedColours{$clr})
- {
- $WarnedColours{$clr} = 1;
- warn "Colour $clr is not defined, reverting to black";
- }
- };
- @{$rgb_ref};
- }
-
- sub version
- {
- return $GIFgraph::colour::prog_version;
- }
-
- sub dump_colours
- {
- my $max = $_[0] ? $_[0] : keys %RGB;
- my $n = 0;
-
- my $clr;
- foreach $clr (sorted_colour_list($max))
- {
- last if $n > $max;
- print "colour: $clr, " .
- "${$RGB{$clr}}[0], ${$RGB{$clr}}[1], ${$RGB{$clr}}[2]\n"
- }
- }
-
- #
- # Read a rgb.txt file (X11)
- #
- # Expected format of the file:
- #
- # R G B colour name
- #
- # Fields can be separated by any number of whitespace
- # Lines starting with an exclamation mark (!) are comment and
- # will be ignored.
- #
- # returns number of colours read
-
- sub read_rgb($) # (filename)
- {
- my $fn = shift;
- my $n = 0;
- my $line;
-
- open(RGB, $fn) or return 0;
-
- while (defined($line = <RGB>))
- {
- next if ($line =~ /\s*!/);
- chomp($line);
-
- # remove leading white space
- $line =~ s/^\s+//;
-
- # get the colours
- my ($r, $g, $b, $name) = split(/\s+/, $line, 4);
-
- # Ignore bad lines
- next unless (defined $name);
-
- $RGB{$name} = [$r, $g, $b];
- $n++;
- }
-
- close(RGB);
-
- return $n;
- }
-
- $GIFgraph::colour::prog_name;
-
-} # End of package Colour
-
-__END__
-
-=head1 NAME
-
-Colour - Colour manipulation routines for use with GIFgraph
-
-=head1 SYNOPSIS
-
-use GIFgraph::colour qw( :colours :lists :files );
-
-=head1 DESCRIPTION
-
-The B<Colour> Package provides a few routines to convert some colour
-names to RGB values. Also included are some functions to calculate
-the hue and luminance of the colours, mainly to be able to sort them.
-
-The :colours tags can be used to import the I<_rgb>, I<_hue>, and
-I<_luminance> functions, the :lists tag for I<colour_list> and
-I<sorted_colour_list>, and the :files tag exports the I<read_rgb>
-function.
-
-=head1 FUNCTIONS
-
-=over 4
-
-=item Colour::colour_list( I<number of colours> )
-
-Returns a list of I<number of colours> colour names known to the package.
-
-=item Colour::sorted_colour_list( I<number of colours> )
-
-Returns a list of I<number of colours> colour names known to the package,
-sorted by luminance or hue.
-B<NB.> Right now it always sorts by luminance. Will add an option in a later
-stage to decide sorting method at run time.
-
-=item Colour::_rgb( I<colour name> )
-
-Returns a list of the RGB values of I<colour name>.
-
-=item Colour::_hue( I<R,G,B> )
-
-Returns the hue of the colour with the specified RGB values.
-
-=item Colour::_luminance( I<R,G,B> )
-
-Returns the luminance of the colour with the specified RGB values.
-
-=item Colour::read_rgb( F<file name> )
-
-Reads in colours from a rgb file as used by the X11 system.
-
-Doing something like:
-
- use GIFgraph::bars;
- use GIFgraph::colour;
-
- GIFgraph::colour::read_rgb("rgb.txt") or die "cannot read colours";
-
-Will allow you to use any colours defined in rgb.txt in your graph.
-
-=back
-
-=head1 PREDEFINED COLOUR NAMES
-
-white,
-lgray,
-gray,
-dgray,
-black,
-lblue,
-blue,
-dblue,
-gold,
-lyellow,
-yellow,
-dyellow,
-lgreen,
-green,
-dgreen,
-lred,
-red,
-dred,
-lpurple,
-purple,
-dpurple,
-lorange,
-orange,
-pink,
-dpink,
-marine,
-cyan,
-lbrown,
-dbrown.
-
-=cut
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS b/src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS
deleted file mode 100644
index 42e029f..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS
+++ /dev/null
@@ -1,91 +0,0 @@
-UNRESOLVED BUGS
-
-+ two_axes doesn't work correctly with negative numbers and zero_axis
-+ y_max_value doesn't get adapted for bars and area if all negative values
-+ init_graph does too much work for pies. Needs to be split up.
-+ area chart doesn't do overwrite? Workaround: sum up your data sets,
- and order them backwards (highest one first). Output graph will look
- like it's incremental.
-+ only bar charts do overwrite. Necessary to implement generally?
-
-NOT REALLY BUGS
-
-- The whole naming of x_label.*, x_tick.*, x_axis.* is very confused
- and confusing. Hard to fix without breaking backward compatibility.
-- overwrite == 2 only makes sense if all the data is either positive,
- or negative
-- A positive y_min_value doesn't work with bars or area, bars and area
- always are set off against 0. Wether this is a bug, or wanted behaviour
- might be a point for discussion.
-- y_min_value doesn't automatically get adapted for bars and area if 0
- is not included in the range, but only if user sets it. If left to
- figure it out itself, GIFgraph does it right.
-
-FIXED IN 1.10
-
-! When first value of a dataset is undef for a lines graph, things go
- wrong.
- (report by Arto Nurmela <arto.nurmela@nmp.nokia.com>)
-
-FIXED IN 1.04
-
-! logo positioning and legends don't work very well together.
-
-FIXED IN 1.03
-
-! When data values are large, and x_min_value is larger than 0, the
- horizontal axis doesn't get drawm correctly. (check zero_axis option)
- (see sample41)
- (problem found after report from jackb@pgw.picker.com)
-
-FIXED IN 1.02
-
-! GIFgraph::Colour::read_rgb() falls over on comment lines.
- (reported: adamm@genomecorp.com)
-! GIFgraph::Colour::read_rgb() contains inline my-declaration of $line,
- breaks perl5.003
- (reported: Pat Becker <pmb@iss.net>)
-! if a colour name doesn't exist, program falls over with a cryptic message
- about some undefined array index.
- (reported: adamm@genomecorp.com)
-! x_label_skip doesn't skip ticks. (also added x_all_ticks option)
- (reported: adamm@genomecorp.com)
-
-FIXED IN 1.01
-
-! for loops break in 5.003 because of 'my' scoping (grrrr)
- (reported: Brian Eitrem <beitrem@digitalriver.com>)
-! ticks get drawn in front of the data set
- (reported: Honza Pazdziora <adelton@informatics.muni.cz>)
-! length estimate of y labels needs to be done better
- (reported: Honza Pazdziora <adelton@informatics.muni.cz>)
-
-FIXED IN 1.00
-
-! GIFgraph::colour::sorted_colour_list() syntax error
-! GIFgraph::colour pod documentation fixed
-! placement of title is centered on gif, not on graph.
-! linespoints graph type initialises two GD::Image objects
-! 'make test' fails on all tests on win32. binmode() needed.
-
-FIXED IN 0.99
-
-! Cannot use any 'null' values in graphs
- (reported: Lee Khandelwal <lee_khandelwal@il.us.swissbank.com>)
-
-FIXED IN 0.95
-
-! filled markers don't fill correctly when overlapping
-
-FIXED IN 0.94
-
-! area doesn't work with negative numbers
-! Right axis doesn't get drawn when box_axis == 0 and two_axes == 1
-! Color on front of 3D pies wrong with some data sets
- (reported: by various people)
-
-FIXED IN 0.91
-
-! Segmentation fault for 3d pies where last slice is small
- (reported: Dave Stafford <Dave.Stafford@mpn.cp.philips.com>)
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES b/src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES
deleted file mode 100644
index 2bc69a5..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES
+++ /dev/null
@@ -1,114 +0,0 @@
-Tue August 25 1998
-
-- Fixed bug with undef values for first value in lines graphs
-- Changed one or two samples, and samples Makefile dependencies
-
-Tue August 25 1998
-
-- Added bar_spacing option.
-- Fixed a slight drawing 'bug' while doing that.
-- Changed a few of the samples to use bar_spacing
-- Implemented numerical X axis, based on a changed axestype.pm from
- Scott Prahl <prahl@ece.ogi.edu>. many thanks.
-- Added sample54 to illustrate
-
-Tue August 18 1998
-
-- Added rudimentary mixed type graph
-
-Mon August 17 1998
-
-- Added control over axis label placement through x_label_position and
- y_label_position.
-- Added possibility to call a coderef to format the y labels. See
- y_number_format.
- (Idea: brian d foy <comdog@computerdog.com>)
-- Fixed some bugs (see file BUGS, version 1.04)
-
-Fri August 14 1998
-
-- Uploaded version 1.03 to CPAN
-
-- Finally able to make some fixes
-- Changed defaults for zero_axis and zero_axis_only to 0. Were both 1.
- Needed to do this, because of all the confusion they cause
-- Test for defined $s->{y_(min|max)_value}
- (Honza Pazdziora <adelton@informatics.muni.cz>)
- (Vegard Vesterheim <vegardv@runit.sintef.no>)
-- Fixed handling of negative values (I hope)
- (brian d foy <comdog@computerdog.com>)
-- From now on, require 5.004. 5.003 is dead, and should be deprecated
- now that 5.005 is out.
-- Added 5.005 specific MakeMaker fields to Makefile.PL
-
-Tue May 12 1998
-
-- Cleaned up a bit, finalised version 1.02, because of time
- contraints, and the need to get these bug fixes out. Didn't succeed.
-
-Mon Jan 19 1998
-
-- Fixed some bugs (see file BUGS, version 1.02)
-- Added option x_all_ticks, to force all x ticks to be printed, even
- if x_label_skip is set.
-- Added option x_labels_vertical, to print x labels vertical
- (Thanks to DBelcher <dbelcher@cyberhino.com> for a patch)
-
-Fri Jan 9 1998
-
-- Fixed some bugs (see file BUGS, version 1.01)
-- Added formatting for y labels (option y_label_format)
-
-Tue Dec 23 1997
-
-- Changed PERL=perl5 to PERL=perl in samples/Makefile (D'OH!)
-- Added read_rgb to GIFgraph::colour to allow definition of own colours
-- Added t/colour.t
-- Removed a lot of unnecessary quotes all over the place
-
-Mon Dec 22 1997
-
-- Center graph titles on axes, not on gif
-- Added line types
-- Moved initialise() to each module with $self->SUPER inheritance
-- Added check for duplicate GD::Image object initialisation
-- Added binmode() to t/ff.pl to make tests compatible with Win32
- platforms (D'OH).
-
-Thu Dec 18 1997
-
-- Allow undef values in data sets, and skip them
-- Added prototyping of functions
-- Legends, finally
- requests from Petter Reinholdtsen <pere@link.no>
- Giorgos Andreadakis <gand@forthnet.gr>
-
-Tue Dec 16 1997
-
-- Added documentation for dclrs and markers options
-- removed line_width and ReadFile from the documentation (unimplemented)
-- Started on port to win32
-- Changed Area to use Polygon and to work with negative numbers
-
-Mon Dec 15 1997
-
-- Added support for negative numbers in lines, points and linespoints
- graphs
-- Added new options: zero_axis, and zero_axis_only (code and documentation)
-- Added new options: y_min_value, y1_min_value, y2_min_value
-
-Fri Dec 12 1997
-
-- Changed 0 angle for pies to be at front/bottom, to make calculations a
- bit easier
-- Added test scripts for 'make test'
-
-Before Fri Dec 05 1997
-
-- Lots of minor tuning
-- Added x_ticks option
- requests from Will Mitayai Keeso Rowe - thelab@nmarcom.com
- mparvataneni@quadravision.com (Murali Parvataneni)
-- Added binmode() here and there to accommodate for platforms that need
- it.
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST b/src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST
deleted file mode 100644
index 2385824..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST
+++ /dev/null
@@ -1,83 +0,0 @@
-MANIFEST
-BUGS
-CHANGES
-README
-Makefile.PL
-GIFgraph.pm
-GIFgraph/area.pm
-GIFgraph/axestype.pm
-GIFgraph/bars.pm
-GIFgraph/colour.pm
-GIFgraph/lines.pm
-GIFgraph/linespoints.pm
-GIFgraph/mixed.pm
-GIFgraph/pie.pm
-GIFgraph/points.pm
-GIFgraph/utils.pm
-t/area.t
-t/area1.gif
-t/area2.gif
-t/bars.t
-t/bars1.gif
-t/bars2.gif
-t/colour.t
-t/colour_rgb.txt
-t/ff.pl
-t/legend.t
-t/legend1.gif
-t/legend2.gif
-t/legend3.gif
-t/lines.t
-t/lines1.gif
-t/linespoints.t
-t/linespoints1.gif
-t/logo.gif
-t/pie.t
-t/pie1.gif
-t/points.t
-t/points1.gif
-t/points2.gif
-samples/index.htm
-samples/sample11.htm
-samples/sample12.htm
-samples/sample13.htm
-samples/sample14.htm
-samples/sample15.htm
-samples/sample16.htm
-samples/sample21.htm
-samples/sample31.htm
-samples/sample41.htm
-samples/sample42.htm
-samples/sample51.htm
-samples/sample52.htm
-samples/sample53.htm
-samples/sample54.htm
-samples/sample61.htm
-samples/sample62.htm
-samples/sample91.htm
-samples/sample92.htm
-samples/sample93.htm
-samples/sample11.pl
-samples/sample12.pl
-samples/sample13.pl
-samples/sample14.pl
-samples/sample15.pl
-samples/sample16.pl
-samples/sample21.pl
-samples/sample31.pl
-samples/sample41.pl
-samples/sample42.pl
-samples/sample51.pl
-samples/sample52.pl
-samples/sample53.pl
-samples/sample54.pl
-samples/sample61.pl
-samples/sample62.pl
-samples/sample91.pl
-samples/sample92.pl
-samples/sample93.pl
-samples/sample42.dat
-samples/sample54.dat
-samples/rgb.txt
-samples/logo.gif
-samples/Makefile
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL b/src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL
deleted file mode 100644
index 91ac86f..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL
+++ /dev/null
@@ -1,35 +0,0 @@
-# This -*- perl -*- script makes the Makefile
-# $Id: Makefile.PL,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-
-#--- Distribution section ---
-
-$MODNAME = 'GIFgraph';
-
-BEGIN { require 5.001 }
-
-use ExtUtils::MakeMaker;
-
-my @clean = qw(*% *.html *.b[ac]k *.old .[A-z]* tags);
-push @clean, map { "*/$_" } @clean;
-
-WriteMakefile(
- 'VERSION_FROM' => $MODNAME . '.pm', #finds $VERSION
- 'DISTNAME' => $MODNAME,
- 'NAME' => $MODNAME,
-
- ($] >= 5.005 ?
- ('ABSTRACT' => 'Produces GIF graph plots',
- 'AUTHOR' => 'Martien Verbruggen (mgjv@comdyn.com.au)',
- ) : ()
- ),
-
- 'PREREQ_PM' => { 'GD' => 0, },
-
- 'dist' => {
- 'COMPRESS' => 'gzip -9f',
- 'SUFFIX' => 'gz',
- },
-
- 'clean' => { 'FILES' => join(" ", @clean), },
-);
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/README b/src/contrib/whodo/GIFgraph/GIFgraph/install/README
deleted file mode 100644
index 61693e3..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/install/README
+++ /dev/null
@@ -1,137 +0,0 @@
-This is GIFgraph 1.10, a package to generate GIF charts, using Lincoln
-Stein's GD.pm.
-
-INSTALLATION
-
-needed to install (also see TESTED PLATFORMS):
-
- perl 5.004
- GD > 1.14
-
-to install:
-
- perl Makefile.PL
- make
- make test
- make install
-
-NB: make test may report errors. If you are not using GD 1.18 this is
-normal. Because of differences in the way GD implements fonts and
-polygons in the various versions, the produced GIFs will differ very
-slightly. If you see this behaviour, please 'make' the samples in the
-samples directory, and check the produced GIFs visually. If they look
-ok, then GIFgraph is ok.
-
-to see some samples:
-
- cd samples
- make
-
-That should generate a set of gifs, which you can view using the HTML
-pages in the same directory (or whichever other way pleases you).
-
-The documentation available is contained in GIFgraph.pm, as pod.
-
-The latest release should normally be available from CPAN and from
-http://www.tcp.chem.tue.nl/~tgtcmv/perl/
-
-TESTED PLATFORMS (also see NOTES FOR WIN32)
-
-Latest version:
-- perl 5.004_04 on Solaris 2.6, GD 1.18
-- perl 5.005_02 on Solaris 2.6, GD 1.18
-
-Version 1.01:
-- perl 5.004_04 on Solaris 2.5.1, GD 1.15
-- perl 5.004_02 for win32 by Gurusamy Sarathy, GD (1.14 I think)
-- perl 5.004_04 HP-UX 10.20, GD 1.18 (Ronald Post)
-
-AUTHOR
-
-Martien Verbruggen
-mgjv@comdyn.com.au
-tgtcmv@chem.tue.nl
-
-MOST IMPORTANT CHANGES SINCE VERSION 1.04
-
-- added bar_spacing option
-- added limited support for numerical X axis for equidistant X values
- (NOT for a real numerical graph!), thanks to Scott Prahl.
-- routines to automatically 'guess' nice upper and lower values for
- graphs have been replaced by one written by Scott Prahl
-
-MOST IMPORTANT CHANGES SINCE VERSION 1.03
-
-- Added mixed type graph.
- GIFgraph::mixed
- options types and default_type
-- Added callback functionality to format y values
- option y_number_format
-- Added control over axis label placement
- option [xy]_label_position
-
-MOST IMPORTANT CHANGES SINCE VERSION 1.01
-
-- Vertical printing of X axis labels
-- CHANGED DEFAULTS for zero_axis and zero_axis_only
-- Fixed problems with negative values, data ranges without 0, and
- printing of the x axis labels (I hope)
-- No more support for perl 5.003. Since perl 5.005 is out, and I don't
- have a 5.003 here to test all the time, I won't support it anymore.
-
-MOST IMPORTANT CHANGES SINCE VERSION 0.91
-
-- Legends
-- Support for negative numbers
-- Ticks for X axis
-- line types and widths
-- Allow entries in data set to be undef (to skip them)
-- Changed 'zero' angle for pie charts (was right, now is front/bottom)
-- Definition of colours now possible. See GIFgraph::colour::read_rgb
- for details
-- See file CHANGES for more
-
-TODO
-
-- 3d look for graphs
-- logarithmic scaling
-- numerical X axes (halfway there)
-- Autoloading/splitting, etc
-
-BUG FIXES IN THIS VERSION
-
-See file BUGS
-
-NOTES FOR WIN32
-
-GIFgraph installs and runs well under Gurusamy Sarathy's port of perl
-for win32, and its usage is exactly the same as documented.
-
-The ActiveState port 5.003 for win32 can be used with Dave Roth's port
-of GD for win32. This port, however has a peculiarity. It is
-impossible to manipulate the gif data in memory (the GD::Image::gif()
-method always writes to a file descriptor, instead of returning the
-data). This makes the use of GIFgraph with that port impossible
-without a lot of work.
-This means that until someone ports GD for the ActiveState perl with
-full support for all its functionality, GIFgraph will not work on
-ActiveState's port 5.003.
-
-It may very well, and _should_ work on the 5.005 ports, although I
-have personally not tested that yet.
-
-THANKS
-
- Scott Prahl
- brian d foy
- Honza Pazdziora
- Dave Belcher
- Vegard Vesterheim
-
-COPYRIGHT
-
-Copyright (c) 1995-1997 Martien Verbruggen. All rights reserved.
-
-This package is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/legend.pm b/src/contrib/whodo/GIFgraph/GIFgraph/legend.pm
deleted file mode 100644
index 08429dc..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/legend.pm
+++ /dev/null
@@ -1,265 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::legend.pm
-#
-# $Id: legend.pm,v 1.0 1999/02/18
-#
-#==========================================================================
-
-package GIFgraph::legend;
-
-use strict qw(vars refs subs);
-
-use GIFgraph;
-use GIFgraph::utils qw(:all);
-
-@GIFgraph::legend::ISA = qw( GIFgraph );
-
-my %Defaults = (
-
- # Size of the legend markers
-
- legend_marker_height => 8,
- legend_marker_width => 12,
- legend_spacing => 4,
- legend_placement => 'BC', # '[B][LCR]'
-
-);
-
-{
-
- # PUBLIC
- sub plot_legend($) # GD::Image
- {
- my $s = shift;
- my $g = shift;
-
- $s->setup_legend();
- $s->draw_legend($g);
- }
-
- sub set_legend(@) # List of legend keys
- {
- my $self = shift;
- $self->set( legend => [@_]);
- }
-
- sub set_legend_font($) # (font name)
- {
- my $self = shift;
- $self->{lgf} = shift;
- $self->set(
- lgfw => $self->{lgf}->width,
- lgfh => $self->{lgf}->height,
- );
- }
-
- # PRIVATE
- # called on construction, by new
- # use inherited defaults
-
- sub initialise()
- {
- my $self = shift;
-
- $self->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $self->set( $key => $Defaults{$key} );
- }
-
- $self->set_legend_font(GD::gdTinyFont);
- }
-
- #
- # Legend
- #
-
- sub setup_legend()
- {
- my $s = shift;
-
- return unless defined($s->{legend});
-
- my $maxlen = 0;
- my $num = 0;
-
- # Save some variables
- $s->{r_margin_abs} = $s->{r_margin};
- $s->{b_margin_abs} = $s->{b_margin};
-
- my $legend;
- foreach $legend (@{$s->{legend}})
- {
- if (defined($legend) and $legend ne "")
- {
- my $len = length($legend);
- $maxlen = ($maxlen > $len) ? $maxlen : $len;
- $num++;
- }
- }
-
- $s->{lg_num} = $num;
-
- # calculate the height and width of each element
-
- my $text_width = $maxlen * $s->{lgfw};
- my $legend_height = _max($s->{lgfh}, $s->{legend_marker_height});
-
- $s->{lg_el_width} =
- $text_width + $s->{legend_marker_width} +
- 3 * $s->{legend_spacing};
- $s->{lg_el_height} = $legend_height + 2 * $s->{legend_spacing};
-
- my ($lg_pos, $lg_align) = split(//, $s->{legend_placement});
-
- if ($lg_pos eq 'R')
- {
- # Always work in one column
- $s->{lg_cols} = 1;
- $s->{lg_rows} = $num;
-
- # Just for completeness, might use this in later versions
- $s->{lg_x_size} = $s->{lg_cols} * $s->{lg_el_width};
- $s->{lg_y_size} = $s->{lg_rows} * $s->{lg_el_height};
-
- # Adjust the right margin for the rest of the graph
- $s->{r_margin} += $s->{lg_x_size};
-
- # Set the x starting point
- $s->{lg_xs} = $s->{gifx} - $s->{r_margin};
-
- # Set the y starting point, depending on alignment
- if ($lg_align eq 'T')
- {
- $s->{lg_ys} = $s->{t_margin};
- }
- elsif ($lg_align eq 'B')
- {
- $s->{lg_ys} = $s->{gify} - $s->{b_margin} - $s->{lg_y_size};
- }
- else # default 'C'
- {
- my $height = $s->{gify} - $s->{t_margin} - $s->{b_margin};
-
- $s->{lg_ys} =
- int($s->{t_margin} + $height/2 - $s->{lg_y_size}/2) ;
- }
- }
- else # 'B' is the default
- {
- # What width can we use
- my $width = $s->{gifx} - $s->{l_margin} - $s->{r_margin};
-
- (!defined($s->{lg_cols})) and
- $s->{lg_cols} = int($width/$s->{lg_el_width});
-
- $s->{lg_cols} = _min($s->{lg_cols}, $num);
-
- $s->{lg_rows} =
- int($num/$s->{lg_cols}) + (($num % $s->{lg_cols}) ? 1 : 0);
-
- $s->{lg_x_size} = $s->{lg_cols} * $s->{lg_el_width};
- $s->{lg_y_size} = $s->{lg_rows} * $s->{lg_el_height};
-
- # Adjust the bottom margin for the rest of the graph
- $s->{b_margin} += $s->{lg_y_size};
-
- # Set the y starting point
- $s->{lg_ys} = $s->{gify} - $s->{b_margin};
-
- # Set the x starting point, depending on alignment
- if ($lg_align eq 'R')
- {
- $s->{lg_xs} = $s->{gifx} - $s->{r_margin} - $s->{lg_x_size};
- }
- elsif ($lg_align eq 'L')
- {
- $s->{lg_xs} = $s->{l_margin};
- }
- else # default 'C'
- {
- $s->{lg_xs} =
- int($s->{l_margin} + $width/2 - $s->{lg_x_size}/2);
- }
-
- }
- }
-
- sub draw_legend($) # (GD::Image)
- {
- my $s = shift;
- my $g = shift;
-
- return unless defined($s->{legend});
-
- my $xl = $s->{lg_xs} + $s->{legend_spacing};
- my $y = $s->{lg_ys} + $s->{legend_spacing} - 1;
-
- my $i = 0;
- my $row = 1;
- my $x = $xl; # start position of current element
-
- my $legend;
- foreach $legend (@{$s->{legend}})
- {
- $i++;
-
- my $xe = $x; # position within an element
-
- next unless (defined($legend) && $legend ne "");
-
- $s->draw_legend_marker($g, $i, $xe, $y);
-
- $xe += $s->{legend_marker_width} + $s->{legend_spacing};
- my $ys = int($y + $s->{lg_el_height}/2 - $s->{lgfh}/2);
-
- $g->string($s->{lgf}, $xe, $ys, $legend, $s->{tci});
-
- $x += $s->{lg_el_width};
-
- if (++$row > $s->{lg_cols})
- {
- $row = 1;
- $y += $s->{lg_el_height};
- $x = $xl;
- }
- }
- }
-
- # This will be virtual; every sub class should define their own
- # if this one doesn't suffice
- sub draw_legend_marker($$$$) # (GD::Image, data_set_number, x, y)
- {
- my $s = shift;
- my $g = shift;
- my $n = shift;
- my $x = shift;
- my $y = shift;
-
- my $ci = $s->set_clr( $g, $s->pick_data_clr($n) );
-
- $y += int($s->{lg_el_height}/2 - $s->{legend_marker_height}/2);
-
- $g->filledRectangle(
- $x, $y,
- $x + $s->{legend_marker_width}, $y + $s->{legend_marker_height},
- $ci
- );
-
- $g->rectangle(
- $x, $y,
- $x + $s->{legend_marker_width}, $y + $s->{legend_marker_height},
- $s->{acci}
- );
-
- }
-
-} # End of package GIFgraph::legend
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/lines.pm b/src/contrib/whodo/GIFgraph/GIFgraph/lines.pm
deleted file mode 100644
index 8312155..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/lines.pm
+++ /dev/null
@@ -1,184 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::lines.pm
-#
-# $Id: lines.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::lines;
-
-use strict qw(vars refs subs);
-
-use GD;
-use GIFgraph::axestype;
-
-@GIFgraph::lines::ISA = qw( GIFgraph::axestype );
-
-my %Defaults = (
-
- # The width of the line to use in the lines and linespoints graphs
- # in pixels
-
- line_width => 1,
-
- # Set the scale of the line types
-
- line_type_scale => 8,
-
- # Which line typess to use
-
- line_types => [1],
-);
-
-{
- sub initialise()
- {
- my $self = shift;
-
- $self->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $self->set( $key => $Defaults{$key} );
- }
- }
-
- # PRIVATE
-
- sub draw_data_set($$$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $ds = shift;
-
- my $dsci = $s->set_clr( $g, $s->pick_data_clr($ds) );
- my $type = $s->pick_line_type($ds);
- my ($xb, $yb) = (defined $d->[0]) ?
- $s->val_to_pixel( 1, $d->[0], $ds) :
- (undef, undef);
-
-
- my $i;
- for $i (1 .. $s->{numpoints})
- {
- next unless (defined $d->[$i]);
-
- my ($xe, $ye) = $s->val_to_pixel($i+1, $d->[$i], $ds);
-
- $s->draw_line( $g, $xb, $yb, $xe, $ye, $type, $dsci )
- if defined $xb;
- ($xb, $yb) = ($xe, $ye);
- }
- }
-
- sub pick_line_type($)
- {
- my $s = shift;
- my $num = shift;
-
- if ( exists $s->{line_types} )
- {
- return $s->{line_types}[ $num % (1 + $#{$s->{line_types}}) - 1 ];
- }
-
- return $num % 4 ? $num % 4 : 4;
- }
-
- sub draw_line($$$$$$) # ($xs, $ys, $xe, $ye, $type, $colour_index)
- {
- my $s = shift;
- my $g = shift;
- my ($xs, $ys, $xe, $ye, $type, $clr) = @_;
-
- my $lw = $s->{line_width};
- my $lts = $s->{line_type_scale};
-
- my $style = gdStyled;
- my @pattern = ();
-
- LINE: {
-
- ($type == 2) && do {
- # dashed
-
- for (1 .. $lts) { push(@pattern, $clr) }
- for (1 .. $lts) { push(@pattern, gdTransparent) }
-
- $g->setStyle(@pattern);
-
- last LINE;
- };
-
- ($type == 3) && do {
- # dotted,
-
- for (1 .. 2) { push(@pattern, $clr) }
- for (1 .. 2) { push(@pattern, gdTransparent) }
-
- $g->setStyle(@pattern);
-
- last LINE;
- };
-
- ($type == 4) && do {
- # dashed and dotted
-
- for (1 .. $lts) { push(@pattern, $clr) }
- for (1 .. 2) { push(@pattern, gdTransparent) }
- for (1 .. 2) { push(@pattern, $clr) }
- for (1 .. 2) { push(@pattern, gdTransparent) }
-
- $g->setStyle(@pattern);
-
- last LINE;
- };
-
- # default: solid
- $style = $clr;
- }
-
- # Tried the line_width thing with setBrush, ugly results
- # TODO: This loop probably should be around the datasets
- # for nicer results
- my $i;
- for $i (1..$lw)
- {
- my $yslw = $ys + int($lw/2) - $i;
- my $yelw = $ye + int($lw/2) - $i;
-
- # Need the setstyle to reset
- $g->setStyle(@pattern) if (@pattern);
- $g->line( $xs, $yslw, $xe, $yelw, $style );
- }
- }
-
- sub draw_legend_marker($$$$) # (GD::Image, data_set_number, x, y)
- {
- my $s = shift;
- my $g = shift;
- my $n = shift;
- my $x = shift;
- my $y = shift;
-
- my $ci = $s->set_clr( $g, $s->pick_data_clr($n) );
- my $type = $s->pick_line_type($n);
-
- $y += int($s->{lg_el_height}/2);
-
- $s->draw_line(
- $g,
- $x, $y,
- $x + $s->{legend_marker_width}, $y,
- $type, $ci
- );
- }
-
-} # End of package GIFgraph::lines
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm b/src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm
deleted file mode 100644
index dd6e3d5..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm
+++ /dev/null
@@ -1,62 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::linespoints.pm
-#
-# $Id: linespoints.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::linespoints;
-
-use strict qw(vars refs subs);
-
-use GIFgraph::axestype;
-use GIFgraph::lines;
-use GIFgraph::points;
-
-# Even though multiple inheritance is not really a good idea,
-# since lines and points have the same parent class, I will do it here,
-# because I need the functionality of the markers and the line types
-
-@GIFgraph::linespoints::ISA = qw( GIFgraph::lines GIFgraph::points );
-
-{
- sub initialise()
- {
- my $s = shift;
-
- $s->GIFgraph::lines::initialise();
- $s->GIFgraph::points::initialise();
- }
-
- # PRIVATE
-
- sub draw_data_set($$$) # GD::Image, \@data, $ds
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $ds = shift;
-
- $s->GIFgraph::points::draw_data_set( $g, $d, $ds );
- $s->GIFgraph::lines::draw_data_set( $g, $d, $ds );
- }
-
- sub draw_legend_marker($$$$) # (GD::Image, data_set_number, x, y)
- {
- my $s = shift;
- my $g = shift;
- my $n = shift;
- my $x = shift;
- my $y = shift;
-
- $s->GIFgraph::points::draw_legend_marker($g, $n, $x, $y);
- $s->GIFgraph::lines::draw_legend_marker($g, $n, $x, $y);
- }
-
-} # End of package GIFgraph::linesPoints
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm b/src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm
deleted file mode 100644
index d8c9456..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm
+++ /dev/null
@@ -1,106 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::mixed.pm
-#
-# $Id: mixed.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::mixed;
-
-use strict;
-
-use GIFgraph::axestype;
-use GIFgraph::lines;
-use GIFgraph::points;
-use GIFgraph::linespoints;
-use GIFgraph::bars;
-use GIFgraph::area;
-
-# Even though multiple inheritance is not really a good idea, I will
-# do it here, because I need the functionality of the markers and the
-# line types We'll include axestype as the first one, to make sure
-# that's where we look first for methods.
-
-@GIFgraph::mixed::ISA = qw(
- GIFgraph::axestype
- GIFgraph::lines
- GIFgraph::points
-);
-
-my %Defaults = (
- default_type => 'lines',
- mixed => 1,
-);
-
-{
- sub initialise()
- {
- my $s = shift;
-
- $s->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $s->set( $key => $Defaults{$key} );
- }
-
- $s->GIFgraph::lines::initialise();
- $s->GIFgraph::points::initialise();
- $s->GIFgraph::bars::initialise();
- }
-
- sub draw_data_set($$$) # GD::Image, \@data, $ds
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $ds = shift;
-
- my $type = $s->{types}->[$ds-1] || $s->{default_type};
-
- # Try to execute the draw_data_set function in the package
- # specified by type
- #
- eval '$s->GIFgraph::'.$type.'::draw_data_set($g, $d, $ds)';
-
- # If we fail, we try it in the package specified by the
- # default_type, and warn the user
- #
- if ($@)
- {
- warn "Set $ds, unknown type $type, assuming $s->{default_type}\n";
-
- eval '$s->GIFgraph::'.
- $s->{default_type}.'::draw_data_set($g, $d, $ds)';
- }
-
- # If even that fails, we bail out
- #
- die "Set $ds: unknown default type $s->{default_type}\n" if $@;
- }
-
- sub draw_legend_marker($$$$) # (GD::Image, data_set_number, x, y)
- {
- my $s = shift;
- my $g = shift;
- my $ds = shift;
- my $x = shift;
- my $y = shift;
-
- my $type = $s->{types}->[$ds-1] || $s->{default_type};
-
- eval '$s->GIFgraph::'.$type.'::draw_legend_marker($g, $ds, $x, $y)';
-
- eval '$s->GIFgraph::'.
- $s->{default_type}.'::draw_legend_marker($g, $ds, $x, $y)' if $@;
-
- }
-
-} # End of package GIFgraph::linesPoints
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/pie.pm b/src/contrib/whodo/GIFgraph/GIFgraph/pie.pm
deleted file mode 100644
index 6128d3a..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/pie.pm
+++ /dev/null
@@ -1,375 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::pie.pm
-#
-# $Id: pie.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::pie;
-
-use strict qw(vars refs subs);
-
-use GIFgraph;
-use GIFgraph::legend;
-use GIFgraph::utils qw(:all);
-use GIFgraph::colour qw(:colours :lists);
-
-@GIFgraph::pie::ISA = qw( GIFgraph::legend GIFgraph );
-
-my $ANGLE_OFFSET = 90;
-
-my %Defaults = (
-
- # Set the height of the pie.
- # Because of the dependency of this on runtime information, this
- # is being set in GIFgraph::pie::initialise
-
- # pie_height => _round(0.1*${'gifx'}),
-
- # Do you want a 3D pie?
-
- '3d' => 1,
-
- # The angle at which to start the first data set
- # 0 is at the front/bottom
-
- start_angle => 0,
-);
-
-{
- # PUBLIC methods, documented in pod
- sub plot($) # (\@data)
- {
- my $self = shift;
- my $data = shift;
-
- $self->check_data($data);
- $self->init_graph($self->{graph});
- $self->plot_legend($self->{graph});
- $self->setup_coords();
- $self->draw_text($self->{graph});
- $self->draw_pie($self->{graph});
- $self->draw_data($data, $self->{graph});
-
- return $self->{graph}->gif;
- }
-
- sub set_label_font($) # (fontname)
- {
- my $self = shift;
-
- $self->{lf} = shift;
- $self->set(
- lfw => $self->{lf}->width,
- lfh => $self->{lf}->height,
- );
- }
-
- sub set_value_font($) # (fontname)
- {
- my $self = shift;
-
- $self->{vf} = shift;
- $self->set(
- vfw => $self->{vf}->width,
- vfh => $self->{vf}->height,
- );
- }
-
- # Inherit defaults() from GIFgraph
-
- # PRIVATE
- # called on construction by new.
- sub initialise()
- {
- my $self = shift;
-
- $self->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $self->set( $key => $Defaults{$key} );
- }
-
- $self->set( pie_height => _round(0.1 * $self->{gify}) );
-
- $self->set_value_font(GD::gdTinyFont);
- $self->set_label_font(GD::gdSmallFont);
- }
-
- # inherit checkdata from GIFgraph
-
- # Setup the coordinate system and colours, calculate the
- # relative axis coordinates in respect to the gif size.
-
- sub setup_coords()
- {
- my $s = shift;
-
- # Make sure we're not reserving space we don't need.
- $s->set(tfh => 0) unless ( $s->{title} );
- $s->set(lfh => 0) unless ( $s->{label} );
- $s->set('3d' => 0) if ( $s->{pie_height} <= 0 );
- $s->set(pie_height => 0) unless ( $s->{'3d'} );
-
- # Calculate the bounding box for the pie, and
- # some width, height, and centre parameters
- $s->{bottom} =
- $s->{gify} - $s->{pie_height} - $s->{b_margin} -
- ( $s->{lfh} ? $s->{lfh} + $s->{text_space} : 0 );
-
- $s->{top} =
- $s->{t_margin} + ( $s->{tfh} ? $s->{tfh} + $s->{text_space} : 0 );
-
- $s->{left} = $s->{l_margin};
-
- $s->{right} = $s->{gifx} - $s->{r_margin};
-
- ( $s->{w}, $s->{h} ) =
- ( $s->{right}-$s->{left}, $s->{bottom}-$s->{top} );
-
- ( $s->{xc}, $s->{yc} ) =
- ( ($s->{right}+$s->{left})/2, ($s->{bottom}+$s->{top})/2 );
-
- die "Vertical Gif size too small"
- if ( ($s->{bottom} - $s->{top}) <= 0 );
- die "Horizontal Gif size too small"
- if ( ($s->{right} - $s->{left}) <= 0 );
- }
-
- # inherit open_graph from GIFgraph
-
- # Put the text on the canvas.
- sub draw_text($) # (GD::Image)
- {
- my $s = shift;
- my $g = shift;
-
- if ( $s->{tfh} )
- {
- my $tx = $s->{xc} - length($s->{title}) * $s->{tfw}/2;
- $g->string($s->{tf}, $tx, $s->{t_margin}, $s->{title}, $s->{tci});
- }
-
- if ( $s->{lfh} )
- {
- my $tx = $s->{xc} - length($s->{label}) * $s->{lfw}/2;
- my $ty = $s->{gify} - $s->{b_margin} - $s->{lfh};
- $g->string($s->{lf}, $tx, $ty, $s->{label}, $s->{lci});
- }
- }
-
- # draw the pie, without the data slices
-
- sub draw_pie($) # (GD::Image)
- {
- my $s = shift;
- my $g = shift;
-
- my $left = $s->{xc} - $s->{w}/2;
-
- $g->arc(
- $s->{xc}, $s->{yc},
- $s->{w}, $s->{h},
- 0, 360, $s->{acci}
- );
-
- $g->arc(
- $s->{xc}, $s->{yc} + $s->{pie_height},
- $s->{w}, $s->{h},
- 0, 180, $s->{acci}
- ) if ( $s->{'3d'} );
-
- $g->line(
- $left, $s->{yc},
- $left, $s->{yc} + $s->{pie_height},
- $s->{acci}
- );
-
- $g->line(
- $left + $s->{w}, $s->{yc},
- $left + $s->{w}, $s->{yc} + $s->{pie_height},
- $s->{acci}
- );
- }
-
- # Draw the data slices
-
- sub draw_data($$) # (\@data, GD::Image)
- {
- my $s = shift;
- my $data = shift;
- my $g = shift;
-
- my $total = 0;
- my $j = 1; # for now, only one pie..
-
- my $i;
- for $i ( 0 .. $s->{numpoints} )
- {
- $total += $data->[$j][$i];
- }
- die "no Total" unless $total;
-
- my $ac = $s->{acci}; # Accent colour
- my $pb = $s->{start_angle};
-
- my $val = 0;
-
- for $i ( 0..$s->{numpoints} )
- {
- # Set the data colour. Colours index from 1 not 0.
- my $dc = $s->set_clr( $g, $s->pick_data_clr($i+1) );
-
- # Set the angles of the pie slice
- my $pa = $pb;
- $pb += 360 * $data->[1][$i]/$total;
-
- # Calculate the end points of the lines at the boundaries of
- # the pie slice
- my ($xe, $ye) =
- cartesian(
- $s->{w}/2, $pa,
- $s->{xc}, $s->{yc}, $s->{h}/$s->{w}
- );
-
- $g->line($s->{xc}, $s->{yc}, $xe, $ye, $ac);
-
- # Draw the lines on the front of the pie
- $g->line($xe, $ye, $xe, $ye + $s->{pie_height}, $ac)
- if ( in_front($pa) && $s->{'3d'} );
-
- # Make an estimate of a point in the middle of the pie slice
- # And fill it
- ($xe, $ye) =
- cartesian(
- 3 * $s->{w}/8, ($pa+$pb)/2,
- $s->{xc}, $s->{yc}, $s->{h}/$s->{w}
- );
-
- $g->fillToBorder($xe, $ye, $ac, $dc);
-
- # Horrible kludge by AF # $s->put_label($g, $xe, $ye, $data->[0][$i]);
-
- # If it's 3d, colour the front ones as well
- if ( $s->{'3d'} )
- {
- my ($xe, $ye) = $s->_get_pie_front_coords($pa, $pb);
-
- $g->fillToBorder($xe, $ye + $s->{pie_height}/2, $ac, $dc)
- if (defined($xe) && defined($ye));
- }
- }
-
- # More horrible kludge by AF
- $pb = $s->{start_angle};
- for $i ( 0..$s->{numpoints} )
- {
- my $pa = $pb;
- $pb += 360*$data->[1][$i]/$total;
- my ($xe, $ye) =
- cartesian(
- 3 * $s->{w}/8, ($pa+$pb)/2,
- $s->{xc}, $s->{yc}, $s->{h}/$s->{w}
- );
- $s->put_label($g, $xe, $ye, $$data[0][$i]);
- }
- } #GIFgraph::pie::draw_data
-
- sub _get_pie_front_coords($$) # (angle 1, angle 2)
- {
- my $s = shift;
- my $pa = level_angle(shift);
- my $pb = level_angle(shift);
-
- if (in_front($pa))
- {
- if (in_front($pb))
- {
- # both in front
- # don't do anything
- }
- else
- {
- # start in front, end in back
- $pb = $ANGLE_OFFSET;
- }
- }
- else
- {
- if (in_front($pb))
- {
- # start in back, end in front
- $pa = $ANGLE_OFFSET - 180;
- }
- else
- {
- # both in back
- return;
- }
- }
-
- my ($x, $y) =
- cartesian(
- $s->{w}/2, ($pa+$pb)/2,
- $s->{xc}, $s->{yc}, $s->{h}/$s->{w}
- );
-
- return ($x, $y);
- }
-
- # return true if this angle is on the front of the pie
-
- sub in_front($) # (angle)
- {
- my $a = level_angle( shift );
- ( $a > ($ANGLE_OFFSET - 180) && $a < $ANGLE_OFFSET ) ? 1 : 0;
- }
-
- # return a value for angle between -180 and 180
-
- sub level_angle($) # (angle)
- {
- my $a = shift;
- return level_angle($a-360) if ( $a > 180 );
- return level_angle($a+360) if ( $a <= -180 );
- return $a;
- }
-
- # put the label on the pie
-
- sub put_label($) # (GD:Image)
- {
- my $s = shift;
- my $g = shift;
-
- my ($x, $y, $label) = @_;
-
- $x -= length($label) * $s->{vfw}/2;
- $y -= $s->{vfw}/2;
- $g->string($s->{vf}, $x, $y, $label, $s->{alci});
- }
-
- # return x, y coordinates from input
- # radius, angle, center x and y and a scaling factor (height/width)
- #
- # $ANGLE_OFFSET is used to define where 0 is meant to be
- sub cartesian($$$$$)
- {
- my ($r, $phi, $xi, $yi, $cr) = @_;
- my $PI=4*atan2(1, 1);
-
- return (
- $xi + $r * cos($PI * ($phi + $ANGLE_OFFSET)/180),
- $yi + $cr * $r * sin($PI * ($phi + $ANGLE_OFFSET)/180)
- );
- }
-
-} # End of package GIFgraph::pie
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/points.pm b/src/contrib/whodo/GIFgraph/GIFgraph/points.pm
deleted file mode 100644
index 92bb425..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/points.pm
+++ /dev/null
@@ -1,177 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::points.pm
-#
-# $Id: points.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::points;
-
-use strict qw(vars refs subs);
-
-use GIFgraph::axestype;
-use GIFgraph::utils qw(:all);
-
-@GIFgraph::points::ISA = qw( GIFgraph::axestype );
-
-my %Defaults = (
-
- # The size of the marker to use in the points and linespoints graphs
- # in pixels
-
- marker_size => 4,
-);
-
-{
- sub initialise()
- {
- my $s = shift;
-
- $s->SUPER::initialise();
-
- my $key;
- foreach $key (keys %Defaults)
- {
- $s->set( $key => $Defaults{$key} );
- }
- }
-
- # PRIVATE
- sub draw_data_set($$$) # GD::Image, \@data
- {
- my $s = shift;
- my $g = shift;
- my $d = shift;
- my $ds = shift;
-
- # Pick a colour
- my $dsci = $s->set_clr( $g, $s->pick_data_clr($ds) );
- my $type = $s->pick_marker($ds);
-
- my $i;
- for $i (0 .. $s->{numpoints})
- {
- next unless (defined $d->[$i]);
- my ($xp, $yp) = $s->val_to_pixel($i+1, $d->[$i], $ds);
- $s->marker( $g, $xp, $yp, $type, $dsci );
- }
- }
-
- # Pick a marker type
-
- sub pick_marker($) # number
- {
- my $s = shift;
- my $num = shift;
-
- if ( exists $s->{markers} )
- {
- return $s->{markers}[ $num % (1 + $#{$s->{markers}}) - 1 ];
- }
-
- return ($num % 8) || 8;
- }
-
- # Draw a marker
-
- sub marker($$$$$) # $graph, $xp, $yp, type (1-7), $colourindex
- {
- my $self = shift;
-
- my ($graph, $xp, $yp, $mtype, $mclr) = @_;
-
- my $l = $xp - $self->{marker_size};
- my $r = $xp + $self->{marker_size};
- my $b = $yp + $self->{marker_size};
- my $t = $yp - $self->{marker_size};
-
- MARKER: {
-
- ($mtype == 1) && do
- { # Square, filled
- $graph->filledRectangle( $l, $t, $r, $b, $mclr );
- last MARKER;
- };
- ($mtype == 2) && do
- { # Square, open
- $graph->rectangle( $l, $t, $r, $b, $mclr );
- last MARKER;
- };
- ($mtype == 3) && do
- { # Cross, horizontal
- $graph->line( $l, $yp, $r, $yp, $mclr );
- $graph->line( $xp, $t, $xp, $b, $mclr );
- last MARKER;
- };
- ($mtype == 4) && do
- { # Cross, diagonal
- $graph->line( $l, $b, $r, $t, $mclr );
- $graph->line( $l, $t, $r, $b, $mclr );
- last MARKER;
- };
- ($mtype == 5) && do
- { # Diamond, filled
- $graph->line( $l, $yp, $xp, $t, $mclr );
- $graph->line( $xp, $t, $r, $yp, $mclr );
- $graph->line( $r, $yp, $xp, $b, $mclr );
- $graph->line( $xp, $b, $l, $yp, $mclr );
- $graph->fillToBorder( $xp, $yp, $mclr, $mclr );
- last MARKER;
- };
- ($mtype == 6) && do
- { # Diamond, open
- $graph->line( $l, $yp, $xp, $t, $mclr );
- $graph->line( $xp, $t, $r, $yp, $mclr );
- $graph->line( $r, $yp, $xp, $b, $mclr );
- $graph->line( $xp, $b, $l, $yp, $mclr );
- last MARKER;
- };
- ($mtype == 7) && do
- { # Circle, filled
- $graph->arc( $xp, $yp, 2 * $self->{marker_size},
- 2 * $self->{marker_size}, 0, 360, $mclr );
- $graph->fillToBorder( $xp, $yp, $mclr, $mclr );
- last MARKER;
- };
- ($mtype == 8) && do
- { # Circle, open
- $graph->arc( $xp, $yp, 2 * $self->{marker_size},
- 2 * $self->{marker_size}, 0, 360, $mclr );
- last MARKER;
- };
- }
- }
-
-
- sub draw_legend_marker($$$$) # (GD::Image, data_set_number, x, y)
- {
- my $s = shift;
- my $g = shift;
- my $n = shift;
- my $x = shift;
- my $y = shift;
-
- my $ci = $s->set_clr( $g, $s->pick_data_clr($n) );
-
- my $old_ms = $s->{marker_size};
- my $ms = _min($s->{legend_marker_height}, $s->{legend_marker_width});
-
- ($s->{marker_size} > $ms/2) and $s->{marker_size} = $ms/2;
-
- $x += int($s->{legend_marker_width}/2);
- $y += int($s->{lg_el_height}/2);
-
- $n = $s->pick_marker($n);
-
- $s->marker($g, $x, $y, $n, $ci);
-
- $s->{marker_size} = $old_ms;
- }
-
-} # End of package GIFgraph::Points
-
-1;
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile b/src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile
deleted file mode 100644
index 82f4049..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-PERL = perl
-.SUFFIXES: .gif .pl
-.SILENT:
-LIB = ..
-OPTIONS = -Tw
-
-GIFS = sample11.gif sample12.gif sample13.gif sample14.gif \
- sample15.gif sample16.gif \
- sample21.gif \
- sample31.gif \
- sample41.gif sample42.gif\
- sample51.gif sample52.gif sample53.gif sample54.gif \
- sample61.gif sample62.gif \
- sample91.gif sample92.gif sample93.gif
-
-all: $(GIFS)
-
-.pl.gif:
- $(PERL) $(OPTIONS) -I$(LIB) $<
-
-clean:
- rm -f $(GIFS)
-
-test:
- $(PERL) $(OPTIONS) -I$(LIB) -M$(MODULE) sample91.pl
-
-# Dependencies
-
-sample14.gif: logo.gif
-sample42.gif: sample42.dat
-sample54.gif: sample54.dat
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm
deleted file mode 100644
index bdcdc7b..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm
+++ /dev/null
@@ -1,39 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph examples</TITLE>
-</HEAD>
-
-<BODY>
-
-<H2>GIFgraph examples</H2>
-
-<UL>
-<LI><A HREF="sample11.htm">A simple bar chart</A>
-<LI><A HREF="sample12.htm">A bar chart with two data sets</A>
-<LI><A HREF="sample13.htm">A bar chart, two datasets, displayed on top of each other.</A>
-<LI><A HREF="sample14.htm">A bar chart, two datasets, using two axes.</A>
-<LI><A HREF="sample15.htm">A bar chart, two datasets, incremental.</A>
-<LI><A HREF="sample16.htm">A bar chart, two datasets, negative values.</A>
-</UL>
-<UL>
-<LI><A HREF="sample21.htm">An area graph</A>
-</UL>
-<UL>
-<LI><A HREF="sample31.htm">Points</A>
-</UL>
-<UL>
-<LI><A HREF="sample41.htm">Lines and points</A>
-<LI><A HREF="sample42.htm">The same graph, now reading data from a file</A>
-</UL>
-<UL>
-<LI><A HREF="sample51.htm">Just a line</A>
-<LI><A HREF="sample52.htm">A few lines</A>
-</UL>
-<UL>
-<LI><A HREF="sample91.htm">A 3d pie chart</A>
-<LI><A HREF="sample92.htm">A 3d pie chart in one colour</A>
-<LI><A HREF="sample93.htm">A flat pie chart.</A>
-</UL>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif b/src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif
deleted file mode 100644
index b3dc933..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif
+++ /dev/null
Binary files differ
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt b/src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt
deleted file mode 100644
index 78b353e..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt
+++ /dev/null
@@ -1,752 +0,0 @@
-199 21 133 medium violet red
-176 196 222 light steel blue
-102 139 139 paleturquoise4
-159 121 238 mediumpurple2
-141 182 205 lightskyblue3
- 0 238 118 springgreen2
-255 160 122 light salmon
-154 205 50 yellowgreen
-178 58 238 darkorchid2
- 69 139 116 aquamarine4
- 71 60 139 slateblue4
-131 111 255 slateblue1
-192 255 62 olivedrab1
-139 105 20 goldenrod4
-205 155 29 goldenrod3
-142 229 238 cadetblue2
-255 211 155 burlywood1
-112 128 144 slategrey
-255 228 225 mistyrose
- 50 205 50 limegreen
-224 255 255 lightcyan
-218 165 32 goldenrod
-220 220 220 gainsboro
-135 206 255 skyblue1
-240 255 240 honeydew
-238 238 0 yellow2
-205 79 57 tomato3
-135 206 235 skyblue
- 85 26 139 purple4
-205 133 0 orange3
-205 183 158 bisque3
-238 213 183 bisque2
- 87 87 87 grey34
-252 252 252 gray99
-161 161 161 gray63
-112 112 112 gray44
- 94 94 94 gray37
- 84 84 84 gray33
- 66 66 66 gray26
-240 255 255 azure1
-139 137 137 snow4
-205 133 63 peru
-219 112 147 pale violet red
-139 129 76 lightgoldenrod4
- 60 179 113 mediumseagreen
-255 240 245 lavender blush
-209 95 238 mediumorchid2
-176 226 255 lightskyblue1
- 72 61 139 darkslateblue
- 25 25 112 midnightblue
-255 160 122 lightsalmon1
-255 250 205 lemonchiffon
-173 255 47 green yellow
-255 160 122 lightsalmon
-240 128 128 light coral
- 24 116 205 dodgerblue3
-139 69 0 darkorange4
-106 90 205 slate blue
- 39 64 139 royalblue4
-255 69 0 orange red
- 50 205 50 lime green
-224 255 255 light cyan
-148 0 211 darkviolet
-233 150 122 darksalmon
-255 140 0 darkorange
- 95 158 160 cadet blue
-255 20 147 deep pink
-238 0 238 magenta2
-139 71 38 sienna4
-238 230 133 khaki2
-191 191 191 grey75
-189 189 189 grey74
-186 186 186 grey73
-176 176 176 grey69
-173 173 173 grey68
- 89 89 89 grey35
- 33 33 33 grey13
-229 229 229 gray90
-207 207 207 gray81
-140 140 140 gray55
-130 130 130 gray51
- 79 79 79 gray31
-238 233 233 snow2
-205 145 158 pink3
- 18 18 18 grey7
- 3 3 3 gray1
-139 0 0 red4
-205 0 0 red3
-210 180 140 tan
-255 0 0 red
-199 21 133 mediumvioletred
-119 136 153 lightslategrey
-135 206 250 lightskyblue
-139 87 66 lightsalmon4
- 34 139 34 forestgreen
- 16 78 139 dodgerblue4
-153 50 204 dark orchid
-188 143 143 rosy brown
-205 175 149 peachpuff3
-124 205 124 palegreen3
-238 64 0 orangered2
-122 139 139 lightcyan4
-139 58 58 indianred4
-205 85 85 indianred3
- 0 0 128 navyblue
-105 105 105 dim grey
-255 20 147 deeppink
-139 76 57 salmon4
-205 112 84 salmon3
-196 196 196 grey77
-145 145 145 gray57
- 28 28 28 gray11
-205 150 205 plum3
- 23 23 23 gray9
- 20 20 20 gray8
- 0 0 139 blue4
-245 245 220 beige
-250 250 210 light goldenrod yellow
-139 131 134 lavenderblush4
- 0 206 209 dark turquoise
- 0 206 209 darkturquoise
- 47 79 79 darkslategrey
-205 129 98 lightsalmon3
-139 105 105 rosybrown4
-255 228 225 misty rose
- 78 238 148 seagreen2
-205 92 92 indianred
-255 20 147 deeppink1
- 0 0 139 dark blue
-230 230 250 lavender
-253 245 230 oldlace
-199 199 199 grey78
-138 138 138 grey54
-115 115 115 grey45
- 54 54 54 grey21
-247 247 247 gray97
-245 245 245 gray96
-242 242 242 gray95
-224 224 224 gray88
-222 222 222 gray87
-219 219 219 gray86
-179 179 179 gray70
- 97 97 97 gray38
- 31 31 31 gray12
-250 240 230 linen
- 72 209 204 medium turquoise
- 72 61 139 dark slate blue
-139 137 112 lemonchiffon4
-193 255 193 darkseagreen1
-205 192 176 antiquewhite3
-186 85 211 mediumorchid
- 0 255 127 springgreen
- 0 134 139 turquoise4
- 79 148 205 steelblue3
-238 213 210 mistyrose2
-209 238 238 lightcyan2
-205 92 92 indian red
-238 44 44 firebrick2
- 65 105 225 royalblue
- 95 158 160 cadetblue
-108 166 205 skyblue3
-205 205 0 yellow3
-255 140 105 salmon1
-139 90 0 orange4
-255 105 180 hotpink
-229 229 229 grey90
-143 143 143 gray56
- 99 99 99 gray39
- 46 46 46 gray18
- 36 36 36 gray14
-139 102 139 plum4
- 15 15 15 grey6
- 15 15 15 gray6
-205 173 0 gold3
-255 215 0 gold1
- 0 0 238 blue2
-238 154 73 tan2
- 0 255 255 cyan
- 0 250 154 mediumspringgreen
-188 238 104 darkolivegreen2
-238 232 170 pale goldenrod
-176 196 222 lightsteelblue
-244 164 96 sandy brown
-255 239 213 papaya whip
-102 205 0 chartreuse3
-139 34 82 violetred4
- 67 110 238 royalblue2
- 72 118 255 royalblue1
-255 239 213 papayawhip
-205 183 181 mistyrose3
-224 255 255 lightcyan1
-127 255 212 aquamarine
- 74 112 139 skyblue4
-139 58 98 hotpink4
-205 96 144 hotpink3
-238 106 167 hotpink2
-169 169 169 darkgrey
-105 105 105 dimgray
-255 99 71 tomato
-168 168 168 grey66
-166 166 166 grey65
-163 163 163 grey64
- 84 84 84 grey33
- 69 69 69 grey27
-194 194 194 gray76
-176 176 176 gray69
-173 173 173 gray68
- 0 0 0 grey0
-240 255 255 azure
- 0 250 154 medium spring green
-139 101 8 darkgoldenrod4
-205 149 12 darkgoldenrod3
-238 173 14 darkgoldenrod2
-184 134 11 darkgoldenrod
-139 69 19 saddle brown
-238 149 114 lightsalmon2
- 0 104 139 deepskyblue4
- 0 154 205 deepskyblue3
- 0 178 238 deepskyblue2
- 0 191 255 deepskyblue
-255 127 0 darkorange1
-205 50 120 violetred3
-238 58 140 violetred2
-255 62 150 violetred1
-105 89 205 slateblue3
-122 103 238 slateblue2
-107 142 35 olive drab
-255 106 106 indianred1
-255 48 48 firebrick1
- 83 134 139 cadetblue4
-208 32 144 violetred
-188 143 143 rosybrown
- 0 0 128 navy blue
-178 34 34 firebrick
-139 0 0 dark red
-255 255 255 grey100
-139 126 102 wheat4
-201 201 201 grey79
-194 194 194 grey76
-156 156 156 grey61
-237 237 237 gray93
-214 214 214 gray84
-166 166 166 gray65
- 92 92 92 gray36
- 82 82 82 gray32
- 33 33 33 gray13
- 26 26 26 gray10
-193 205 205 azure3
-255 250 250 snow1
-255 165 79 tan1
-119 136 153 light slate gray
-202 255 112 darkolivegreen1
-100 149 237 cornflower blue
-255 235 205 blanched almond
-205 193 197 lavenderblush3
-238 224 229 lavenderblush2
-255 240 245 lavenderblush1
- 85 107 47 darkolivegreen
-255 240 245 lavenderblush
-118 238 198 aquamarine2
-208 32 144 violet red
-179 238 58 olivedrab2
-139 125 123 mistyrose4
-255 228 225 mistyrose1
-180 205 205 lightcyan3
-240 128 128 lightcoral
-127 255 0 chartreuse
-255 218 185 peachpuff
-152 251 152 palegreen
-245 255 250 mintcream
-126 192 238 skyblue2
-255 228 181 moccasin
-255 99 71 tomato1
-205 105 201 orchid3
-205 41 144 maroon3
-250 128 114 salmon
-207 207 207 grey81
-158 158 158 grey62
- 99 99 99 grey39
- 97 97 97 grey38
- 94 94 94 grey37
-235 235 235 gray92
-212 212 212 gray83
-168 168 168 gray66
-138 138 138 gray54
-127 127 127 gray50
- 77 77 77 gray30
- 48 48 48 gray19
- 38 38 38 gray15
-131 139 139 azure4
- 8 8 8 grey3
-205 133 63 tan3
-255 192 203 pink
-190 190 190 gray
- 0 0 255 blue
-188 210 238 lightsteelblue2
-202 225 255 lightsteelblue1
- 32 178 170 light sea green
-119 136 153 lightslategray
-238 233 191 lemonchiffon2
- 0 255 127 springgreen1
-173 255 47 greenyellow
-118 238 0 chartreuse2
-112 128 144 slate grey
- 58 95 205 royalblue3
-176 224 230 powderblue
-238 203 173 peachpuff2
-144 238 144 palegreen2
-245 255 250 mint cream
-106 90 205 slateblue
-238 229 222 seashell2
-238 18 137 deeppink2
-189 183 107 darkkhaki
-139 28 98 maroon4
-160 82 45 sienna
-181 181 181 grey71
-171 171 171 grey67
- 46 46 46 grey18
-150 150 150 gray59
-110 110 110 gray43
- 64 64 64 gray25
-255 228 196 bisque
-255 0 0 red1
-123 104 238 mediumslateblue
-255 236 139 lightgoldenrod1
-238 221 130 light goldenrod
-150 205 205 paleturquoise3
- 96 123 139 lightskyblue4
- 0 255 127 spring green
-255 255 224 light yellow
-245 245 245 white smoke
- 0 0 205 medium blue
-248 248 255 ghost white
- 54 100 139 steelblue4
-205 155 155 rosybrown3
-255 218 185 peachpuff1
-154 255 154 palegreen1
-138 43 226 blueviolet
-139 134 130 seashell4
-169 169 169 darkgray
-205 104 57 sienna3
-102 102 102 grey40
-232 232 232 gray91
-209 209 209 gray82
- 13 13 13 gray5
- 0 238 238 cyan2
- 0 255 255 cyan1
- 0 0 255 blue1
-255 250 250 snow
-238 220 130 lightgoldenrod2
-132 112 255 lightslateblue
-180 82 205 mediumorchid3
-105 139 105 darkseagreen4
- 0 205 102 springgreen3
- 34 139 34 forest green
-108 123 139 slategray4
-159 182 205 slategray3
-185 211 238 slategray2
- 65 105 225 royal blue
-139 119 101 peachpuff4
- 84 139 84 palegreen4
-152 251 152 pale green
-205 55 0 orangered3
-255 193 37 goldenrod1
-248 248 255 ghostwhite
-139 26 26 firebrick4
-205 38 38 firebrick3
-122 197 205 cadetblue3
-112 128 144 slategray
-205 197 191 seashell3
-193 205 193 honeydew3
-139 136 120 cornsilk4
-238 232 205 cornsilk2
-155 48 255 purple1
-105 105 105 dimgrey
-139 0 0 darkred
-255 246 143 khaki1
-205 205 193 ivory3
-179 179 179 grey70
-153 153 153 grey60
- 82 82 82 grey32
- 56 56 56 grey22
- 31 31 31 grey12
-250 250 250 gray98
-227 227 227 gray89
-181 181 181 gray71
-163 163 163 gray64
-153 153 153 gray60
-125 125 125 gray49
-224 238 238 azure2
- 8 8 8 gray3
-187 255 255 paleturquoise1
-171 130 255 mediumpurple1
-147 112 219 medium purple
-255 250 205 lemonchiffon1
- 0 191 255 deep sky blue
-205 179 139 navajowhite3
-191 62 255 darkorchid1
-255 140 0 dark orange
-238 180 34 goldenrod2
-189 183 107 dark khaki
-238 118 33 chocolate2
-238 197 145 burlywood2
-240 255 240 honeydew1
- 0 100 0 darkgreen
-205 181 205 thistle3
-238 210 238 thistle2
-255 225 255 thistle1
- 0 0 139 darkblue
-216 191 216 thistle
-238 48 167 maroon2
-255 52 179 maroon1
-135 135 135 grey53
-112 112 112 grey44
- 64 64 64 grey25
-189 189 189 gray74
-115 115 115 gray45
-105 105 105 gray41
- 89 89 89 gray35
- 69 69 69 gray27
- 59 59 59 gray23
- 41 41 41 gray16
-139 35 35 brown4
-245 222 179 wheat
-255 127 80 coral
-139 90 43 tan4
-250 250 210 lightgoldenrodyellow
-132 112 255 light slate blue
- 85 107 47 dark olive green
- 47 79 79 dark slate gray
-205 104 137 palevioletred3
- 93 71 139 mediumpurple4
-137 104 205 mediumpurple3
-139 69 19 saddlebrown
-176 224 230 powder blue
-104 34 139 darkorchid4
-154 50 205 darkorchid3
-255 218 185 peach puff
-105 139 34 olivedrab4
-104 131 139 lightblue4
-255 182 193 lightpink
-211 211 211 lightgray
-224 238 224 honeydew2
-255 248 220 cornsilk1
-253 245 230 old lace
-255 130 71 sienna1
-139 125 107 bisque4
-218 112 214 orchid
-205 198 115 khaki3
-214 214 214 grey84
-212 212 212 grey83
-209 209 209 grey82
-184 184 184 grey72
-133 133 133 grey52
-110 110 110 grey43
- 66 66 66 grey26
- 36 36 36 grey14
- 26 26 26 grey10
-191 191 191 gray75
-135 135 135 gray53
- 54 54 54 gray21
- 51 51 51 gray20
-205 51 51 brown3
- 20 20 20 grey8
-238 0 0 red2
- 0 0 128 navy
-190 190 190 grey
-255 215 0 gold
-102 205 170 mediumaquamarine
-238 221 130 lightgoldenrod
- 82 139 139 darkslategray4
-155 205 155 darkseagreen3
-180 238 180 darkseagreen2
-139 131 120 antiquewhite4
-250 235 215 antique white
- 0 139 69 springgreen4
-139 139 122 lightyellow4
-255 250 240 floral white
-127 255 212 aquamarine1
- 0 197 205 turquoise3
- 92 172 238 steelblue2
-238 180 180 rosybrown2
-255 182 193 light pink
-211 211 211 light gray
-238 99 99 indianred2
- 30 144 255 dodgerblue
- 0 100 0 dark green
- 84 255 159 seagreen1
-139 10 80 deeppink4
-240 248 255 aliceblue
-255 0 255 magenta1
-255 105 180 hot pink
-238 121 66 sienna2
-255 131 250 orchid1
-255 255 255 gray100
-247 247 247 grey97
-240 240 240 grey94
-222 222 222 grey87
-219 219 219 grey86
-130 130 130 grey51
-107 107 107 grey42
- 48 48 48 grey19
-240 240 240 gray94
-217 217 217 gray85
-156 156 156 gray61
-238 59 59 brown2
-240 230 140 khaki
- 3 3 3 grey1
-139 117 0 gold4
-123 104 238 medium slate blue
- 60 179 113 medium sea green
- 47 79 79 dark slate grey
-175 238 238 pale turquoise
-175 238 238 paleturquoise
-122 55 139 mediumorchid4
-238 223 204 antiquewhite2
-238 238 209 lightyellow2
-144 238 144 light green
-148 0 211 dark violet
-233 150 122 dark salmon
-127 255 0 chartreuse1
- 0 245 255 turquoise1
-244 164 96 sandybrown
-255 69 0 orangered1
-255 174 185 lightpink1
-178 223 238 lightblue2
-191 239 255 lightblue1
-211 211 211 light grey
- 46 139 87 seagreen4
- 67 205 128 seagreen3
-173 216 230 lightblue
-205 16 118 deeppink3
-169 169 169 dark grey
- 0 139 139 dark cyan
-222 184 135 burlywood
-255 245 238 seashell
-255 110 180 hotpink1
-105 105 105 dim gray
- 0 139 139 darkcyan
-139 139 0 yellow4
-255 255 0 yellow
-160 32 240 purple
-255 165 0 orange
-139 139 131 ivory4
-252 252 252 grey99
-227 227 227 grey89
-161 161 161 grey63
-148 148 148 grey58
-125 125 125 grey49
- 79 79 79 grey31
- 61 61 61 grey24
- 51 51 51 grey20
- 0 139 0 green4
- 0 255 0 green1
-186 186 186 gray73
-171 171 171 gray67
-205 91 69 coral3
-238 106 80 coral2
-238 174 238 plum2
-139 99 108 pink4
-255 255 240 ivory
- 10 10 10 gray4
- 5 5 5 gray2
-238 201 0 gold2
-102 205 170 medium aquamarine
-119 136 153 light slate grey
-205 190 112 lightgoldenrod3
-162 205 90 darkolivegreen3
-255 185 15 darkgoldenrod1
-184 134 11 dark goldenrod
-186 85 211 medium orchid
-255 250 205 lemon chiffon
-139 121 94 navajowhite4
- 0 191 255 deepskyblue1
-255 255 224 lightyellow
-255 250 240 floralwhite
- 30 144 255 dodger blue
- 0 0 205 mediumblue
-144 238 144 lightgreen
-139 69 19 chocolate4
-205 102 29 chocolate3
-139 115 85 burlywood4
- 64 224 208 turquoise
- 70 130 180 steelblue
- 46 139 87 sea green
-124 252 0 lawngreen
-131 139 131 honeydew4
-169 169 169 dark gray
- 46 139 87 seagreen
-139 71 137 orchid4
-255 231 186 wheat1
-238 130 238 violet
-255 255 240 ivory1
-224 224 224 grey88
-217 217 217 grey85
-145 145 145 grey57
-143 143 143 grey56
-140 140 140 grey55
-122 122 122 grey48
-120 120 120 grey47
-117 117 117 grey46
- 77 77 77 grey30
- 43 43 43 grey17
-120 120 120 gray47
- 74 74 74 gray29
-238 169 184 pink2
- 13 13 13 grey5
- 10 10 10 grey4
- 0 255 0 green
- 0 0 0 gray0
-165 42 42 brown
-110 123 139 lightsteelblue4
-110 139 61 darkolivegreen4
-139 71 93 palevioletred4
-135 206 250 light sky blue
-121 205 205 darkslategray3
-141 238 238 darkslategray2
-151 255 255 darkslategray1
-255 235 205 blanchedalmond
-238 232 170 palegoldenrod
- 25 25 112 midnight blue
- 32 178 170 lightseagreen
-205 201 165 lemonchiffon3
- 47 79 79 darkslategray
-154 205 50 yellow green
-143 188 143 darkseagreen
-250 235 215 antiquewhite
-238 118 0 darkorange2
- 69 139 0 chartreuse4
- 70 130 180 steel blue
-255 193 193 rosybrown1
-154 205 50 olivedrab3
-238 162 173 lightpink2
-255 69 0 orangered
-139 123 139 thistle4
-135 206 235 sky blue
-255 248 220 cornsilk
-238 130 98 salmon2
-238 122 233 orchid2
-238 238 224 ivory2
-237 237 237 grey93
-235 235 235 grey92
-232 232 232 grey91
- 92 92 92 grey36
- 74 74 74 grey29
- 71 71 71 grey28
- 41 41 41 grey16
-201 201 201 gray79
-199 199 199 gray78
-196 196 196 gray77
-122 122 122 gray48
- 43 43 43 gray17
-139 62 47 coral4
-255 114 86 coral1
-255 187 255 plum1
-255 181 197 pink1
- 23 23 23 grey9
- 5 5 5 grey2
- 18 18 18 gray7
- 0 139 139 cyan4
- 0 0 205 blue3
-221 160 221 plum
-100 149 237 cornflowerblue
-164 211 238 lightskyblue2
-255 239 219 antiquewhite1
-238 207 161 navajowhite2
-255 222 173 navajowhite1
-205 205 180 lightyellow3
-139 0 139 dark magenta
-255 222 173 navajowhite
-205 102 0 darkorange3
-245 245 245 whitesmoke
- 0 229 238 turquoise2
- 99 184 255 steelblue1
-139 95 101 lightpink4
-154 192 205 lightblue3
-124 252 0 lawn green
-255 127 36 chocolate1
-240 248 255 alice blue
-107 142 35 olivedrab
-211 211 211 lightgrey
-210 105 30 chocolate
-139 0 139 magenta4
-205 0 205 magenta3
-255 255 0 yellow1
-125 38 205 purple3
-145 44 238 purple2
-238 154 0 orange2
-255 165 0 orange1
-255 0 255 magenta
-255 228 196 bisque1
-238 216 174 wheat2
-176 48 96 maroon
-139 134 78 khaki4
-245 245 245 grey96
-242 242 242 grey95
-204 204 204 grey80
-127 127 127 grey50
-105 105 105 grey41
- 38 38 38 grey15
- 28 28 28 grey11
-204 204 204 gray80
-148 148 148 gray58
-102 102 102 gray40
- 87 87 87 gray34
- 56 56 56 gray22
-255 64 64 brown1
-205 201 201 snow3
- 72 209 204 mediumturquoise
-162 181 205 lightsteelblue3
-238 121 159 palevioletred2
-255 130 171 palevioletred1
-174 238 238 paleturquoise2
-143 188 143 dark sea green
-219 112 147 palevioletred
-224 102 255 mediumorchid1
-255 222 173 navajo white
-147 112 219 mediumpurple
-255 255 224 lightyellow1
- 28 134 238 dodgerblue2
- 30 144 255 dodgerblue1
-139 0 139 darkmagenta
-138 43 226 blue violet
-102 205 170 aquamarine3
-198 226 255 slategray1
-112 128 144 slate gray
-139 37 0 orangered4
-205 140 149 lightpink3
-173 216 230 light blue
-153 50 204 darkorchid
-152 245 255 cadetblue1
-205 170 125 burlywood3
-255 245 238 seashell1
-205 200 177 cornsilk3
-139 54 38 tomato4
-238 92 66 tomato2
-205 186 150 wheat3
-250 250 250 grey98
-150 150 150 grey59
- 59 59 59 grey23
- 0 205 0 green3
- 0 238 0 green2
-184 184 184 gray72
-158 158 158 gray62
-133 133 133 gray52
-117 117 117 gray46
-107 107 107 gray42
- 71 71 71 gray28
- 61 61 61 gray24
-255 255 255 white
- 0 205 205 cyan3
- 0 0 0 black
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm
deleted file mode 100644
index 4ac5779..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample11.gif">
-<p align="center">
-
-<p align="center"><a href="sample11.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl
deleted file mode 100644
index 78b742c..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl
+++ /dev/null
@@ -1,25 +0,0 @@
-use GIFgraph::bars;
-use GIFgraph::colour;
-
-print STDERR "Processing sample 1-1\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
-);
-
-$my_graph = new GIFgraph::bars();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Simple Bar Chart',
- y_max_value => 8,
- y_tick_number => 8,
- y_label_skip => 2,
-);
-
-$my_graph->plot_to_gif( "sample11.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm
deleted file mode 100644
index f1842b7..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-2</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-2</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample12.gif">
-<p align="center">
-
-<p align="center"><a href="sample12.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl
deleted file mode 100644
index f9bc3d2..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-use GIFgraph::bars;
-
-print STDERR "Processing sample 1-2\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 5, 12, 24, 33, 19, 8, 6, 15, 21],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
-);
-
-$my_graph = new GIFgraph::bars();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'Two data sets',
- long_ticks => 1,
- y_max_value => 40,
- y_tick_number => 8,
- y_label_skip => 2,
- bar_spacing => 4,
-);
-
-$my_graph->set_legend( 'Data set 1', 'Data set 2' );
-
-$my_graph->plot_to_gif( "sample12.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm
deleted file mode 100644
index cab634f..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-3</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-3</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample13.gif">
-<p align="center">
-
-<p align="center"><a href="sample13.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl
deleted file mode 100644
index 596127e..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-use GIFgraph::bars;
-
-print STDERR "Processing sample 1-3\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 5, 12, 24, 33, 19, 8, 6, 15, 21],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4]
-);
-$my_graph = new GIFgraph::bars();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'Bars in front of each other',
- y_tick_number => 8,
- y_label_skip => 2,
- overwrite => 1,
-);
-
-$my_graph->plot_to_gif( "sample13.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm
deleted file mode 100644
index 4a1a59c..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-4</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-4</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample14.gif">
-<p align="center">
-
-<p align="center"><a href="sample14.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl
deleted file mode 100644
index 11d19bb..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-use GIFgraph::bars;
-
-print STDERR "Processing sample 1-4\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 5, 12, 24, 33, 19, 8, 6, 15, 21],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4]
-);
-
-$my_graph = new GIFgraph::bars( );
-
-$my_graph->set(
- x_label => 'X Label',
- y1_label => 'Y1 label',
- y2_label => 'Y2 label',
- title => 'Using two axes',
- y1_max_value => 40,
- y2_max_value => 8,
- y_tick_number => 8,
- y_label_skip => 2,
- long_ticks => 1,
- two_axes => 1,
- legend_placement => 'RT',
- x_labels_vertical => 1,
- x_label_position => 1/2,
-
- bar_spacing => 2,
-
- logo => 'logo.gif',
- logo_position => 'BR',
-);
-
-$my_graph->set_legend( 'left axis', 'right axis');
-
-$my_graph->plot_to_gif( "sample14.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm
deleted file mode 100644
index b54a85f..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-4</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-5</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample15.gif">
-<p align="center">
-
-<p align="center"><a href="sample15.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl
deleted file mode 100644
index 48a3f71..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl
+++ /dev/null
@@ -1,29 +0,0 @@
-use GIFgraph::bars;
-
-print STDERR "Processing sample 1-5\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 11, 12, 15, 16, 3, 1.5, 1, 3, 4],
- [ 5, 12, 24, 15, 19, 8, 6, 15, 21],
- [ 12, 3, 1, 5, 12, 9, 16, 25, 11],
-);
-
-$my_graph = new GIFgraph::bars();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'Stacked Bars (incremental)',
- y_max_value => 50,
- y_tick_number => 10,
- y_label_skip => 2,
- overwrite => 2,
-);
-
-$my_graph->set_legend( qw(offset increment more));
-
-$my_graph->plot_to_gif( "sample15.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm
deleted file mode 100644
index e973347..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm
+++ /dev/null
@@ -1,23 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 1-6</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 1-3</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample16.gif">
-<p align="center">
-
-<p align="center"><a href="sample16.pl">The code.</a></p>
-
-<hr>
-
-<h5>NOTES</h5>
-There was no data for the credits on the third and the debets on the 7th day.
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl
deleted file mode 100644
index 55b5241..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-use GIFgraph::bars;
-
-print STDERR "Processing sample 1-6\n";
-
-@data = (
- [ qw( 1st 2nd 3rd 4th 5th 6th 7th 8th 9th ) ],
- [ 5, 12,undef, 33, 19, 8, 5, 15, 21],
- [ -6, -5, -9, -8, -11, -9.3,undef, -9, -12]
-);
-$my_graph = new GIFgraph::bars();
-
-$my_graph->set(
- x_label => 'Day',
- y_label => 'AUD',
- title => 'Credits and Debits',
- y_max_value => 35,
- y_min_value => -15,
- y_tick_number => 10,
- y_label_skip => 2,
- overwrite => 1,
- dclrs => [ qw( green lred ) ],
- axislabelclr => 'black',
- legend_placement => 'RB',
- zero_axis_only => 0,
- y_number_format => \&y_format,
- x_label_position => 1/2,
-);
-
-my $refit = 4;
-
-sub y_format
-{
- my $value = shift;
- my $ret;
-
- if ($value >= 0)
- {
- $ret = sprintf("\$%3d", $value * $refit);
- }
- else
- {
- $ret = sprintf("-\$%3d", abs($value) * $refit);
- }
-}
-
-$my_graph->set_legend( 'credits', 'debets' );
-
-$my_graph->plot_to_gif( "sample16.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm
deleted file mode 100644
index a319309..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 2-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 2-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample21.gif">
-<p align="center">
-
-<p align="center"><a href="sample21.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl
deleted file mode 100644
index 32a34e2..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-use GIFgraph::area;
-
-print STDERR "Processing sample 2-1\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 5, 12, 24, 33, 19, 8, 6, 15, 21],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4]
-);
-
-$my_graph = new GIFgraph::area();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'An Area Graph',
- y_max_value => 40,
- y_tick_number => 8,
- y_label_skip => 2,
-);
-
-$my_graph->set_legend( 'one', 'two' );
-
-$my_graph->plot_to_gif( "sample21.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm
deleted file mode 100644
index daea766..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm
+++ /dev/null
@@ -1,23 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 3-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 3-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample31.gif">
-<p align="center">
-
-<p align="center"><a href="sample31.pl">The code.</a></p>
-
-<hr>
-
-<h5>NOTE</h5>
-Notice that the green set doesn't have an entry for the 7th point.
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl
deleted file mode 100644
index 05bc8df..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl
+++ /dev/null
@@ -1,31 +0,0 @@
-use GIFgraph::points;
-
-print STDERR "Processing sample 3-1\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 5, 12, 24, 33, 19, 8, 6, 15, 21],
- [ 1, 2, 5, 6, 3, 1.5, undef, 3, 4],
-);
-
-$my_graph = new GIFgraph::points();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Points Graph',
- y_max_value => 40,
- y_tick_number => 8,
- y_label_skip => 2,
- legend_placement => 'RC',
- long_ticks => 1,
- marker_size => 6,
- markers => [ 1, 7, 5 ],
-);
-
-$my_graph->set_legend( qw( one two ) );
-
-$my_graph->plot_to_gif( "sample31.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm
deleted file mode 100644
index a9f7f3c..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm
+++ /dev/null
@@ -1,23 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 4-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 4-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample41.gif">
-<p align="center">
-
-<p align="center"><a href="sample41.pl">The code.</a></p>
-
-<hr>
-
-<h5>NOTES</h5>
-Note that both data sets have a point missing.
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl
deleted file mode 100644
index 2de6879..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl
+++ /dev/null
@@ -1,28 +0,0 @@
-use GIFgraph::linespoints;
-
-print STDERR "Processing sample 4-1\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [undef, 52, 53, 54, 55, 56, undef, 58, 59],
- [60, 61, 61, undef, 68, 66, 65, 61, undef],
-);
-
-$my_graph = new GIFgraph::linespoints( );
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Lines and Points Graph',
- y_max_value => 80,
- y_tick_number => 6,
- y_label_skip => 2,
- markers => [ 1, 5 ],
-);
-
-$my_graph->set_legend( 'data set 1', 'data set 2' );
-
-$my_graph->plot_to_gif( "sample41.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat
deleted file mode 100644
index e0b84d4..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat
+++ /dev/null
@@ -1,9 +0,0 @@
-1st,undef,60
-2nd,52,61
-3rd,53,61
-4th,54,undef
-5th,55,68
-6th,56,66
-7th,undef,65
-8th,58,61
-9th,59,undef
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm
deleted file mode 100644
index afa4873..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm
+++ /dev/null
@@ -1,23 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 4-2</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 4-2</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample42.gif">
-<p align="center">
-
-<p align="center"><a href="sample42.pl">The code.</a></p>
-
-<hr>
-
-<h5>NOTES</h5>
-This is the same graph as sample41, but this time the data has been read from a CSV file.
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl
deleted file mode 100644
index 167bbb2..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-use GIFgraph::linespoints;
-
-print STDERR "Processing sample 4-2\n";
-
-@data = read_data_from_csv("sample42.dat")
- or die "Cannot read data from sample42.dat";
-
-$my_graph = new GIFgraph::linespoints( );
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Lines and Points Graph, reading a CSV file',
- y_max_value => 80,
- y_tick_number => 6,
- y_label_skip => 2,
- markers => [ 1, 5 ],
-);
-
-$my_graph->set_legend( 'data set 1', 'data set 2' );
-
-$my_graph->plot_to_gif( "sample42.gif", \@data );
-
-exit;
-
-sub read_data_from_csv
-{
- my $fn = shift;
- my @d = ();
-
- open(ZZZ, $fn) || return ();
-
- while (<ZZZ>)
- {
- chomp;
- # you might want Text::CSV here
- my @row = split /,/;
-
- for (my $i = 0; $i <= $#row; $i++)
- {
- undef $row[$i] if ($row[$i] eq 'undef');
- push @{$d[$i]}, $row[$i];
- }
- }
-
- close (ZZZ);
-
- return @d;
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm
deleted file mode 100644
index 950df4e..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 5-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#500000">
-
-<H1 align="center">GIFgraph.pm - example 5-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample51.gif">
-<p align="center">
-
-<p align="center"><a href="sample51.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl
deleted file mode 100644
index b1c7dd1..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-use GIFgraph::lines;
-
-print STDERR "Processing sample 5-1\n";
-
-# The reverse is in here, because I thought the falling line was
-# depressing, but I was too lazy to retype the data set
-
-@data = (
- [ qw( Jan Feb Mar Apr May Jun Jul Aug Sep ) ],
- [ reverse(4, 3, 5, 6, 3, 1.5, -1, -3, -4)],
-);
-
-$my_graph = new GIFgraph::lines();
-
-$my_graph->set(
- x_label => 'Month',
- y_label => 'Measure of success',
- title => 'A Simple Line Graph',
- y_max_value => 8,
- y_min_value => -6,
- y_tick_number => 14,
- y_label_skip => 2,
- box_axis => 0,
- line_width => 3,
-);
-
-$my_graph->plot_to_gif( "sample51.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm
deleted file mode 100644
index 6ade802..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 5-2</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#500000">
-
-<H1 align="center">GIFgraph.pm - example 5-2</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample52.gif">
-<p align="center">
-
-<p align="center"><a href="sample52.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl
deleted file mode 100644
index a9aef1f..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-use GIFgraph::lines;
-
-print STDERR "Processing sample 5-2\n";
-
-# The reverse is in here, because I thought the falling line was
-# depressing, but I was too lazy to retype the data set
-
-@data = (
- [ qw( Jan Feb Mar Apr May Jun Jul Aug Sep ) ],
- [ reverse(4, 3, 5, 6, 3, 1.5, -1, -3, -4)]
-);
-
-$my_graph = new GIFgraph::lines();
-
-$my_graph->set(
- x_label => 'Month',
- y_label => 'Measure of success',
- title => 'A Simple Line Graph',
- y_max_value => 8,
- y_min_value => -6,
- y_tick_number => 14,
- y_label_skip => 2,
- box_axis => 0,
- line_width => 3,
- zero_axis_only => 1,
- x_label_position => 1,
- y_label_position => 1,
-);
-
-$my_graph->plot_to_gif( "sample52.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm
deleted file mode 100644
index de27cc8..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 5-3</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 5-3</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample53.gif">
-<p align="center">
-
-<p align="center"><a href="sample53.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl
deleted file mode 100644
index 2c16f71..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-use GIFgraph::lines;
-use GIFgraph::colour;
-
-GIFgraph::colour::read_rgb("rgb.txt") or
- die "Cannot read colours from rgb.txt";
-
-print STDERR "Processing sample 5-3\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
- [ -4, -3, 1, 1, -3, -1.5, -2, -1, 0],
- [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
- [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
-);
-
-$my_graph = new GIFgraph::lines();
-
-$my_graph->set(
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Multiple Line Graph',
- y_max_value => 10,
- y_min_value => -5,
- y_tick_number => 3,
- y_label_skip => 1,
- zero_axis_only => 0,
- long_ticks => 1,
- x_ticks => 0,
- dclrs => [ qw( darkorchid2 mediumvioletred deeppink darkturquoise ) ],
- line_types => [ 1, 2, 3, 4 ],
- line_type_scale => 8,
- legend_marker_width => 24,
- line_width => 3,
-);
-
-$my_graph->set_legend( 'one', 'two', undef, 'four' );
-
-$my_graph->plot_to_gif( "sample53.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat
deleted file mode 100644
index b209a9a..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat
+++ /dev/null
@@ -1,1842 +0,0 @@
-700.000 0.003485
-699.750 -0.001097
-699.500 -0.002087
-699.250 0.001198
-699.000 0.000286
-698.750 -0.000158
-698.500 0.000168
-698.250 -0.000262
-698.000 0.001695
-697.750 0.001520
-697.500 0.000413
-697.250 0.001776
-697.000 -0.000226
-696.750 -0.001634
-696.500 0.001075
-696.250 0.002390
-696.000 -0.000109
-695.750 0.000572
-695.500 0.000110
-695.250 0.000005
-695.000 -0.000334
-694.750 -0.000543
-694.500 0.000820
-694.250 0.000451
-694.000 0.001651
-693.750 -0.000832
-693.500 0.000726
-693.250 0.000399
-693.000 -0.001413
-692.750 -0.000926
-692.500 0.001384
-692.250 0.000304
-692.000 0.000731
-691.750 0.000284
-691.500 -0.001864
-691.250 0.002392
-691.000 -0.002022
-690.750 -0.001963
-690.500 0.000652
-690.250 0.001707
-690.000 0.001195
-689.750 0.001182
-689.500 0.001832
-689.250 -0.001381
-689.000 0.001112
-688.750 0.000403
-688.500 0.000576
-688.250 -0.001397
-688.000 0.001534
-687.750 -0.000616
-687.500 0.000276
-687.250 -0.000747
-687.000 -0.000232
-686.750 -0.000382
-686.500 0.000031
-686.250 -0.001819
-686.000 0.001683
-685.750 0.000853
-685.500 0.000385
-685.250 0.001108
-685.000 -0.001241
-684.750 0.001103
-684.500 0.001127
-684.250 -0.000541
-684.000 0.000518
-683.750 0.000284
-683.500 -0.000656
-683.250 0.000395
-683.000 0.000378
-682.750 0.001463
-682.500 0.001554
-682.250 0.000277
-682.000 0.001752
-681.750 0.001333
-681.500 0.002022
-681.250 0.001392
-681.000 0.000737
-680.750 0.000205
-680.500 0.001799
-680.250 -0.001171
-680.000 -0.000689
-679.750 0.001249
-679.500 0.002911
-679.250 0.000199
-679.000 -0.000050
-678.750 -0.000738
-678.500 0.000714
-678.250 -0.002703
-678.000 0.001025
-677.750 0.000583
-677.500 0.002166
-677.250 0.001560
-677.000 0.005364
-676.750 0.001962
-676.500 0.000031
-676.250 0.001134
-676.000 0.001617
-675.750 -0.000237
-675.500 -0.001913
-675.250 0.000409
-675.000 -0.000626
-674.750 -0.000785
-674.500 0.000176
-674.250 0.000385
-674.000 0.001106
-673.750 0.000414
-673.500 0.000475
-673.250 0.002717
-673.000 0.001492
-672.750 0.002600
-672.500 0.000252
-672.250 0.002480
-672.000 0.000457
-671.750 0.000962
-671.500 0.002991
-671.250 0.001473
-671.000 0.003620
-670.750 0.001495
-670.500 0.002955
-670.250 0.006124
-670.000 0.002939
-669.750 0.000903
-669.500 0.000541
-669.250 -0.000725
-669.000 0.001060
-668.750 0.000069
-668.500 0.002306
-668.250 0.002930
-668.000 0.001625
-667.750 -0.001658
-667.500 0.001622
-667.250 0.002226
-667.000 0.001875
-666.750 0.001441
-666.500 0.001486
-666.250 0.001678
-666.000 -0.002652
-665.750 0.001211
-665.500 0.001754
-665.250 0.002511
-665.000 -0.000742
-664.750 0.003748
-664.500 0.000592
-664.250 0.003531
-664.000 0.001268
-663.750 0.002753
-663.500 0.001279
-663.250 0.002106
-663.000 -0.000628
-662.750 0.003597
-662.500 0.000905
-662.250 -0.001147
-662.000 0.000835
-661.750 0.001582
-661.500 0.000192
-661.250 0.002283
-661.000 0.000832
-660.750 0.000271
-660.500 -0.000217
-660.250 0.000852
-660.000 0.001018
-659.750 -0.000924
-659.500 0.002043
-659.250 0.001838
-659.000 -0.000131
-658.750 0.002503
-658.500 0.002001
-658.250 0.001777
-658.000 -0.000453
-657.750 0.001435
-657.500 -0.000089
-657.250 0.003333
-657.000 0.000484
-656.750 -0.001547
-656.500 0.001847
-656.250 0.003163
-656.000 0.001798
-655.750 -0.001625
-655.500 0.001741
-655.250 -0.000855
-655.000 0.002662
-654.750 0.002060
-654.500 -0.000580
-654.250 -0.000509
-654.000 -0.001555
-653.750 0.000236
-653.500 0.002695
-653.250 0.000810
-653.000 0.000186
-652.750 -0.000797
-652.500 -0.001033
-652.250 0.000642
-652.000 0.000284
-651.750 -0.000660
-651.500 0.000113
-651.250 0.001203
-651.000 -0.000545
-650.750 0.002602
-650.500 -0.000550
-650.250 -0.000873
-650.000 0.002922
-649.750 0.002667
-649.500 -0.001198
-649.250 -0.001668
-649.000 -0.000872
-648.750 0.000872
-648.500 -0.000782
-648.250 0.001165
-648.000 0.001180
-647.750 0.002938
-647.500 -0.000021
-647.250 0.001230
-647.000 0.003165
-646.750 -0.001589
-646.500 -0.001688
-646.250 -0.001920
-646.000 -0.000839
-645.750 -0.000133
-645.500 0.003075
-645.250 0.000394
-645.000 -0.000885
-644.750 -0.000866
-644.500 0.001828
-644.250 0.001108
-644.000 -0.000129
-643.750 0.000601
-643.500 -0.000420
-643.250 -0.000986
-643.000 -0.000769
-642.750 0.001334
-642.500 0.000676
-642.250 0.001345
-642.000 -0.001207
-641.750 -0.000712
-641.500 0.001083
-641.250 0.002568
-641.000 -0.000668
-640.750 -0.001999
-640.500 0.000531
-640.250 0.001468
-640.000 0.000154
-639.750 0.001899
-639.500 0.000923
-639.250 0.000379
-639.000 0.001225
-638.750 0.002069
-638.500 0.000196
-638.250 -0.000645
-638.000 -0.000330
-637.750 0.001110
-637.500 0.000983
-637.250 0.000027
-637.000 -0.000023
-636.750 -0.000348
-636.500 -0.000624
-636.250 0.001612
-636.000 0.000451
-635.750 -0.000827
-635.500 0.002637
-635.250 0.002549
-635.000 0.001107
-634.750 0.000468
-634.500 0.000526
-634.250 0.000395
-634.000 0.000030
-633.750 0.003069
-633.500 0.000996
-633.250 0.002051
-633.000 0.001829
-632.750 0.002402
-632.500 0.000911
-632.250 0.001727
-632.000 -0.001005
-631.750 0.001516
-631.500 0.002026
-631.250 0.001725
-631.000 0.000992
-630.750 -0.000457
-630.500 -0.000459
-630.250 0.001449
-630.000 0.000957
-629.750 0.001148
-629.500 -0.001836
-629.250 -0.002367
-629.000 0.001593
-628.750 0.000480
-628.500 0.000451
-628.250 -0.000803
-628.000 0.000530
-627.750 0.000069
-627.500 0.001225
-627.250 -0.000237
-627.000 0.002603
-626.750 -0.000488
-626.500 -0.002227
-626.250 0.001372
-626.000 0.000540
-625.750 0.001948
-625.500 0.002627
-625.250 -0.001437
-625.000 0.000955
-624.750 -0.000582
-624.500 0.002640
-624.250 -0.001048
-624.000 0.002180
-623.750 -0.003305
-623.500 0.002353
-623.250 -0.000908
-623.000 0.001728
-622.750 0.000160
-622.500 0.001645
-622.250 -0.000651
-622.000 0.001856
-621.750 0.001581
-621.500 0.000985
-621.250 0.000942
-621.000 0.002110
-620.750 0.000117
-620.500 -0.001055
-620.250 0.003015
-620.000 -0.000091
-619.750 0.000835
-619.500 0.001019
-619.250 0.002355
-619.000 -0.000704
-618.750 -0.000790
-618.500 0.000019
-618.250 -0.000134
-618.000 -0.000123
-617.750 0.000831
-617.500 0.001568
-617.250 -0.000491
-617.000 0.002866
-616.750 0.000143
-616.500 0.000490
-616.250 0.001049
-616.000 0.002870
-615.750 0.001223
-615.500 0.000982
-615.250 -0.000359
-615.000 0.002900
-614.750 0.000677
-614.500 0.000658
-614.250 0.002700
-614.000 0.000002
-613.750 0.000213
-613.500 0.001694
-613.250 -0.000312
-613.000 0.000419
-612.750 0.000414
-612.500 0.001325
-612.250 0.000094
-612.000 0.001089
-611.750 -0.000198
-611.500 0.001635
-611.250 0.000737
-611.000 -0.000046
-610.750 0.000068
-610.500 0.001006
-610.250 0.000079
-610.000 0.001836
-609.750 0.002766
-609.500 0.001276
-609.250 0.000247
-609.000 0.000628
-608.750 0.002193
-608.500 0.002646
-608.250 0.002348
-608.000 0.000857
-607.750 -0.000423
-607.500 -0.000218
-607.250 0.000280
-607.000 0.001252
-606.750 0.000404
-606.500 0.002017
-606.250 -0.000554
-606.000 0.001009
-605.750 0.001266
-605.500 0.000968
-605.250 0.000284
-605.000 0.001797
-604.750 0.000838
-604.500 0.002422
-604.250 -0.000424
-604.000 -0.000080
-603.750 0.000215
-603.500 -0.001128
-603.250 0.001883
-603.000 0.000773
-602.750 -0.000565
-602.500 0.002195
-602.250 0.000088
-602.000 0.001426
-601.750 0.003078
-601.500 0.002494
-601.250 0.000300
-601.000 0.000579
-600.750 0.000186
-600.500 -0.000276
-600.250 0.001364
-600.000 0.001982
-599.750 0.002404
-599.500 0.001908
-599.250 0.000279
-599.000 -0.001049
-598.750 0.002265
-598.500 -0.001644
-598.250 0.000101
-598.000 0.001239
-597.750 0.000955
-597.500 0.002879
-597.250 0.000817
-597.000 0.001023
-596.750 0.001283
-596.500 0.001764
-596.250 -0.000999
-596.000 0.000187
-595.750 0.001942
-595.500 -0.000854
-595.250 -0.002409
-595.000 0.000357
-594.750 -0.000563
-594.500 0.000600
-594.250 0.003749
-594.000 0.000623
-593.750 0.001857
-593.500 0.000868
-593.250 -0.000006
-593.000 -0.000283
-592.750 0.001902
-592.500 0.002514
-592.250 0.001302
-592.000 0.002633
-591.750 0.000916
-591.500 0.002026
-591.250 -0.000080
-591.000 0.001555
-590.750 0.000751
-590.500 0.001497
-590.250 0.001723
-590.000 0.001914
-589.750 0.000415
-589.500 -0.001266
-589.250 0.001488
-589.000 -0.001072
-588.750 0.001006
-588.500 0.001584
-588.250 0.000532
-588.000 -0.001322
-587.750 -0.000756
-587.500 0.000532
-587.250 -0.000355
-587.000 0.001842
-586.750 0.000552
-586.500 0.001010
-586.250 0.002049
-586.000 0.000164
-585.750 -0.000412
-585.500 0.001661
-585.250 -0.000271
-585.000 -0.000731
-584.750 0.000704
-584.500 0.000736
-584.250 0.000654
-584.000 0.000001
-583.750 -0.002251
-583.500 0.000575
-583.250 -0.000178
-583.000 0.000916
-582.750 0.001753
-582.500 -0.000349
-582.250 -0.000609
-582.000 0.000580
-581.750 -0.000375
-581.500 0.000991
-581.250 -0.000937
-581.000 0.000842
-580.750 0.000026
-580.500 -0.000214
-580.250 -0.000118
-580.000 0.000073
-579.750 0.000877
-579.500 0.002605
-579.250 0.000737
-579.000 0.000471
-578.750 -0.000426
-578.500 0.001335
-578.250 -0.000555
-578.000 0.002658
-577.750 0.001066
-577.500 0.001994
-577.250 0.000393
-577.000 0.000466
-576.750 0.000646
-576.500 0.001826
-576.250 0.001087
-576.000 0.000825
-575.750 -0.002147
-575.500 0.000255
-575.250 0.000812
-575.000 0.001162
-574.750 0.000711
-574.500 0.000311
-574.250 0.001773
-574.000 0.002306
-573.750 0.001012
-573.500 0.000637
-573.250 0.001111
-573.000 0.000362
-572.750 0.001144
-572.500 0.000562
-572.250 0.001344
-572.000 0.001589
-571.750 0.000117
-571.500 -0.000055
-571.250 -0.000233
-571.000 0.000308
-570.750 0.000407
-570.500 0.000665
-570.250 -0.000233
-570.000 0.001547
-569.750 -0.001147
-569.500 0.000613
-569.250 0.000644
-569.000 0.001209
-568.750 0.002192
-568.500 0.000225
-568.250 0.001281
-568.000 0.000971
-567.750 0.000647
-567.500 0.002784
-567.250 0.002174
-567.000 0.000563
-566.750 -0.000070
-566.500 0.001362
-566.250 -0.000124
-566.000 0.000341
-565.750 0.003329
-565.500 0.001766
-565.250 0.000939
-565.000 0.000516
-564.750 0.002648
-564.500 0.002011
-564.250 0.001208
-564.000 0.000322
-563.750 -0.000868
-563.500 0.001683
-563.250 0.000417
-563.000 0.003694
-562.750 0.001758
-562.500 0.002178
-562.250 0.002440
-562.000 -0.000152
-561.750 0.001334
-561.500 0.002478
-561.250 0.001767
-561.000 0.001378
-560.750 0.002441
-560.500 0.001331
-560.250 0.002275
-560.000 0.001786
-559.750 0.000310
-559.500 0.001405
-559.250 0.000688
-559.000 0.000435
-558.750 0.001321
-558.500 0.000936
-558.250 0.001423
-558.000 0.000207
-557.750 0.001619
-557.500 0.000612
-557.250 0.002336
-557.000 -0.000278
-556.750 0.000278
-556.500 0.000520
-556.250 0.003567
-556.000 0.002057
-555.750 0.001919
-555.500 0.000676
-555.250 0.002609
-555.000 0.001933
-554.750 0.000364
-554.500 0.000712
-554.250 0.001593
-554.000 0.000677
-553.750 0.003557
-553.500 0.001873
-553.250 0.003056
-553.000 0.002430
-552.750 0.001535
-552.500 0.002336
-552.250 0.002086
-552.000 0.000928
-551.750 0.001911
-551.500 0.002301
-551.250 0.002146
-551.000 0.001152
-550.750 0.002746
-550.500 0.002402
-550.250 0.002560
-550.000 0.002081
-549.750 0.001410
-549.500 0.001859
-549.250 0.000054
-549.000 0.000729
-548.750 0.001124
-548.500 0.002000
-548.250 0.002374
-548.000 0.003516
-547.750 0.001118
-547.500 0.004229
-547.250 0.003176
-547.000 0.001539
-546.750 0.002328
-546.500 0.002866
-546.250 0.002322
-546.000 0.001054
-545.750 0.002090
-545.500 0.002408
-545.250 0.002877
-545.000 0.001585
-544.750 0.002585
-544.500 0.002317
-544.250 0.002914
-544.000 0.002064
-543.750 0.002194
-543.500 0.003035
-543.250 0.003390
-543.000 0.001940
-542.750 0.003991
-542.500 0.001357
-542.250 0.002414
-542.000 0.000320
-541.750 0.002636
-541.500 0.000484
-541.250 0.002455
-541.000 0.001985
-540.750 0.002848
-540.500 0.003139
-540.250 0.002187
-540.000 0.002249
-539.750 0.002824
-539.500 0.001102
-539.250 0.002202
-539.000 0.002262
-538.750 0.002717
-538.500 0.003449
-538.250 0.004284
-538.000 0.002760
-537.750 0.001382
-537.500 0.002016
-537.250 0.003520
-537.000 0.004057
-536.750 0.001832
-536.500 0.000519
-536.250 0.001278
-536.000 0.004109
-535.750 0.003109
-535.500 0.002729
-535.250 0.003620
-535.000 0.003616
-534.750 0.005985
-534.500 0.003052
-534.250 0.002422
-534.000 0.002318
-533.750 0.003863
-533.500 0.002440
-533.250 0.002440
-533.000 0.003424
-532.750 0.003696
-532.500 0.002383
-532.250 0.005181
-532.000 0.004266
-531.750 0.003357
-531.500 0.002836
-531.250 0.002791
-531.000 0.004392
-530.750 0.004000
-530.500 0.005537
-530.250 0.003467
-530.000 0.004364
-529.750 0.006034
-529.500 0.005192
-529.250 0.004109
-529.000 0.005158
-528.750 0.003946
-528.500 0.003974
-528.250 0.006072
-528.000 0.007039
-527.750 0.005294
-527.500 0.004768
-527.250 0.005977
-527.000 0.006458
-526.750 0.004524
-526.500 0.005562
-526.250 0.004991
-526.000 0.007509
-525.750 0.006177
-525.500 0.004608
-525.250 0.005739
-525.000 0.007256
-524.750 0.006819
-524.500 0.007188
-524.250 0.006378
-524.000 0.007247
-523.750 0.007964
-523.500 0.007976
-523.250 0.008371
-523.000 0.008495
-522.750 0.007874
-522.500 0.009637
-522.250 0.008548
-522.000 0.007169
-521.750 0.008511
-521.500 0.009225
-521.250 0.009122
-521.000 0.010348
-520.750 0.009869
-520.500 0.012080
-520.250 0.011043
-520.000 0.011500
-519.750 0.011698
-519.500 0.012692
-519.250 0.012226
-519.000 0.013552
-518.750 0.012339
-518.500 0.014122
-518.250 0.013902
-518.000 0.013401
-517.750 0.014588
-517.500 0.016467
-517.250 0.016510
-517.000 0.016411
-516.750 0.017746
-516.500 0.017125
-516.250 0.018484
-516.000 0.019682
-515.750 0.020348
-515.500 0.019410
-515.250 0.020820
-515.000 0.021084
-514.750 0.023799
-514.500 0.024193
-514.250 0.024466
-514.000 0.026420
-513.750 0.024900
-513.500 0.028586
-513.250 0.028666
-513.000 0.028609
-512.750 0.030678
-512.500 0.031081
-512.250 0.031811
-512.000 0.032660
-511.750 0.033620
-511.500 0.037438
-511.250 0.034871
-511.000 0.037713
-510.750 0.038781
-510.500 0.040564
-510.250 0.044399
-510.000 0.043881
-509.750 0.046421
-509.500 0.046741
-509.250 0.046794
-509.000 0.049522
-508.750 0.052733
-508.500 0.054422
-508.250 0.053607
-508.000 0.057517
-507.750 0.060001
-507.500 0.058060
-507.250 0.062783
-507.000 0.062952
-506.750 0.067736
-506.500 0.068677
-506.250 0.068596
-506.000 0.072423
-505.750 0.074690
-505.500 0.078619
-505.250 0.079714
-505.000 0.084549
-504.750 0.085463
-504.500 0.089676
-504.250 0.092779
-504.000 0.094395
-503.750 0.097944
-503.500 0.102598
-503.250 0.106443
-503.000 0.106442
-502.750 0.112589
-502.500 0.115285
-502.250 0.117788
-502.000 0.123433
-501.750 0.126776
-501.500 0.130905
-501.250 0.136913
-501.000 0.142013
-500.750 0.144770
-500.500 0.150715
-500.250 0.153160
-500.000 0.161046
-499.750 0.165289
-499.500 0.171208
-499.250 0.175056
-499.000 0.182432
-498.750 0.186069
-498.500 0.193270
-498.250 0.198940
-498.000 0.205717
-497.750 0.208447
-497.500 0.219067
-497.250 0.223011
-497.000 0.230423
-496.750 0.237589
-496.500 0.247289
-496.250 0.254037
-496.000 0.260339
-495.750 0.266421
-495.500 0.276830
-495.250 0.281242
-495.000 0.290877
-494.750 0.301098
-494.500 0.307344
-494.250 0.317485
-494.000 0.325439
-493.750 0.335905
-493.500 0.344531
-493.250 0.354326
-493.000 0.362063
-492.750 0.372033
-492.500 0.381660
-492.250 0.390094
-492.000 0.399778
-491.750 0.404125
-491.500 0.411818
-491.250 0.420785
-491.000 0.432287
-490.750 0.442628
-490.500 0.453151
-490.250 0.464478
-490.000 0.473760
-489.750 0.485156
-489.500 0.495804
-489.250 0.506534
-489.000 0.519081
-488.750 0.530027
-488.500 0.541662
-488.250 0.555836
-488.000 0.567276
-487.750 0.579372
-487.500 0.588890
-487.250 0.602199
-487.000 0.615152
-486.750 0.627062
-486.500 0.639785
-486.250 0.654855
-486.000 0.667859
-485.750 0.678458
-485.500 0.689456
-485.250 0.707747
-485.000 0.720609
-484.750 0.729401
-484.500 0.747311
-484.250 0.761109
-484.000 0.771278
-483.750 0.788845
-483.500 0.803751
-483.250 0.816788
-483.000 0.829087
-482.750 0.842090
-482.500 0.857695
-482.250 0.873934
-482.000 0.887415
-481.750 0.902979
-481.500 0.914144
-481.250 0.932168
-481.000 0.944113
-480.750 0.960203
-480.500 0.973121
-480.250 0.987002
-480.000 1.001077
-479.750 1.017602
-479.500 1.034350
-479.250 1.046191
-479.000 1.059908
-478.750 1.079969
-478.500 1.097367
-478.250 1.109840
-478.000 1.126115
-477.750 1.140256
-477.500 1.151599
-477.250 1.170288
-477.000 1.187523
-476.750 1.200290
-476.500 1.216126
-476.250 1.233279
-476.000 1.249161
-475.750 1.265606
-475.500 1.280025
-475.250 1.290943
-475.000 1.309434
-474.750 1.326134
-474.500 1.340813
-474.250 1.349204
-474.000 1.367864
-473.750 1.377791
-473.500 1.393125
-473.250 1.409705
-473.000 1.418322
-472.750 1.431218
-472.500 1.443075
-472.250 1.454210
-472.000 1.467261
-471.750 1.485638
-471.500 1.489768
-471.250 1.496841
-471.000 1.510198
-470.750 1.522041
-470.500 1.531030
-470.250 1.545328
-470.000 1.560172
-469.750 1.570888
-469.500 1.580139
-469.250 1.593152
-469.000 1.594805
-468.750 1.605464
-468.500 1.616219
-468.250 1.621754
-468.000 1.632535
-467.750 1.644631
-467.500 1.650524
-467.250 1.656282
-467.000 1.667263
-466.750 1.673635
-466.500 1.686621
-466.250 1.693873
-466.000 1.696128
-465.750 1.704764
-465.500 1.711756
-465.250 1.714948
-465.000 1.728853
-464.750 1.729348
-464.500 1.743019
-464.250 1.746787
-464.000 1.752885
-463.750 1.760666
-463.500 1.760704
-463.250 1.768180
-463.000 1.766523
-462.750 1.778626
-462.500 1.778225
-462.250 1.783692
-462.000 1.792741
-461.750 1.797693
-461.500 1.795760
-461.250 1.804503
-461.000 1.810953
-460.750 1.813487
-460.500 1.816123
-460.250 1.819425
-460.000 1.819624
-459.750 1.816466
-459.500 1.823444
-459.250 1.836482
-459.000 1.830087
-458.750 1.834800
-458.500 1.841166
-458.250 1.840140
-458.000 1.839459
-457.750 1.836853
-457.500 1.837930
-457.250 1.840912
-457.000 1.847599
-456.750 1.847373
-456.500 1.846104
-456.250 1.851409
-456.000 1.852811
-455.750 1.850807
-455.500 1.854914
-455.250 1.856802
-455.000 1.852359
-454.750 1.853096
-454.500 1.853795
-454.250 1.854348
-454.000 1.855929
-453.750 1.856634
-453.500 1.855813
-453.250 1.848005
-453.000 1.857326
-452.750 1.851605
-452.500 1.850387
-452.250 1.853856
-452.000 1.854881
-451.750 1.847421
-451.500 1.847991
-451.250 1.857937
-451.000 1.854583
-450.750 1.858615
-450.500 1.845350
-450.250 1.858381
-450.000 1.854062
-449.750 1.851552
-449.500 1.843309
-449.250 1.846660
-449.000 1.844071
-448.750 1.839074
-448.500 1.830719
-448.250 1.836334
-448.000 1.835399
-447.750 1.834972
-447.500 1.834846
-447.250 1.830959
-447.000 1.814837
-446.750 1.825482
-446.500 1.817394
-446.250 1.827438
-446.000 1.822202
-445.750 1.819161
-445.500 1.808851
-445.250 1.801431
-445.000 1.805995
-444.750 1.810186
-444.500 1.814813
-444.250 1.802981
-444.000 1.809521
-443.750 1.807120
-443.500 1.800821
-443.250 1.790042
-443.000 1.794777
-442.750 1.783619
-442.500 1.786601
-442.250 1.779207
-442.000 1.790295
-441.750 1.787355
-441.500 1.775297
-441.250 1.771944
-441.000 1.768527
-440.750 1.766404
-440.500 1.765948
-440.250 1.763506
-440.000 1.760175
-439.750 1.753914
-439.500 1.748948
-439.250 1.751297
-439.000 1.744780
-438.750 1.738644
-438.500 1.742462
-438.250 1.733294
-438.000 1.731909
-437.750 1.724946
-437.500 1.713200
-437.250 1.712755
-437.000 1.722690
-436.750 1.696102
-436.500 1.697120
-436.250 1.704847
-436.000 1.691638
-435.750 1.690900
-435.500 1.695534
-435.250 1.683187
-435.000 1.682039
-434.750 1.667432
-434.500 1.674124
-434.250 1.666470
-434.000 1.667341
-433.750 1.649206
-433.500 1.654528
-433.250 1.648213
-433.000 1.636745
-432.750 1.640029
-432.500 1.637619
-432.250 1.622890
-432.000 1.623684
-431.750 1.619482
-431.500 1.608657
-431.250 1.612524
-431.000 1.604380
-430.750 1.592960
-430.500 1.593769
-430.250 1.588738
-430.000 1.580874
-429.750 1.583372
-429.500 1.564663
-429.250 1.563121
-429.000 1.563412
-428.750 1.549781
-428.500 1.554880
-428.250 1.542450
-428.000 1.542101
-427.750 1.526977
-427.500 1.529820
-427.250 1.525953
-427.000 1.517332
-426.750 1.513895
-426.500 1.508433
-426.250 1.498621
-426.000 1.489842
-425.750 1.488509
-425.500 1.484847
-425.250 1.478670
-425.000 1.469083
-424.750 1.459923
-424.500 1.452635
-424.250 1.446755
-424.000 1.437943
-423.750 1.435912
-423.500 1.427282
-423.250 1.416570
-423.000 1.419523
-422.750 1.407179
-422.500 1.399733
-422.250 1.391979
-422.000 1.389844
-421.750 1.384139
-421.500 1.381486
-421.250 1.361263
-421.000 1.359125
-420.750 1.347285
-420.500 1.340171
-420.250 1.339171
-420.000 1.327270
-419.750 1.318870
-419.500 1.314066
-419.250 1.305208
-419.000 1.299636
-418.750 1.290758
-418.500 1.282128
-418.250 1.269650
-418.000 1.268674
-417.750 1.259497
-417.500 1.254514
-417.250 1.246204
-417.000 1.236159
-416.750 1.230592
-416.500 1.219814
-416.250 1.208552
-416.000 1.206094
-415.750 1.201313
-415.500 1.196249
-415.250 1.185113
-415.000 1.178991
-414.750 1.176668
-414.500 1.166433
-414.250 1.154901
-414.000 1.151682
-413.750 1.140955
-413.500 1.130924
-413.250 1.129338
-413.000 1.121470
-412.750 1.109495
-412.500 1.112846
-412.250 1.098981
-412.000 1.101536
-411.750 1.094811
-411.500 1.088235
-411.250 1.077106
-411.000 1.070724
-410.750 1.065664
-410.500 1.054043
-410.250 1.044583
-410.000 1.041445
-409.750 1.035140
-409.500 1.032585
-409.250 1.023565
-409.000 1.015033
-408.750 1.008563
-408.500 1.001095
-408.250 0.997377
-408.000 0.985273
-407.750 0.984415
-407.500 0.970997
-407.250 0.967440
-407.000 0.961576
-406.750 0.950522
-406.500 0.951770
-406.250 0.941268
-406.000 0.940969
-405.750 0.927263
-405.500 0.919785
-405.250 0.913934
-405.000 0.903149
-404.750 0.899691
-404.500 0.894056
-404.250 0.891572
-404.000 0.882521
-403.750 0.875929
-403.500 0.864006
-403.250 0.864889
-403.000 0.859166
-402.750 0.850735
-402.500 0.843364
-402.250 0.838488
-402.000 0.831549
-401.750 0.827026
-401.500 0.815881
-401.250 0.812708
-401.000 0.808612
-400.750 0.801094
-400.500 0.794788
-400.250 0.788117
-400.000 0.784465
-399.750 0.779231
-399.500 0.773893
-399.250 0.768103
-399.000 0.758542
-398.750 0.750166
-398.500 0.746501
-398.250 0.744711
-398.000 0.732846
-397.750 0.729293
-397.500 0.726528
-397.250 0.712691
-397.000 0.710217
-396.750 0.705656
-396.500 0.699080
-396.250 0.693714
-396.000 0.685906
-395.750 0.676197
-395.500 0.670175
-395.250 0.669454
-395.000 0.662164
-394.750 0.654837
-394.500 0.650481
-394.250 0.644421
-394.000 0.640018
-393.750 0.631024
-393.500 0.627066
-393.250 0.620201
-393.000 0.618361
-392.750 0.610644
-392.500 0.606236
-392.250 0.596042
-392.000 0.591400
-391.750 0.584576
-391.500 0.586497
-391.250 0.579418
-391.000 0.570761
-390.750 0.571627
-390.500 0.565790
-390.250 0.561336
-390.000 0.551768
-389.750 0.547165
-389.500 0.543238
-389.250 0.536130
-389.000 0.532471
-388.750 0.530376
-388.500 0.527796
-388.250 0.518375
-388.000 0.514024
-387.750 0.511162
-387.500 0.506842
-387.250 0.504771
-387.000 0.499727
-386.750 0.492431
-386.500 0.493567
-386.250 0.484988
-386.000 0.481181
-385.750 0.477143
-385.500 0.473275
-385.250 0.470359
-385.000 0.465429
-384.750 0.460725
-384.500 0.457158
-384.250 0.456887
-384.000 0.450583
-383.750 0.443172
-383.500 0.440244
-383.250 0.439282
-383.000 0.433423
-382.750 0.436229
-382.500 0.424293
-382.250 0.423676
-382.000 0.418072
-381.750 0.416187
-381.500 0.410521
-381.250 0.410703
-381.000 0.406220
-380.750 0.405959
-380.500 0.397956
-380.250 0.394971
-380.000 0.390174
-379.750 0.388047
-379.500 0.384419
-379.250 0.380012
-379.000 0.383473
-378.750 0.374935
-378.500 0.369261
-378.250 0.365915
-378.000 0.364646
-377.750 0.362120
-377.500 0.357627
-377.250 0.355601
-377.000 0.351923
-376.750 0.349981
-376.500 0.343197
-376.250 0.343363
-376.000 0.336080
-375.750 0.338200
-375.500 0.331339
-375.250 0.331295
-375.000 0.327159
-374.750 0.324800
-374.500 0.316912
-374.250 0.321584
-374.000 0.317157
-373.750 0.314394
-373.500 0.311933
-373.250 0.307991
-373.000 0.305850
-372.750 0.300357
-372.500 0.302398
-372.250 0.300119
-372.000 0.301788
-371.750 0.294374
-371.500 0.289817
-371.250 0.289715
-371.000 0.283722
-370.750 0.284413
-370.500 0.280980
-370.250 0.282786
-370.000 0.276642
-369.750 0.277362
-369.500 0.274303
-369.250 0.269527
-369.000 0.271239
-368.750 0.263047
-368.500 0.261197
-368.250 0.261002
-368.000 0.260707
-367.750 0.256858
-367.500 0.252833
-367.250 0.251443
-367.000 0.249702
-366.750 0.251339
-366.500 0.246414
-366.250 0.241847
-366.000 0.244070
-365.750 0.239116
-365.500 0.236174
-365.250 0.236369
-365.000 0.235509
-364.750 0.228521
-364.500 0.231901
-364.250 0.226640
-364.000 0.225582
-363.750 0.225079
-363.500 0.227058
-363.250 0.221091
-363.000 0.225328
-362.750 0.217849
-362.500 0.218292
-362.250 0.214232
-362.000 0.215715
-361.750 0.210092
-361.500 0.209317
-361.250 0.210199
-361.000 0.207231
-360.750 0.205099
-360.500 0.205093
-360.250 0.202446
-360.000 0.200532
-359.750 0.203341
-359.500 0.199270
-359.250 0.196662
-359.000 0.195995
-358.750 0.191428
-358.500 0.195964
-358.250 0.197531
-358.000 0.189168
-357.750 0.191085
-357.500 0.192020
-357.250 0.188696
-357.000 0.182438
-356.750 0.184706
-356.500 0.176496
-356.250 0.183932
-356.000 0.175004
-355.750 0.178355
-355.500 0.179858
-355.250 0.179899
-355.000 0.177043
-354.750 0.175541
-354.500 0.173554
-354.250 0.167817
-354.000 0.173603
-353.750 0.176040
-353.500 0.174166
-353.250 0.170477
-353.000 0.167256
-352.750 0.164269
-352.500 0.171244
-352.250 0.167618
-352.000 0.163031
-351.750 0.163608
-351.500 0.165996
-351.250 0.159724
-351.000 0.162176
-350.750 0.160044
-350.500 0.153497
-350.250 0.154399
-350.000 0.156709
-349.750 0.159592
-349.500 0.158326
-349.250 0.162303
-349.000 0.154231
-348.750 0.143696
-348.500 0.158352
-348.250 0.157700
-348.000 0.148508
-347.750 0.156349
-347.500 0.148151
-347.250 0.153139
-347.000 0.147673
-346.750 0.148098
-346.500 0.153938
-346.250 0.152076
-346.000 0.152298
-345.750 0.142747
-345.500 0.145213
-345.250 0.153900
-345.000 0.146978
-344.750 0.147138
-344.500 0.150859
-344.250 0.143783
-344.000 0.151068
-343.750 0.148105
-343.500 0.141355
-343.250 0.140875
-343.000 0.143040
-342.750 0.146450
-342.500 0.147139
-342.250 0.141078
-342.000 0.141793
-341.750 0.153308
-341.500 0.148057
-341.250 0.147297
-341.000 0.147653
-340.750 0.150010
-340.500 0.142927
-340.250 0.146266
-340.000 0.148453
-339.750 0.156465
-339.500 0.148291
-339.250 0.146827
-339.000 0.146956
-338.750 0.148063
-338.500 0.143521
-338.250 0.148606
-338.000 0.144162
-337.750 0.153081
-337.500 0.149483
-337.250 0.150997
-337.000 0.150044
-336.750 0.153076
-336.500 0.162385
-336.250 0.155170
-336.000 0.154031
-335.750 0.146523
-335.500 0.159546
-335.250 0.164967
-335.000 0.154491
-334.750 0.149409
-334.500 0.152782
-334.250 0.155691
-334.000 0.146996
-333.750 0.157165
-333.500 0.158794
-333.250 0.158724
-333.000 0.162895
-332.750 0.161968
-332.500 0.159997
-332.250 0.157223
-332.000 0.162192
-331.750 0.160337
-331.500 0.154666
-331.250 0.166325
-331.000 0.163170
-330.750 0.160672
-330.500 0.167714
-330.250 0.167915
-330.000 0.163880
-329.750 0.164373
-329.500 0.166254
-329.250 0.169905
-329.000 0.166488
-328.750 0.171528
-328.500 0.174559
-328.250 0.165377
-328.000 0.169938
-327.750 0.175941
-327.500 0.179443
-327.250 0.172176
-327.000 0.170810
-326.750 0.179400
-326.500 0.177425
-326.250 0.173978
-326.000 0.175459
-325.750 0.175955
-325.500 0.187965
-325.250 0.183506
-325.000 0.179989
-324.750 0.184163
-324.500 0.179882
-324.250 0.185322
-324.000 0.192224
-323.750 0.190439
-323.500 0.185054
-323.250 0.187270
-323.000 0.191856
-322.750 0.192442
-322.500 0.187779
-322.250 0.189883
-322.000 0.198279
-321.750 0.190099
-321.500 0.196479
-321.250 0.196946
-321.000 0.198823
-320.750 0.202542
-320.500 0.194340
-320.250 0.196445
-320.000 0.203024
-319.750 0.199329
-319.500 0.202523
-319.250 0.201017
-319.000 0.198086
-318.750 0.199690
-318.500 0.203814
-318.250 0.206346
-318.000 0.208664
-317.750 0.209464
-317.500 0.205052
-317.250 0.212960
-317.000 0.208087
-316.750 0.214934
-316.500 0.210078
-316.250 0.208640
-316.000 0.212058
-315.750 0.209844
-315.500 0.211461
-315.250 0.213439
-315.000 0.218150
-314.750 0.214387
-314.500 0.217037
-314.250 0.215708
-314.000 0.220565
-313.750 0.221578
-313.500 0.214118
-313.250 0.223177
-313.000 0.220233
-312.750 0.222263
-312.500 0.225229
-312.250 0.221214
-312.000 0.224047
-311.750 0.226373
-311.500 0.225933
-311.250 0.223556
-311.000 0.221582
-310.750 0.220336
-310.500 0.229840
-310.250 0.233339
-310.000 0.230065
-309.750 0.230394
-309.500 0.230573
-309.250 0.232903
-309.000 0.233199
-308.750 0.239265
-308.500 0.231477
-308.250 0.232984
-308.000 0.227587
-307.750 0.230493
-307.500 0.233081
-307.250 0.239346
-307.000 0.238054
-306.750 0.236219
-306.500 0.236882
-306.250 0.229527
-306.000 0.236100
-305.750 0.241625
-305.500 0.245136
-305.250 0.237689
-305.000 0.239350
-304.750 0.243502
-304.500 0.244706
-304.250 0.244038
-304.000 0.249938
-303.750 0.246604
-303.500 0.244041
-303.250 0.241025
-303.000 0.248219
-302.750 0.238866
-302.500 0.247556
-302.250 0.244228
-302.000 0.245991
-301.750 0.251647
-301.500 0.252827
-301.250 0.243687
-301.000 0.249091
-300.750 0.256465
-300.500 0.247661
-300.250 0.251606
-300.000 0.248964
-299.750 0.252268
-299.500 0.250951
-299.250 0.249106
-299.000 0.255694
-298.750 0.257666
-298.500 0.255988
-298.250 0.257628
-298.000 0.256609
-297.750 0.253869
-297.500 0.250451
-297.250 0.258887
-297.000 0.263199
-296.750 0.257040
-296.500 0.253775
-296.250 0.258138
-296.000 0.258213
-295.750 0.261633
-295.500 0.262931
-295.250 0.260412
-295.000 0.263835
-294.750 0.267593
-294.500 0.260730
-294.250 0.257485
-294.000 0.261625
-293.750 0.261443
-293.500 0.263428
-293.250 0.258649
-293.000 0.265758
-292.750 0.271056
-292.500 0.264563
-292.250 0.268447
-292.000 0.266045
-291.750 0.263747
-291.500 0.267238
-291.250 0.268309
-291.000 0.274134
-290.750 0.272555
-290.500 0.272974
-290.250 0.269241
-290.000 0.265992
-289.750 0.274277
-289.500 0.273740
-289.250 0.272384
-289.000 0.271253
-288.750 0.274891
-288.500 0.279346
-288.250 0.277111
-288.000 0.273747
-287.750 0.277344
-287.500 0.278157
-287.250 0.278262
-287.000 0.278972
-286.750 0.280832
-286.500 0.277159
-286.250 0.286144
-286.000 0.278156
-285.750 0.277891
-285.500 0.280443
-285.250 0.277367
-285.000 0.280821
-284.750 0.277663
-284.500 0.280531
-284.250 0.281540
-284.000 0.289916
-283.750 0.279915
-283.500 0.277901
-283.250 0.289338
-283.000 0.287156
-282.750 0.284366
-282.500 0.283675
-282.250 0.292629
-282.000 0.282890
-281.750 0.284116
-281.500 0.280611
-281.250 0.287628
-281.000 0.283177
-280.750 0.287964
-280.500 0.287014
-280.250 0.285804
-280.000 0.291663
-279.750 0.284617
-279.500 0.288047
-279.250 0.285506
-279.000 0.292081
-278.750 0.289202
-278.500 0.290395
-278.250 0.281847
-278.000 0.291420
-277.750 0.289075
-277.500 0.290129
-277.250 0.287856
-277.000 0.286223
-276.750 0.291591
-276.500 0.291828
-276.250 0.285657
-276.000 0.291369
-275.750 0.282416
-275.500 0.292265
-275.250 0.291572
-275.000 0.294789
-274.750 0.289152
-274.500 0.286162
-274.250 0.293733
-274.000 0.284931
-273.750 0.288638
-273.500 0.290369
-273.250 0.288736
-273.000 0.288824
-272.750 0.293727
-272.500 0.288399
-272.250 0.287643
-272.000 0.290198
-271.750 0.288596
-271.500 0.286238
-271.250 0.288016
-271.000 0.289589
-270.750 0.287425
-270.500 0.284982
-270.250 0.293242
-270.000 0.291171
-269.750 0.291055
-269.500 0.287614
-269.250 0.285780
-269.000 0.287755
-268.750 0.289843
-268.500 0.287788
-268.250 0.289634
-268.000 0.286127
-267.750 0.285383
-267.500 0.288344
-267.250 0.288631
-267.000 0.289175
-266.750 0.285403
-266.500 0.286425
-266.250 0.288959
-266.000 0.293827
-265.750 0.287069
-265.500 0.287558
-265.250 0.293491
-265.000 0.290901
-264.750 0.290559
-264.500 0.290980
-264.250 0.297674
-264.000 0.292210
-263.750 0.289555
-263.500 0.288041
-263.250 0.294963
-263.000 0.291411
-262.750 0.293384
-262.500 0.296503
-262.250 0.299751
-262.000 0.294547
-261.750 0.293179
-261.500 0.295129
-261.250 0.298605
-261.000 0.296387
-260.750 0.303467
-260.500 0.297811
-260.250 0.300513
-260.000 0.300330
-259.750 0.301772
-259.500 0.299348
-259.250 0.303467
-259.000 0.302518
-258.750 0.308689
-258.500 0.308930
-258.250 0.314558
-258.000 0.311470
-257.750 0.307254
-257.500 0.311549
-257.250 0.321780
-257.000 0.326667
-256.750 0.330390
-256.500 0.325364
-256.250 0.329821
-256.000 0.335945
-255.750 0.333252
-255.500 0.336778
-255.250 0.339673
-255.000 0.343333
-254.750 0.338764
-254.500 0.349499
-254.250 0.349318
-254.000 0.353904
-253.750 0.356977
-253.500 0.361135
-253.250 0.364462
-253.000 0.373863
-252.750 0.372712
-252.500 0.372288
-252.250 0.377149
-252.000 0.379380
-251.750 0.379883
-251.500 0.391014
-251.250 0.397669
-251.000 0.399963
-250.750 0.413173
-250.500 0.411242
-250.250 0.415035
-250.000 0.413945
-249.750 0.424185
-249.500 0.434087
-249.250 0.447793
-249.000 0.434247
-248.750 0.446772
-248.500 0.451104
-248.250 0.446940
-248.000 0.457072
-247.750 0.464649
-247.500 0.463968
-247.250 0.471274
-247.000 0.478035
-246.750 0.472998
-246.500 0.488234
-246.250 0.492785
-246.000 0.489170
-245.750 0.497396
-245.500 0.514458
-245.250 0.514914
-245.000 0.516976
-244.750 0.533890
-244.500 0.522568
-244.250 0.539249
-244.000 0.559919
-243.750 0.544205
-243.500 0.560541
-243.250 0.562978
-243.000 0.577710
-242.750 0.578995
-242.500 0.594804
-242.250 0.593923
-242.000 0.592221
-241.750 0.599145
-241.500 0.628855
-241.250 0.599058
-241.000 0.600732
-240.750 0.601622
-240.500 0.571203
-240.250 0.627491
-240.000 0.542981
-239.750 0.581265
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm
deleted file mode 100644
index 69b6a81..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 5-4</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#500000">
-
-<H1 align="center">GIFgraph.pm - example 5-4</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample54.gif">
-<p align="center">
-
-<p align="center"><a href="sample54.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl
deleted file mode 100644
index d87ba2e..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-use GIFgraph::lines;
-
-print STDERR "Processing sample 5-4\n";
-
-# The reverse is in here, because I thought the falling line was
-# depressing, but I was too lazy to retype the data set
-
-@data = read_data("sample54.dat")
- or die "Cannot read data from sample54.dat";
-
-$my_graph = new GIFgraph::lines();
-
-$my_graph->set(
- x_label => 'Wavelength (nm)',
- y_label => 'Absorbance',
- title => 'Numerical X axis',
-
- y_min_value => 0,
- y_max_value => 2,
- y_tick_number => 8,
- y_label_skip => 4,
-
- x_tick_number => 'auto',
-
- box_axis => 0,
- line_width => 2,
- x_label_position => 1/2,
- r_margin => 15,
-);
-
-$my_graph->set_legend('Thanks to Scott Prahl');
-
-$my_graph->plot_to_gif( "sample54.gif", \@data );
-
-exit;
-
-sub read_data
-{
- my $fn = shift;
- my @d = ();
-
- open(ZZZ, $fn) || return ();
-
- while (<ZZZ>)
- {
- chomp;
- my @row = split;
-
- for (my $i = 0; $i <= $#row; $i++)
- {
- undef $row[$i] if ($row[$i] eq 'undef');
- push @{$d[$i]}, $row[$i];
- }
- }
-
- close (ZZZ);
-
- return @d;
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm
deleted file mode 100644
index ab91bfe..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 6-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 6-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample61.gif">
-<p align="center">
-
-<p align="center"><a href="sample61.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl
deleted file mode 100644
index 13be33c..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-use GIFgraph::mixed;
-
-print STDERR "Processing sample 6-1 (The error message is intended)\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
- [ -4, -3, 1, 1, -3, -1.5, -2, -1, 0],
- [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
- [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
- [ -0.1, 2, 5, 4, -3, 2.5, 3.2, 4, -4],
- [ -0.1, 2, 5, 4, -3, 2.5, 3.2, 4, -4],
-);
-
-$my_graph = new GIFgraph::mixed();
-
-$my_graph->set(
- types => [ qw( lines bars points area linespoints wrong_type ) ],
- default_type => 'points',
-);
-
-$my_graph->set(
-
- x_label => 'X Label',
- y_label => 'Y label',
- title => 'A Mixed Type Graph',
-
- y_max_value => 10,
- y_min_value => -5,
- y_tick_number => 3,
- y_label_skip => 1,
- x_plot_values => 0,
- y_plot_values => 0,
-
- long_ticks => 1,
- x_ticks => 0,
-
- legend_marker_width => 24,
- line_width => 3,
- marker_size => 5,
-
- bar_spacing => 8,
-);
-
-$my_graph->set_legend( qw( one two three four five six ) );
-
-$my_graph->plot_to_gif( "sample61.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm
deleted file mode 100644
index f50008a..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 6-2</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 6-2</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample62.gif">
-<p align="center">
-
-<p align="center"><a href="sample62.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl
deleted file mode 100644
index 0d1e775..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl
+++ /dev/null
@@ -1,38 +0,0 @@
-use GIFgraph::mixed;
-
-print STDERR "Processing sample 6-2\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, 3],
- [ .4, .3, 1, 1, .3, 1.5, 2, 1, 0],
-);
-
-$my_graph = new GIFgraph::mixed();
-
-$my_graph->set(
- x_label => 'X Label',
- y1_label => 'Y1 label',
- y2_label => 'Y2 label',
- title => 'A Mixed Type Graph with Two Axes',
- two_axes => 1,
- y1_max_value => 10,
- y2_max_value => 2.5,
- y_min_value => 0,
- y_tick_number => 5,
- long_ticks => 1,
- x_ticks => 0,
- legend_marker_width => 24,
- line_width => 5,
-
- bar_spacing => 4,
-
- types => [ qw( bars lines ) ],
-);
-
-$my_graph->set_legend( qw( one two three four five six ) );
-
-$my_graph->plot_to_gif( "sample62.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm
deleted file mode 100644
index 1b018ac..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 9-1</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 9-1</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample91.gif">
-<p align="center">
-
-<p align="center"><a href="sample91.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl
deleted file mode 100644
index 89770c2..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-use GIFgraph::pie;
-
-print STDERR "Processing sample 9-1\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th"],
- [ 4, 2, 3, 4, 3, 3.5]
-);
-
-$my_graph = new GIFgraph::pie( 250, 200 );
-#$my_graph = new GIFgraph::pie( );
-
-$my_graph->set(
- title => 'A Pie Chart',
- label => 'Label',
- axislabelclr => 'black',
- pie_height => 36,
-);
-
-$my_graph->plot_to_gif( "sample91.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm
deleted file mode 100644
index aa9a1c3..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 9-2</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 9-2</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample92.gif">
-<p align="center">
-
-<p align="center"><a href="sample92.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl
deleted file mode 100644
index 93f7e69..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-use GIFgraph::pie;
-
-print STDERR "Processing sample 9-2\n";
-
-@data = (
- ["1st","2nd","3rd","4th","5th","6th"],
- [ 4, 2, 3, 4, 3, 3.5]
-);
-
-$my_graph = new GIFgraph::pie( 250, 200 );
-
-$my_graph->set(
- title => 'A Pie Chart',
- label => 'Label',
- axislabelclr => 'white',
- dclrs => [ 'lblue' ],
- accentclr => 'lgray',
-);
-
-$my_graph->plot_to_gif( "sample92.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm
deleted file mode 100644
index ed0cf45..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm
+++ /dev/null
@@ -1,20 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>GIFgraph.pm - example 9-3</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
-
-<H1 align="center">GIFgraph.pm - example 9-3</H1>
-
-<hr>
-
-<p align="center">
-<img src="sample93.gif">
-<p align="center">
-
-<p align="center"><a href="sample93.pl">The code.</a></p>
-
-<hr>
-
-</BODY>
-</HTML>
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl
deleted file mode 100644
index 5244777..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl
+++ /dev/null
@@ -1,20 +0,0 @@
-use GIFgraph::pie;
-
-print STDERR "Processing sample 9-3\n";
-
-@data = (
- [ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
- [ sort { $b <=> $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
-);
-
-$my_graph = new GIFgraph::pie( 200, 200 );
-
-$my_graph->set(
- start_angle => 90,
- '3d' => 0
-);
-
-$my_graph->plot_to_gif( "sample93.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl b/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl
deleted file mode 100644
index 948765a..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-use GIFgraph::pie;
-
-print STDERR "Processing sample 9-4\n";
-
-@data = (
- [ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
- [ sort { $b <=> $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
-);
-
-$my_graph = new GIFgraph::pie( 260, 300 );
-
-$my_graph->set(
- start_angle => 90,
- '3d' => 0
-);
-
-$my_graph->set_legend( 'Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Forget', 'Rest');
-
-$my_graph->plot_to_gif( "sample94.gif", \@data );
-
-exit;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/area.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/area.t
deleted file mode 100644
index a7a16df..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/area.t
+++ /dev/null
@@ -1,60 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::area;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 3, 7, 8, 2, 4, 8.5, 2, 5, 9],
- [ 4, 2, 5, 6, 3, 2.5, 3, 3, 4],
-);
-
-my @opts = (
- {},
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'An area chart',
- 'transparent' => 1,
- 'interlaced' => 1,
- },
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'An area chart',
- 'y_max_value' => 10,
- 'transparent' => 1,
- 'interlaced' => 1,
- },
-);
-
-print "1..2\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1..2)
-{
- my $fn = 't/area' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- if ($i == 2)
- {
- foreach (@{$data[1]})
- {
- $_ *= -1;
- }
- }
-
- my $g = new GIFgraph::area( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t
deleted file mode 100644
index 6fd95b3..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t
+++ /dev/null
@@ -1,72 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::bars;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
- [ 3, 7, 8, 2, 4, 1.5, 2, 5, 1]
-);
-
-my @opts = (
- {},
- {
- 'x_label' => 'X2 Label',
- 'y_label' => 'Y2 label',
- 'title' => 'A Double axis Bar Chart',
- 'y_max_value' => 20,
- 'y_tick_number' => 5,
- 'y_label_skip' => 2,
- 'logo' => 't/logo.gif',
- 'logo_resize' => 0.5,
- 'logo_position' => 'UR',
- 't_margin' => 20,
- 'r_margin' => 20,
- 'l_margin' => 20,
- 'b_margin' => 20,
- 'long_ticks' => 1,
- 'x_ticks' => 1,
- 'two_axes' => 1,
- 'axis_space' => 8,
- },
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'A Simple Bar Chart',
- 'y_max_value' => 8,
- 'y_tick_number' => 8,
- 'y_label_skip' => 2,
- 'transparent' => 1,
- 'interlaced' => 1,
- 'bgclr' => 'blue',
- 'fgclr' => 'lyellow',
- 'textclr' => 'lred',
- 'labelclr' => 'lblue',
- 'axislabelclr' => 'lgreen',
- 'accentclr' => 'lgray',
- },
-);
-
-print "1..2\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1..2)
-{
- my $fn = 't/bars' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- my $g = new GIFgraph::bars( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t
deleted file mode 100644
index 2de34d4..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t
+++ /dev/null
@@ -1,28 +0,0 @@
-use strict;
-use GIFgraph::colour qw( :colours :files :lists );
-
-my $n_def = scalar @{[colour_list()]};
-
-print "1..6\n";
-
-# Test 1 .. 2 : read_rgb
-
-my $n = read_rgb("t/colour_rgb.txt");
-print $n == 44 ? "" : "not " , "ok 1\n";
-$n = scalar @{[colour_list()]};
-print $n == $n_def + 44 ? "" : "not " , "ok 2\n";
-
-# Test 3 .. 5 : _rgb, _luminance, _hue
-
-my @rgb = _rgb('light steel blue');
-print $rgb[0]==176 && $rgb[1]==196 && $rgb[2]==222 ? "" : "not " , "ok 3\n";
-$n = sprintf "%8f", _hue(@rgb);
-print $n == 0.776471 ? "" : "not " , "ok 4\n";
-$n = sprintf "%8f", _luminance(@rgb);
-print $n == 0.759306 ? "" : "not " , "ok 5\n";
-
-# Test 6 .. 6 : lists
-
-my @list = sorted_colour_list(10);
-print scalar(@list) == 10 && $list[0] eq 'white' ? "" : "not " , "ok 6\n";
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt b/src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt
deleted file mode 100644
index d2bd9a6..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $
-199 21 133 medium violet red
-176 196 222 light steel blue
-102 139 139 paleturquoise4
-159 121 238 mediumpurple2
-141 182 205 lightskyblue3
- 0 238 118 springgreen2
-255 160 122 light salmon
-154 205 50 yellowgreen
-178 58 238 darkorchid2
- 69 139 116 aquamarine4
-! This is a comment
- 71 60 139 slateblue4
-131 111 255 slateblue1
-192 255 62 olivedrab1
-139 105 20 goldenrod4
-205 155 29 goldenrod3
-142 229 238 cadetblue2
-255 211 155 burlywood1
-112 128 144 slategrey
-255 228 225 mistyrose
- 50 205 50 limegreen
-224 255 255 lightcyan
-218 165 32 goldenrod
-220 220 220 gainsboro
-135 206 255 skyblue1
-240 255 240 honeydew
-238 238 0 yellow2
-205 79 57 tomato3
-135 206 235 skyblue
- 85 26 139 purple4
-205 133 0 orange3
-205 183 158 bisque3
-238 213 183 bisque2
- 87 87 87 grey34
-252 252 252 gray99
-161 161 161 gray63
-112 112 112 gray44
- 94 94 94 gray37
- 84 84 84 gray33
- 66 66 66 gray26
-240 255 255 azure1
-139 137 137 snow4
-205 133 63 peru
-219 112 147 pale violet red
-139 129 76 lightgoldenrod4
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl b/src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl
deleted file mode 100644
index 34c5eaf..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl
+++ /dev/null
@@ -1,37 +0,0 @@
-use strict;
-
-$::WRITE = 1 if (defined($ARGV[0]) and $ARGV[0] eq '--write');
-$::WARN = 0;
-
-sub get_test_data
-{
- my $fn = shift;
-
- local($/);
- undef $/;
-
- open(GIF, $fn) or die "Cannot open $fn: $!\n";
- binmode(GIF);
- my $im = <GIF>;
- close (GIF);
-
- return defined($im) ? $im : "";
-}
-
-sub write_file
-{
- my $fn = shift;
- my $im = shift;
-
- local($/);
- undef $/;
-
- print "writing\n";
- open(GIF, '>' . $fn) or die "Cannot open $fn: $!\n";
- binmode(GIF);
- print GIF $im;
- close (GIF);
-}
-
-1;
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t
deleted file mode 100644
index 909ebc9..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t
+++ /dev/null
@@ -1,67 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::bars;
-use GIFgraph::area;
-use GIFgraph::linespoints;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 6, 7, -8, -2, -4, 8.5, -1, 5, 9],
- [ 4, 2, 5, -6, 3, -3.5, 3, -3, -4],
- [ -3, -7, undef, 2, -4, 8.5, 2, 5, -9],
- [ 4, 2, -5, 6, -3, -2.5, -3, -3, 4],
-);
-
-my @opts = (
- {},
- {
- 'legend_placement' => 'RT',
- 'legend' => [ qw( one two three four five six ) ],
- },
- {
- 'legend_placement' => 'BL',
- 'legend_marker_width' => 16,
- 'legend_marker_height' => 16,
- 'legend' => [ 'One is a long one', undef, "Three is here" ],
- },
- {
- 'lg_cols' => 2,
- 'marker_size' => 10,
- 'legend' => [ qw( one two three four five six ) ],
- },
-);
-
-print "1..3\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1..3)
-{
- my $fn = 't/legend' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- if ($i == 2)
- {
- foreach (@{$data[1]})
- {
- $_ *= -1;
- }
- }
-
- my $g = undef;
- if ($i == 1) { $g = new GIFgraph::bars(); }
- elsif ($i == 2) { $g = new GIFgraph::area(); }
- else { $g = new GIFgraph::linespoints(); }
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t
deleted file mode 100644
index 9795426..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t
+++ /dev/null
@@ -1,51 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::lines;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 9, 2, 5, 6, 3, 1.5, 9, 3, 4],
- [ 3, 7, 8, 2, 4, 1.5, 2, 5, 1]
-);
-
-my @opts = (
- {},
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'A line chart',
- 'y_max_value' => 11,
- 'y_min_value' => 1,
- 'y_tick_number' => 5,
- 'y_label_skip' => 2,
- 'x_ticks' => 1,
- 'axis_space' => 8,
- 'transparent' => 1,
- 'interlaced' => 1,
- 'line_types' => [3,4,1,2],
- },
-);
-
-print "1..1\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1)
-{
- my $fn = 't/lines' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- my $g = new GIFgraph::lines( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t
deleted file mode 100644
index 3228566..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t
+++ /dev/null
@@ -1,51 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::linespoints;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
- [ 3, 7, 8, 2, 4, 1.5, 2, 5, 1]
-);
-
-my @opts = (
- {},
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'A line and point chart',
- 'y_max_value' => 10,
- 'y_tick_number' => 5,
- 'y_label_skip' => 2,
- 'x_ticks' => 1,
- 'axis_space' => 8,
- 'transparent' => 1,
- 'interlaced' => 1,
- 'markers' => [ 7, 5 ],
- 'marker_size' => 8,
- },
-);
-
-print "1..1\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1)
-{
- my $fn = 't/linespoints' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- my $g = new GIFgraph::linespoints( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t
deleted file mode 100644
index 5f0fbbb..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t
+++ /dev/null
@@ -1,41 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::pie;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th"],
- [ 1, 2, 5, 6, 3, 1.5],
-);
-
-my @opts = (
- {},
- {
- 'start_angle' => 90,
- 'title' => 'A pie chart',
- 'label' => 'Just data',
- },
-);
-
-print "1..1\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1)
-{
- my $fn = 't/pie' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- my $g = new GIFgraph::pie( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/points.t b/src/contrib/whodo/GIFgraph/GIFgraph/t/points.t
deleted file mode 100644
index f63fd79..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/t/points.t
+++ /dev/null
@@ -1,58 +0,0 @@
-use lib './t';
-use strict;
-use GIFgraph::points;
-
-$::WRITE = 0;
-require 'ff.pl';
-
-my @data = (
- ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
- [ 3, 7, 8, 2, 4, 1.5, 2, 5, 1],
- [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
-);
-
-my @opts = (
- {},
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'A points chart with default markers',
- 'y_max_value' => 10,
- 'y_tick_number' => 5,
- 'y_label_skip' => 2,
- 'x_ticks' => 1,
- },
- {
- 'x_label' => 'X Label',
- 'y_label' => 'Y label',
- 'title' => 'A points chart with big markers',
- 'y_max_value' => 10,
- 'y_tick_number' => 5,
- 'y_label_skip' => 2,
- 'x_ticks' => 1,
- 'marker_size' => 16,
- 'long_ticks' => 1,
- 'markers' => [ 7, 5 ],
- },
-);
-
-print "1..2\n";
-($::WARN) && warn "\n";
-
-foreach my $i (1..2)
-{
- my $fn = 't/points' . $i . '.gif';
-
- my $checkImage = get_test_data($fn);
- my $opts = $opts[$i];
-
- my $g = new GIFgraph::points( );
- $g->set( %$opts );
- my $Image = $g->plot( \@data );
-
- print (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
- ($::WARN) && warn (($checkImage eq $Image ? "ok" : "not ok"). " $i\n");
-
- write_file($fn, $Image) if ($::WRITE);
-}
-
diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/utils.pm b/src/contrib/whodo/GIFgraph/GIFgraph/utils.pm
deleted file mode 100644
index 9b2d3d0..0000000
--- a/src/contrib/whodo/GIFgraph/GIFgraph/utils.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-#==========================================================================
-# Copyright (c) 1995-1998 Martien Verbruggen
-#--------------------------------------------------------------------------
-#
-# Name:
-# GIFgraph::utils.pm
-#
-# Description:
-# Package of general utilities.
-#
-# $Id: utils.pm,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
-#
-#==========================================================================
-
-package GIFgraph::utils;
-
-use strict qw(vars subs refs);
-
-use vars qw( @EXPORT_OK %EXPORT_TAGS );
-require Exporter;
-
-@GIFgraph::utils::ISA = qw( Exporter );
-
-@EXPORT_OK = qw( _max _min _round );
-%EXPORT_TAGS = ( all => [qw(_max _min _round)],);
-
-$GIFgraph::utils::prog_name = 'GIFgraph::utils.pm';
-$GIFgraph::utils::prog_rcs_rev = '$Revision: 1.1.1.1 $';
-$GIFgraph::utils::prog_version =
- ($GIFgraph::utils::prog_rcs_rev =~ /\s+(\d*\.\d*)/) ? $1 : "0.0";
-
-{
- sub _max {
- my ($a, $b) = @_;
- return undef if (!defined($a) and !defined($b));
- return $a if (!defined($b));
- return $b if (!defined($a));
- ( $a >= $b ) ? $a : $b;
- }
-
- sub _min {
- my ($a, $b) = @_;
- return undef if (!defined($a) and !defined($b));
- return $a if (!defined($b));
- return $b if (!defined($a));
- ( $a <= $b ) ? $a : $b;
- }
-
- sub _round {
- my($n) = shift;
- sprintf("%.0f", $n);
- }
-
- sub version {
- $GIFgraph::utils::prog_version;
- }
-
- $GIFgraph::utils::prog_name;
-
-} # End of package MVU
diff --git a/src/contrib/whodo/README b/src/contrib/whodo/README
deleted file mode 100644
index b2269a2..0000000
--- a/src/contrib/whodo/README
+++ /dev/null
@@ -1,134 +0,0 @@
-WHODO
-
-This is Whodo 1.11.
-
-Whodo is a set of Perl scripts to analyse IP accounting data from a cisco
-router. The stats for each traffic source are fed into mrtg. Whodo also
-generates pie graphs showing traffic split by source or destination.
-
-
-HOW TO
-
-1. Put the scripts in the appropriate directories. There are 3 sets of files in
-whodo.
-(i) Whodo/gifgraph contains a perl module written by Martien Verbruggen.
-I've made some changes to it so it does what I need. However I haven't
-been able to contact Martien & get them included in his distribution. GIFgraph
-is used by “pie.pl”. You'll need to copy this to wherever you put
-your Perl modules. Note that gifgraph uses another module GD.pm. GD is
-available in/for the standard Perl distribution and ActivePerl. However if
-you use Perl for Win32, you are on your own.
-(ii) Whodo/wwwscripts contains 2 CGI script. Put them wherever your CGI
-scripts live.
-(iii) Whodo/* contains everything else. I keep this stuff under
-mrtg/contrib/whodo.
-
-You'll also need the module SNMP_Session. If you don't have it, get it from
-ftp://ftp.switch.ch/software/sources/network/snmp/perl/
-
-2. Start IP accounting on the router. If you don't know what you are doing
-here, tread carefully – you can bring the router to its knees.
-
-The community string that you will supply in the next step, for the $HOST
-variable, must have READ-WRITE access to the router. COLLECT.PL clears
-the accounting list (SNMPSET) once the data is collected to not be double
-counted and surely to keep reduce the memory requirements on the router.
-To do this at the (config) prompt type : snmp-server community (your
-community name) RW. DO NOT do it to the community public, this will
-leave your router open to attack.
-
-3. You'll need to customise some constants at the start of collect.pl. You'll
-need to change $HOST & $SOURCEDIR. $LOGPATH isn't relevant until step 6
-but you should set it up now. $BIGBYTES you'll probably need to keep
-tweaking. Basically, any source that generates more than $BIGBYTES
-between polls will get its own MRTG graph for ever more. Sources that
-never generate this much traffic will be grouped together as
-“Miscellaneous”.
-
-$LOGPATH also occurs in pie.pl & makeanalyse.pl
-
-4. You'll want to create a networks file – such as the standard “networks” file
-found in C:\winnt\system32\drivers\etc or /etc/networks. Collect.pl scans the
-file including comments following a normal line of data. The file is used to map
-destination addresses to network names. Which makes the output (see step 6) much
-more user friendly.
-
-The file has a second function. If a trailing comment includes a “/” followed
-by a number, this is taken as the classless representation of the subnet mask
-size. If not, the network/subnet is assumed to be Class C.
-
-A sample networks file is included.
-
-5. Set collect.pl up to run periodically. I run it every 30 minutes with
-something like:
-
-collect.pl -a c:\perl\mrtg\contrib\whodo\sources.cfg -n \
-c:\winnt\system32\drivers\etc\networks
-mrtg c:\perl\mrtg\contrib\whodo\sources.cfg
-
-I've included a vestigial “sources.cfg”. You can use it to get you started.
-Collect.pl maintains the file automatically.
-
-You should now be getting mrtg graphs showing traffic generated by your
-traffic sources over time. Bask in it for a day.
-
-6. collect.pl generates a new log/csv file every time it runs. By now you are
-probably up to your armpits in these files. I've included a script
-(summarise.pl) that I run every night to condense the day's log files into a
-single file. It doesn't need any arguments to run. However it does include a
-constant ($LOGPATH) that you'll need to change. Try running it.
-
-7. So now you want to generate pie graphs breaking down traffic by source
-or destination? OK. You'll need to run makeanalyse.pl. It generates an
-HTML page that is used to generate the graphs. For example:
-perl c:\perl\mrtg\contrib\whodo\makeanalyse.pl >d:\www\analyse.html
-
-The page generated contains drop down lists containing the current sources
-and destinations. Since these will change over time, I run makeanalyse
-every night.
-
-8. What's that? You want a more flexible way of mapping source addresses
-to text? You'd like to group multiple addresses under the same name? You
-want to use a name other than that in DNS?
-
-OK. Create a file with two columns – the address and then name you want.
-In place of an address, you can use regular expressions. Thus the line
-“203.167.223.13[456] Exchange” maps addresses 203.167.223.134,
-203.167.223.135 and 203.167.223.136 to the name “Exchange”. Note that the
-character “.” has its literal meaning – it is not a metacharacter.
-
-If a source address does not appear in the sources file, it will be looked up
-with a normal reverse lookup. If that fails, the address is used. A sample
-sources file is included.
-
-To make use of a sources file, change the command running collect.pl to
-something like:
-collect.pl -a c:\perl\mrtg\contrib\whodo\sources.cfg -n \
-c:\winnt\system32\drivers\etc\networks-s c:\perl\mrtg\contrib\whodo\sources
-
-Mind you, if you'd had any sense you would have done this before step 5.
-
-
-VOODOO
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-See the GNU General Public License for more details.
-
-
-YOU TOO
-
-Tobi has agreed to include this set of scripts in the mrtg distribution. So, if
-you make any improvements or bug fixes, please provide them to him. But
-please be aware that he can't support the scripts himself.
-
-
-
-Tony Farr
-24/3/99
diff --git a/src/contrib/whodo/collect.pl b/src/contrib/whodo/collect.pl
deleted file mode 100644
index af8aaf4..0000000
--- a/src/contrib/whodo/collect.pl
+++ /dev/null
@@ -1,329 +0,0 @@
-# collect.pl
-#
-# Collect IP accounting data from a cisco router and summarise it
-# into a CSV file. The file shows number of bytes sent from each
-# source device to each destination network.
-# Optionally, the data is also summarised by source (all destinations added
-# together) and written out to an mrtg config file.
-# There are also two input files. "networks" is used to map network
-# addresses to names. "sources" is optional & is used to map source
-# addresses to host names.
-#
-# Args are:
-# h help
-# a path of mrtg config file for data by source
-# n path of a "networks" file used to map network addresses to names
-# o path of output CSV file. Defaults to YYYYMMDD-HHMMSS.CSV
-# s path of a "sources" file mapping source addresses to host names
-#
-# v1.0 17/9/98 Tony Farr Original
-# v1.1 16/12/98 Tony Farr Add horrid kludge to collect Exchange traffic
-# by source
-# v1.2 22/3/99 Tony Farr Tidy up
-# v1.3 25/3/99 Tony Farr Remove v1.1 kludge
-# Just generate one mrtg line/data set
-#
-
-use SNMP_util;
-use Getopt::Std;
-use File::Basename;
-use strict;
-use Socket;
-
-use vars qw/$opt_h $opt_a $opt_n $opt_o $opt_s/;
-
-# CONSTANTS
-# Note inclusion of the write community string
-my $HOST= '0ztrad3@canb-wan';
-# Directory for output logs/csv files.
-my $LOGPATH= "D:\\logs\\whodo\\";
-# Directory for MRTG config files for traffic sources
-my $SOURCEDIR= "D:\\www\\mrtg\\whodo";
-# Any source generating more than BIGBYTES per poll will be added to the sources config file automatically
-my $BIGBYTES= 40000000;
-
-my(@dstdesc, @dstaddr, @dstmask, @srcaddr, @srcdesc, %traffictab);
-my $progname = basename($0);
-my $usage = "Usage: $progname [-h] [-a mrtg_config_file] [-n network_file] [-o output_file] [-s source_address_file]\n";
-# Parse Command Line:
-die $usage unless getopts('ha:n:o:s:');
-if ( defined($opt_h) ) {
- print $usage;
- exit(0);
-}
-if ( defined($opt_n) ) {
- load_nets($opt_n);
-}
-unless ( defined($opt_o) ) {
- my ($sec,$min,$hour,$mday,$month,$year) = localtime;
- $opt_o= $LOGPATH . sprintf("%d%02d%02d-%02d%02d%02d.csv", $year+1900,++$month,$mday,$hour,$min,$sec);
-}
-if ( defined($opt_s) ) {
- load_sources($opt_s);
-}
-my $age= checkpoint_stats($HOST);
-get_stats($HOST);
-print_stats($opt_o);
-if ( defined($opt_a) ) {
- make_sources_config($opt_a);
-}
-exit(0);
-
-
-
-sub load_nets {
-# Loads 3 arrays:
-# @dstaddr - a list of IP addresses
-# @dstdesc - a list of the corresponding descriptions
-# @dstmask - a list of the corresponding bitmasks
-# The tables are loaded from a list of filenames passed in @_. That file
-# can be a networks file. The file(s) should have format:
-# netdescription 10.10.10 /25
-# The "/25" is the mask & may be preceeded by a "#". It is optional.
- my(@flist)= @_;
- my ($desc, $end, $masksz);
- while (my $fname= shift(@flist)) {
- open(NETWORKS, "<$fname") || warn "$progname: unable to open $fname; $!";
- while (<NETWORKS>) {
- # Process #includes after dealing with the current file
- if ( /^#\s*include\s+(\S+)/ ) {
- push(@flist, $1);
- next;
- }
- if ( /^\s*(\w+)\s+(\S+)(.*)/ ) {
- $desc= $1;
- $_= $2;
- $end= $3;
- push(@dstdesc, $desc);
- my $octets = 1 + tr/././;
- $_ .= ".0" x (4 - $octets);
- push( @dstaddr, aton($_) );
- if ( $end =~ /\/(\d+)/ ) {
- $masksz= $1;
- } else {
- $masksz= $octets * 8;
- }
- push( @dstmask, pack("B32", "1" x $masksz . "0" x 32) );
- }
- }
- close(NETWORKS);
- }
-}
-
-
-
-sub load_sources {
-# Loads a pair of arrays: @srcaddr (a list of IP addresses) and @srcdesc
-# (a list of the corresponding descriptions). The files are loaded from
-# a list of filenames passed in @_. That file can be a hosts file. However "address" entries
-# can be perl regular exprs as well literal addresses. For compatibility,
-# "." when used as a wild card must be expressed "\." - i.e. the reverse of normal.
- my(@flist)= @_;
- while (my $fname= shift(@flist)) {
- open(HOSTS, "<$fname") || warn "$progname: unable to open $fname; $!";
- while (<HOSTS>) {
- # Process #includes after dealing with the current file
- if ( /^#\s*include\s+(\S+)/ ) {
- push(@flist, $1);
- next;
- }
- ($_)= split(/#/);
- if ( /(\S+)\s+(\S+)/ ) {
- push(@srcdesc, $2);
- $_= $1;
- s/\./\\\./g; # Replace "." with "\."
- s/\\\\\././g; # If we now have "\\.", replace with "."
- push(@srcaddr, $_);
- }
- }
- close(HOSTS);
- }
-}
-
-
-
-sub checkpoint_stats {
-# Take a checkpoint on IP accounting on the given router & return the duration of it.
-# The checkpoint is done by doing a get then a set on actCheckPoint
- my ($age);
-
- # Find how long since the last checkpoint
- ($age) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.8.0');
- warn "$progname: No actAge returned.\n" unless $age;
-
- # Check to see if we've lost any data
- ($_) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.6.0');
- warn "$progname: Accounting table overflow - $_ bytes lost.\n" if $_ > 0;
-
- # Do a new checkpoint
- ($_) = snmpget ($_[0], '1.3.6.1.4.1.9.2.4.11.0');
- die "$progname: No actCheckPoint returned.\n" unless defined;
- snmpset ($_[0], '1.3.6.1.4.1.9.2.4.11.0', 'integer', $_);
- $age;
-}
-
-
-
-sub get_stats {
-# Summarise the checkpoint by destination network (not host).
-# Summary is placed into %traffictab - a hash of hashes indexed by
-# source device & destination network.
- my($src, $dstnet);
- my @response = snmpwalk ($_[0], '1.3.6.1.4.1.9.2.4.9.1.4' );
- foreach $_ (@response) {
- /(\d+\.\d+\.\d+\.\d+)\.(\d+\.\d+\.\d+\.\d+):(\d+)/ ||
- die "$progname: Cannot parse response from walk.\n";
- $dstnet= addr_to_net($2);
- $src= addr_to_src($1);
- $traffictab{$src}{$dstnet} += $3;
- }
-}
-
-
-
-sub print_stats {
-# Print out the traffictab in csv format
- my ($sec,$min,$hour,$mday,$month,$year) = localtime(time());
- $year += 1900;
- $month++;
- open (CSVFILE,">$_[0]") || die "$progname: Could not open file $_[0]; $!\n";
- printf CSVFILE "End Time:,%d/%02d/%d %d:%02d:%02d\n",$mday,$month,$year,$hour,$min,$sec;
- print CSVFILE "Duration:,$age\n"; # Bug alert. This breaks if $age > 1 day
- my($s, $d);
- foreach $s (sort keys %traffictab) {
- foreach $d (sort keys %{$traffictab{$s}}) {
- print CSVFILE "$s,$d,$traffictab{$s}{$d}\n";
- }
- }
- close(CSVFILE);
-}
-
-
-
-sub make_sources_config {
-# Print out an mrtg config file
- my($cfgfile)= @_;
- my(%cfgentries, $src, $dst, $t, $misc);
- # Load current cfg entries
- if ( open(CFG, "<$cfgfile") ) {
- while (<CFG>) {
- if ( /^\s*Target\[([^\]]*)/ && $1 ne "Miscellaneous" ) {
- $cfgentries{ uc($1) }= 1;
- }
- }
- close(CFG);
- }
- # Write out the header of a new config file
- open(CFG,">$cfgfile") || die "$progname: Could not open file $cfgfile; $!\n";
- write_sources_header();
- # For each traffictab entry, if it's large or there's an existing CFG entry, write out a new CFG entry
- foreach $src (keys %traffictab) {
- $t= 0;
- foreach $dst (keys %{$traffictab{$src}}) {
- $t += $traffictab{$src}{$dst};
- }
- if ( $cfgentries{ uc($src) } ) {
- delete $cfgentries{ uc($src) };
- write_source_entry($src, $t);
- } elsif ( $t > $BIGBYTES ) {
- write_source_entry($src, $t);
- } else {
- $misc += $t;
- }
- }
- # Write out new entries for any CFG entries that existed previously but we've
- # missed because they generated no traffic this time.
- foreach $src (keys %cfgentries) {
- write_source_entry($src, 0);
- }
- # Write an entry for the miscellaneous odds & ends
- write_source_entry("Miscellaneous", $misc);
- close(CFG);
-}
-
-
-
-sub write_sources_header {
- print CFG <<END_OF_HEADER;
-WorkDir: $SOURCEDIR
-IconDir: /mrtg/
-Interval: 30
-
-END_OF_HEADER
-}
-
-
-
-sub write_source_entry {
- print CFG <<END_OF_ENTRY;
-
-Title[$_[0]]: Traffic from $_[0]
-PageTop[$_[0]]: <H1>Traffic from $_[0]</H1>
-MaxBytes[$_[0]]: 12500000
-Options[$_[0]]: growright, bits, absolute, nopercent
-Colours[$_[0]]: w#ffffff,blue#0000e0,w#ffffff,r#ff0000
-Target[$_[0]]: `perl -e "print \\"0\\n$_[1]\\""`
-YLegend[$_[0]]: Bits per Second
-ShortLegend[$_[0]]: bps
-Legend1[$_[0]]:
-Legend2[$_[0]]: Traffic from $_[0]
-LegendI[$_[0]]:
-LegendO[$_[0]]: &nbsp;Traffic:
-
-END_OF_ENTRY
-}
-
-
-
-sub addr_to_net {
-# Returns the name/description of the network of the given address.
-# Addresses are looked up in @dstaddr first. If that fails, the address is returned.
- my($i, $dst);
- $dst= aton($_[0]);
- for ($i=0; $i < @dstaddr; $i++) {
- if ( ($dst & $dstmask[$i]) eq $dstaddr[$i] ) {
- return $dstdesc[$i];
- }
- }
- $_[0] =~ /(.*)\..*/; # Assume Class C & strip off the last octet
- $1;
-}
-
-
-
-sub BEGIN {
- my ($lastaddr, $lastsrc);
-sub addr_to_src {
-# Returns the name/description of the given address.
-# Addresses are looked up in @srcaddr first. If there's no match, a dns lookup is tried.
-# If that fails, the address is returned.
- if ( $_[0] eq $lastaddr ) {
- return $lastsrc;
- } else {
- $lastaddr= $_[0];
- for (my $i=0; $i < @srcaddr; $i++) {
- if ($_[0] =~ /^$srcaddr[$i]$/ ) {
- $lastsrc= $srcdesc[$i];
- return $lastsrc;
- }
- }
- my $addr= aton($_[0]);
- if ($lastsrc= gethostbyaddr($addr, AF_INET)) {
- $lastsrc =~ s/\.austrade\.gov\.au$//i;
- } else {
- $lastsrc= $_[0];
- }
- return $lastsrc;
- }
-}
-}
-
-
-
-sub aton {
-# I found the standard "inet_aton" very slow (on Windows).
-# Hence this version. It only handles dotted decimal addresses -
-# not names.
- $_[0] =~ /(\d+).(\d+).(\d+).(\d+)/;
- chr($1).chr($2).chr($3).chr($4);
-} \ No newline at end of file
diff --git a/src/contrib/whodo/makeanalyse.pl b/src/contrib/whodo/makeanalyse.pl
deleted file mode 100644
index 6c71682..0000000
--- a/src/contrib/whodo/makeanalyse.pl
+++ /dev/null
@@ -1,100 +0,0 @@
-# makeanalyse.pl
-#
-# Generate an HTML page containing a list of networks and a list of traffic
-# sources. This page invokes the CGI script analyse.pl. The page is written to
-# STDOUT.
-#
-# Modification History
-######################
-# 23 Dec 98 Tony Farr Original coding
-##############################################################################
-
-use strict;
-
-my(@sources, @dests); # Globals
-my $LOGPATH= "D:\\logs\\whodo\\"; # Directory where csv/logs are stored.
-
-get_sources_and_dests();
-write_html();
-exit(0);
-
-
-
-sub get_sources_and_dests {
-# Initialises @sources & @dests with yesterday's traffic sources and destinations
- my(%srchash, %dsthash, $src, $dst);
- my $fname= get_input_file();
- open(LOG,"<$fname") || die "$0: unable to open input file $fname; $!";
-
- # First 2 lines are headers
- <LOG> || die "$0: $fname is empty\n";
- <LOG> || die "$0: $fname lacks second header line\n";
- # The rest of the file has traffic for particular sources & destinations
- while (<LOG>) {
- ($src, $dst)= split/,/;
- $srchash{$src}= 1;
- $dsthash{$dst}= 1;
- }
- close(LOG);
- # Transfer them from the hashes to the arrays
- @sources= sort( keys(%srchash) );
- @dests= sort( keys(%dsthash) );
-}
-
-
-
-sub get_input_file {
-# Returns the file name of yesterday's whodo log
- my $t = time() - 24*60*60;
- my ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $LOGPATH . sprintf("%d%02d%02d.csv",$year+1900,$mon+1,$mday);
-}
-
-
-
-sub write_html {
-
- print <<HEAD;
-<HTML><head><title>Analyse traffic sources or destinations</title></head>
-<BODY><H1>Analyse traffic sources or destinations</H1><HR>
-<FORM METHOD="POST" ACTION="../scripts/analyse.pl">
-<P>Show sources sending traffic to:
-<SELECT NAME="dest"><OPTION></OPTION>
-HEAD
-
- foreach my $dst (@dests) {
- print "<OPTION>$dst</OPTION>\n";
- }
-
- print <<MIDDLE;
-</SELECT>(Leave blank to include all destinations.)</P>
-<P>During last:
-<INPUT TYPE="radio" NAME="src_duration" VALUE="30 minutes" checked>30 minutes
-<INPUT TYPE="radio" NAME="src_duration" VALUE="day">day
-<INPUT TYPE="radio" NAME="src_duration" VALUE="week">week
-<INPUT TYPE="radio" NAME="src_duration" VALUE="month">month</P>
-<P>Summarise minor sources: <INPUT TYPE="checkbox" NAME="summarise" checked></P>
-<INPUT TYPE="Submit" NAME="submit" VALUE="Get sources">
-</FORM><H3>OR</H3><FORM METHOD="POST" ACTION="../scripts/analyse.pl">
-<P>Show destinations receiving traffic from:
-<SELECT NAME="src"><OPTION></OPTION>
-MIDDLE
-
- foreach my $src (@sources) {
- print "<OPTION>$src</OPTION>\n";
- }
-
- print <<TAIL;
-</SELECT>(Leave blank to include all sources.)</P>
-<P>During last:
-<INPUT TYPE="radio" NAME="dest_duration" VALUE="30 minutes" checked>30 minutes
-<INPUT TYPE="radio" NAME="dest_duration" VALUE="day">day
-<INPUT TYPE="radio" NAME="dest_duration" VALUE="week">week
-<INPUT TYPE="radio" NAME="dest_duration" VALUE="month">month</P>
-<P>Summarise minor destinations: <INPUT TYPE="checkbox" NAME="summarise" checked></P>
-<INPUT TYPE="Submit" NAME="submit" VALUE="Get destinations">
-</FORM><HR>
-</BODY></HTML>
-TAIL
-
-} \ No newline at end of file
diff --git a/src/contrib/whodo/networks b/src/contrib/whodo/networks
deleted file mode 100644
index 2371dfa..0000000
--- a/src/contrib/whodo/networks
+++ /dev/null
@@ -1,24 +0,0 @@
-# Networks
-#
-loopback 127
-Sydney 203.167.218 # /23
-Melbourne 203.167.220
-Perth 203.167.221 # /25
-Brisbane 203.167.222 # /26
-CbrExportOffice 203.167.223.192 # /28
-SAP 194.39.139
-Almaty 172.20.197
-Ankara 172.20.81
-Auckland 172.20.53
-Bangkok 172.20.225
-Beijing 172.20.88
-Brunei 172.20.56
-Budapest 172.20.104.64 # /26
-Buenos_Aires 172.20.209
-Cairo 172.20.29
-Dubai 172.20.16.128 # /25
-Guangzhou 172.20.201
-DfatInternal 172.16 # /14
-DfatInternal 172.21
-DfatInternal 172.22 # /15
-NetworkLinks 192.168 \ No newline at end of file
diff --git a/src/contrib/whodo/sources b/src/contrib/whodo/sources
deleted file mode 100644
index 7026931..0000000
--- a/src/contrib/whodo/sources
+++ /dev/null
@@ -1,5 +0,0 @@
-203.167.223.13[456] Exchange
-203.167.216.32 Exchange
-203.167.216.(25|48|5[56]|199) PlOps_Monitoring
-172 DFAT_Addresses
-192.168.[23][0-9] Test_Nets
diff --git a/src/contrib/whodo/sources.cfg b/src/contrib/whodo/sources.cfg
deleted file mode 100644
index 335f2ce..0000000
--- a/src/contrib/whodo/sources.cfg
+++ /dev/null
@@ -1,18 +0,0 @@
-WorkDir: D:\www\mrtg\whodo
-IconDir: /mrtg/
-Interval: 30
-
-
-Title[Miscellaneous]: Traffic from Miscellaneous
-PageTop[Miscellaneous]: <H1>Traffic from Miscellaneous</H1>
-MaxBytes[Miscellaneous]: 12500000
-Options[Miscellaneous]: growright, bits, absolute, nopercent
-Colours[Miscellaneous]: w#ffffff,blue#0000e0,w#ffffff,r#ff0000
-Target[Miscellaneous]: `perl -e "print \"0\n27945056\""`
-YLegend[Miscellaneous]: Bits per Second
-ShortLegend[Miscellaneous]: bps
-Legend1[Miscellaneous]:
-Legend2[Miscellaneous]: Traffic from Miscellaneous
-LegendI[Miscellaneous]:
-LegendO[Miscellaneous]: &nbsp;Traffic:
-
diff --git a/src/contrib/whodo/summarise.pl b/src/contrib/whodo/summarise.pl
deleted file mode 100644
index bb6bac6..0000000
--- a/src/contrib/whodo/summarise.pl
+++ /dev/null
@@ -1,102 +0,0 @@
-# summarise.pl
-#
-# Summarise some whodo log/csv files into a single file. The old files
-# are then deleted.
-#
-# Args are:
-# i path of input log/CSV files. If no arg is given, this defaults to
-# yesterday's files.
-# o path of output CSV file. If no arg is given, this defaults to
-# YYYYMMDD.csv where the date is the latest date in the input data.
-#
-# v1.0 11/11/98 Tony Farr
-#
-use Getopt::Std;
-use File::Basename;
-use strict;
-use vars qw/ $opt_i $opt_o /;
-
-# Directory for output logs/csv files.
-my $LOGPATH= "D:\\logs\\whodo\\";
-
-my $progname = basename($0);
-my $usage= "Usage: $progname -i input_path -o output_file\n";
-getopts('i:o:') || die $usage;
-my @flist= get_input_files($opt_i);
-if ( scalar(@flist) < 1 ) {
- die "$progname: No files to process!";
-}
-my ($trafficref, $endtime, $duration)= get_traffic(@flist);
-if (! $opt_o) {
- ($_)= split(/ /, $endtime);
- my ($d,$m,$y) = split/\//;
- $opt_o= dirname($flist[0]) . "\\" . sprintf "%d%02d%02d.csv",$y,$m,$d;
-}
-print_stats($trafficref, $endtime, $duration, $opt_o);
-unlink @flist;
-exit 0;
-
-
-
-sub get_input_files {
-# Returns a list of input files to be processed
- my($path)= @_;
- if (! $path) {
- my $t = time() - 24*60*60;
- my ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $path= $LOGPATH . sprintf("%d%02d%02d-*.csv",$year+1900,$mon+1,$mday);
- }
- glob($path);
-}
-
-
-
-sub get_traffic {
-# Read the log files (specified in @_) & summarise into a hash
- my($fname, $lastf, $lasttime, $hr, $min, $sec, $duration, $src, $dst, $bytes, %traffic);
- foreach $fname (@_) {
- open(CSV, "< $fname") || warn "$progname: unable to open $fname; $!";
- # First line is a header giving end time
- $_= <CSV> || warn "$progname: $fname is empty\n";
- chomp;
- $_= (split/,/)[1];
- if ($fname gt $lastf) {
- $lastf= $fname;
- $lasttime= $_;
- }
- # Second line is a header giving period covered by this log
- $_= <CSV> || die "$progname: $fname lacks second header line\n";
- chomp;
- $_= (split/,/)[1];
- ($hr, $min, $sec)= split/:/;
- $duration += $sec + 60 * ($min + 60*$hr);
- # The rest of the file has traffic for particular sources & destinations
- while (<CSV>) {
- ($src, $dst, $bytes)= split/,/;
- $traffic{$src}{$dst} += $bytes;
- }
- close(CSV);
- }
- return(\%traffic, $lasttime, $duration);
-}
-
-
-
-sub print_stats {
-# Print out the traffictab in csv format
- use integer;
- my ($trafficref, $endtime, $duration, $fname)= @_;
- open (CSVFILE,">$fname") || die "$progname: Could not open file $fname; $!\n";
- print CSVFILE "End Time:,$endtime\n";
- my $sec= $duration % 60;
- $_= ($duration - $sec) / 60;
- my $min= $_ % 60;
- my $hr= ($_ - $min) / 60;
- print CSVFILE "Duration:,$hr:$min:$sec\n";
- foreach my $s (sort keys %$trafficref) {
- foreach my $d (sort keys %{$$trafficref{$s}}) {
- print CSVFILE "$s,$d,$$trafficref{$s}{$d}\n";
- }
- }
- close(CSVFILE);
-}
diff --git a/src/contrib/whodo/wwwscripts/analyse.pl b/src/contrib/whodo/wwwscripts/analyse.pl
deleted file mode 100644
index 50aa267..0000000
--- a/src/contrib/whodo/wwwscripts/analyse.pl
+++ /dev/null
@@ -1,43 +0,0 @@
-# analyse.pl
-#
-# CGI script to generate an HTML page showing WAN traffic broken down by source
-# or destination. Most of the work is done by another script "pie.pl".
-# This script is invoked by http://netmanager/whodo/analyse.html
-#
-# Modification History
-######################
-# 17 Nov 98 Tony Farr Original coding
-##############################################################################
-
-use strict;
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-
-my $q = new CGI;
-
-my $title= "WAN Traffic by ".( defined($q->param('src')) ? "Destination" : "Source" );
-print $q->header,
- $q->start_html($title),
- $q->h1($title),
- $q->hr;
-
-my $gifurl= $q->url(-query=>1);
-$gifurl =~ s/analyse\.pl/pie.pl/i; # pie.pl uses same path & arguments
-print $q->img({-src=>$gifurl, -align=>'CENTER', -alt=>'Generating pie graph...'});
-
-print $q->hr,
- $q->small,
- $q->ul(
- $q->li("This page was produced at ".localtime(time)." (aest)." ),
- $q->li( $q->param("src") ?
- "Only sources matching the expression \"".$q->param("src")."\" have been included."
- :
- $q->param("dest") ?
- "Only destinations matching the expression \"".$q->param("dest")."\" have been included."
- :
- "All WAN traffic is included."
- )
- );
-
-print $q->end_html;
-exit 0;
diff --git a/src/contrib/whodo/wwwscripts/pie.pl b/src/contrib/whodo/wwwscripts/pie.pl
deleted file mode 100644
index d16bd12..0000000
--- a/src/contrib/whodo/wwwscripts/pie.pl
+++ /dev/null
@@ -1,164 +0,0 @@
-# pie.pl
-#
-# CGI script to generate a pie graph (GIF) showing WAN traffic broken down by
-# source or destination.
-# This script is currently invoked via CGI by analyse.pl
-#
-# Modification History
-######################
-# v1.0 Oct 98 Tony Farr Original coding
-# v2.0 17 Nov 98 Tony Farr Change to CGI script. Split out analyse as separate script.
-# v2.1 23/12/98 Tony Farr Add description of period to top of graph
-##############################################################################
-
-use strict;
-use File::Basename;
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use GIFgraph::pie;
-use GD;
-
-my ($period, $field, $str, $summarise);
-
-my $LOGPATH= "D:\\logs\\whodo"; # Directory where csv/logs are stored.
-
-my $q = new CGI;
-
-if ($q->param('src_duration')) { # Show sources
- $period= $q->param('src_duration');
- $str= $q->param('dest');
- $field= 1;
-} else { # Show destinations
- $period= $q->param('dest_duration');
- $str= $q->param('src');
- $field= 2;
-}
-
-$summarise= $q->param('summarise');
-my ($end, @flist)= get_input_files($period, $LOGPATH);
-
-my $trafficref= get_traffic($str, $summarise, $field, @flist);
-print $q->header('image/gif');
-make_graph($period, $end, $trafficref, "-");
-exit 0;
-
-
-
-sub get_input_files {
-# Returns a list of input files to be processed
- my($period, $path)= @_;
- my(@retvals, $fname, $lastfname, $start, $end);
- if ($period ne "30 minutes") {
- my($t,$mday,$mon,$year,$wday);
- $t= time();
- if ($period eq "day") {
- $t -= 24*60*60;
- ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $end= $start= sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
- } elsif ($period eq "week") {
- $wday = (localtime($t))[6];
- $t -= ($wday+1)*24*60*60;
- ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $end= sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
- $t -= 6*24*60*60;
- ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $start= sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
- } elsif ($period eq "month") {
- $mday = (localtime($t))[3];
- $t -= $mday*24*60*60;
- ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $end= sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
- $t -= (days_in_month($mon,$year+1900) - 1) * 24 * 60 * 60;
- ($mday,$mon,$year) = ( localtime($t) )[3..5];
- $start= sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
- } else {
- die "$0: Logic error; $!";
- }
- }
- while ( $fname = glob("$path/*.csv") ) {
- if ($period eq "30 minutes") {
- if ($fname gt $retvals[0]) {
- $retvals[0]= $fname;
- $lastfname= basename($fname);
- }
- } else {
- my $datepart= substr( basename($fname), 0, 8 );
- if ($datepart ge $start && $datepart le $end) {
- push(@retvals, $fname);
- if ($datepart gt $lastfname) {
- $lastfname= $datepart;
- }
- }
- }
- }
- if (length($lastfname) > 8) {
- $lastfname =~ s|^(\d\d\d\d)(\d\d)(\d\d)-(\d\d)(\d\d).*|$4:$5 on $3/$2/$1|;
- } else {
- $lastfname =~ s|^(\d\d\d\d)(\d\d)(\d\d).*|$3/$2/$1|;
- }
- ($lastfname, @retvals);
-}
-
-
-
-sub days_in_month {
- (31, $_[1] % 4 ? 28 : 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)[${_[0]}];
-}
-
-
-
-sub get_traffic {
-# Read the log files (specified in @flist) & summarise into a hash
- my($s, $summarise, $field, @flist)= @_;
- my($fname, $src, $dst, $bytes, $key, %traffic, $sum);
- foreach $fname (@flist) {
- open(CSV, "< $fname") || warn "$0: unable to open $fname; $!";
- <CSV>; # Logs start with a couple of header lines
- <CSV>;
- while (<CSV>) {
- ($src, $dst, $bytes)= split(/,/, $_);
- if ( $field == 1 ? $dst =~ $s : $src =~ $s ) {
- $key= ($field == 1) ? $src : $dst ;
- $traffic{$key} += $bytes;
- $sum+= $bytes;
- }
- }
- close(CSV);
- }
- if ( $summarise ) {
- my $significant= $sum * .025;
- foreach $s (keys %traffic) {
- if ( $traffic{$s} < $significant ) {
- $traffic{"Miscellaneous"} += $traffic{$s};
- delete $traffic{$s};
- }
- }
- }
- return \%traffic;
-}
-
-
-
-sub make_graph {
-# Take a (reference to a) hash containing traffic stats & create a pie chart
- my($period, $end, $dataref, $fname)= @_;
-
- my @sources= sort( {uc($a) cmp uc($b)} keys(%$dataref) );
- my @traffic= map($$dataref{$_},@sources);
-
- my ($t, $sum);
- foreach $t (@traffic) {
- $sum+= $t;
- }
- for (my $i = 0; $i <= $#sources; $i++) {
- $t= int(100*$traffic[$i]/$sum + .5);
- $sources[$i]= $i+1 . ". $sources[$i] ($t%)";
- }
-
- my $my_graph = new GIFgraph::pie(500, 510 + $#sources*11);
- $my_graph->set( 'start_angle' => 180, '3d' => 0, 'title' => "For the $period ending $end" );
- $my_graph->set_text_clr("black");
- $my_graph->set_legend(@sources);
- $my_graph->set_legend_font(gdSmallFont);
- $my_graph->plot_to_gif( $fname, [[1..$#sources+1], \@traffic] );
-}
diff --git a/src/contrib/xlsummary/ReadMe.txt b/src/contrib/xlsummary/ReadMe.txt
deleted file mode 100644
index 0a2734b..0000000
--- a/src/contrib/xlsummary/ReadMe.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Date: Wed, 17 Feb 1999 18:47:20 +1100
-From: "Tony-Farr (Canberra)" <Tony.Farr@austrade.gov.au>
-
-This script extracts summary figures from the MRTG log files. In particular
-it summarises all sites (i.e. as many as will fit on a page) into a single
-Excel chart.
-
-The summary is placed in an Excel spreadsheet & chart. The Excel worksheet
-will have the same name as this program & be placed in the MRTG log file
-directory.
-
-I wrote this to summarise ping round trip times as generated by
-"mrtg-ping-probe". However it will process any mrtg log file. Some formatting
-type stuff would need to be changed though if it were to be used for things
-other than ping response times.
-
-If, like us, you use PWS/IIS & IE, you can just link to the spreadsheet and
-read it with IE.
-
-A trap for novices:
-If you have problems running Excel from "at", it's probably because of a
-bug/limitation in "at". The problem is that regardless of which user submits
-the job, it gets executed by the "system" user. (Great security, huh?) However
-Excel probably isn't installed for the user "system". I changed the schedule
-service to run as me rather than "system".
-
-Args are:
- h help
- d,w,m do stats for last day, week or month
- f directory containing mrtg log files
-
-For example, once a week I run a CMD file that includes:
-
-perl c:\perl\mrtg\contrib\xlsummary\xlsummary.pl -w -f d:\www\mrtg\ping
-del d:\www\mrtg\ping\weeksummary.xls
-ren d:\www\mrtg\ping\xlsummary.xls weeksummary.xls
-
-
-Feel free to contact me regarding bugs.
-Tony.Farr@austrade.gov.au
diff --git a/src/contrib/xlsummary/xlsummary.pl b/src/contrib/xlsummary/xlsummary.pl
deleted file mode 100644
index c7de437..0000000
--- a/src/contrib/xlsummary/xlsummary.pl
+++ /dev/null
@@ -1,159 +0,0 @@
-# xlsummary.pl
-#
-# Extract summary figures from the MRTG log files. In particular it summarises
-# all sites (i.e. as many as will fit on a page) into a single Excel chart.
-#
-# Args are:
-# h help
-# d,w,m do stats for last day, week or month
-# f directory containing mrtg log files
-#
-# v1.1 17/2/99 Tony Farr
-#
-
-use Getopt::Std;
-use File::Basename;
-use strict;
-
-my $progname = basename($0);
-my $usage = "Usage: $progname [-h] [-dwm] [-f path_of_logs]\n";
-
-use vars qw/$opt_h $opt_d $opt_w $opt_m $opt_f/;
-getopts('hdwmf:') || die $usage;
-if ( defined($opt_h) ) {
- print $usage;
- exit(0);
-}
-if ( $opt_d + $opt_w + $opt_m != 1) {
- die $usage;
-}
-if ( $opt_f ) {
- chdir $opt_f || die "$progname: Unable to chdir to $opt_f; $!";
-}
-
-my ($start, $end) = &get_duration;
-my $fin= $ENV{"TMP"}."\\$$.csv";
-write_csv($start, $end, $fin);
-my $fout = "$opt_f\\" . basename($progname,".pl") . ".xls";
-graph_csv($start, $end, $fin, $fout);
-unlink($fin);
-
-exit(0);
-
-
-
-sub write_csv {
- my ($start, $end, $fname)= @_;
- # Process all the log files
- open(CSV, ">$fname");
- print CSV "Site, Maximum, Minimum, Halfway\n";
- foreach my $fname (sort glob("*.log")) {
- my ($t, $lastt, $sumt, $deltat, $max, $lastmax, $summax, $min, $lastmin, $summin);
- open(LOG, "<$fname") || die "$progname: Unable to open $fname; $!";
- <LOG>; # Skip the header line
- while (<LOG>) {
- chomp;
- ($t, $max, $min)= split/ /;
- if ($t < $start) { last }; # Log has latest first
- if ($t <= $end) {
- if ($lastmax) { # Zeroes mean the link was down.
- $deltat= $lastt - $t;
- $sumt += $deltat;
- $summax += $lastmax * $deltat;
- $summin += $lastmin * $deltat;
- }
- ($lastt, $lastmax, $lastmin)= ($t, $max, $min);
- }
- }
- # This is site specific. The devices we ping have names like SSSS-rtr
- # or SSSS-lan where SSSS is the site name. This strips off the "-rtr"
- # or "-lan" suffix.
- my $target= ucfirst( basename($fname, "-lan\.log", "-rtr\.log", "\.log") );
- if ($sumt) {
- print CSV "$target, ". ($summax/$sumt) .", ". ($summin/$sumt) .", ". (($summax+$summin)/(2*$sumt)) ."\n";
- }
- close(LOG);
- }
- close(CSV);
-}
-
-
-
-sub get_duration {
-# Returns the starttime & endtime to be reported on
- my($starttime, $endtime);
- my $t= time;
- my ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime($t);
- if ($opt_d) {
- $endtime= $t - ($sec + 60*$min + 60*60*$hour);
- $starttime= $endtime - 24*60*60;
- } elsif ($opt_w) {
- $endtime= $t - ($sec + 60*$min + 60*60*$hour + 24*60*60*$wday);
- $starttime= $endtime - 7*24*60*60;
- } else { # opt_m
- $endtime= $t - ($sec + 60*$min + 60*60*$hour + 24*60*60*($mday-1));
- $starttime= $endtime - days_in_month($mon - 1, $year)*24*60*60;
- }
- ($starttime, $endtime);
-}
-
-
-
-sub days_in_month {
- (31, $_[1] % 4 ? 28 : 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)[${_[0]}];
-}
-
-
-
-sub graph_csv {
- use Win32::OLE::Const 'Microsoft Excel';
- use Win32::OLE::Const 'Microsoft Office';
- use POSIX;
-
- my ($start, $end, $fin, $fout)= @_;
-
- # use existing instance if Excel is already running
- my $xl;
- eval {$xl = Win32::OLE->GetActiveObject('Excel.Application')};
- die "$progname: Excel not installed" if $@;
- unless (defined $xl) {
- $xl = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;})
- || die "$progname: Cannot start Excel; $!";
- }
- # open the CSV
- my $book = $xl->Workbooks->Open($fin);
-
- # Sort data into descending order
- my $sheet = $book->Worksheets(1);
- my $a1 = $sheet->Cells(1, 1);
- my $range = $sheet->Range($a1, $a1->End(xlDown)->End(xlToRight));
- $range->Sort( {Key1 => $sheet->Range("D2"), Order1 => xlDescending} );
-
- # Put data into a chart. The most that can be sensibly squeezed in
- # is 52 sites. So select the slowest.
- $sheet->Range($a1, $sheet->Cells(53, 4))->Select;
- $book->Charts->Add;
- # And format it.
- my $chart= $book->ActiveChart;
- $chart->{'ChartType'} = xlStockHLC;
- $chart->{'HasLegend'} = msoFalse;
- $chart->{'HasTitle'} = msoTrue;
- # The description here fits ping response times.
- $chart->ChartTitle->Characters->{'Text'} =
- "Typical Maximum & Minimum Round Trip Times (msecs) between ".
- localtime($start) ." and ". localtime($end);
- $chart->PlotArea->Interior->{'ColorIndex'} = xlNone;
- $chart->ChartGroups(1)->HiLoLines->Border->{'Weight'} = xlMedium;
- $chart->PageSetup->{'LeftMargin'} = 5;
- $chart->PageSetup->{'RightMargin'} = 5;
- $chart->PageSetup->{'TopMargin'} = 5;
- $chart->PageSetup->{'BottomMargin'} = 10;
- $chart->PageSetup->{'Orientation'} = xlLandscape;
- $chart->Axes(xlCategory)->TickLabels->Font->{'Size'} = 8;
- $chart->Axes(xlValue)->TickLabels->Font->{'Size'} = 8;
-
- # save and exit
- $book->SaveAs($fout, xlWorkbookNormal);
- $book->Close;
- undef $xl;
-} \ No newline at end of file