WanStat.pl

 Txt log analyzer for WanStat.nlm
 Author : Michael V. Petrushin (petm@rarus.ru)
 You can download WanStat.nlm from http://www.officenet.hu/


Before using this program you must continuously run wanstat.nlm on you server.
Wanstat.nlm will generate txt logs contained interface tx/rx statistic.
Add "load wanstat.nlm N txt" into your servers autoexec.ncf file and some 
time later after reloading you can view traffic statistic on interface N
as txt by using any txt viewer and as graphic by using this script/program.

To use this program as SCRIPT on Netware, put this file in perlroot directory.
By default in Netware Enterprise Server perlroot="/novonyx/suitespot/docs/lcgi/perl/"
Change $servername and $wanlink parameters and run it from client browser,
for example: http://you_server/perl/wanstat.pl?last=1
By default script show "by hour", "today" statistic.

If you use this program as console PROGRAM on Netware, put this file in 
/perl/scripts directory and change $servername, $wanlink and $outfile parameters.
After than you can run perl program from comand line or cron, for example:
"perl wanstat.pl all=1 --noscreen"
To run as program (not as www script) you MUST enter command line parameters.
While executing html file with name defined in $outfile variable will be 
generated, and you can see this file using any browser.
Available parameters (you can type it and in URL after symbol ?):
 from=yyyymmdd - from data (ex. 20000302 - is 1 march 2000);
 to=yyyymmdd   - to data (similar format)
                 if you enter "FROM" and doesn't enter "TO",
                 statistic will be generated from "FROM" to today.
                 if you enter "TO" and doesn't enter "FROM",
                 statistic will be generated on day, defined in "TO"
 last=n        - show statistic for last n days/months.
                 (by default last=1, days or months - consist from "type" value)
 all=1         - analyzing all logs (by default all=0);
 type=DAY      - out statistics in "by day" or "by hour" format
                 (by default type=HOUR).
 int=interface_name - for example 3C59X_1_EII (by default first value from @interfaces array)
                 You can leave @interface array empty if wanstat.nlm collected datas only 
                 from one interface. In this case script will take interface name from first
                 line first log file.

Parameters separated using symbols &, for example: "wanstat.pl type=DAY&all=1"
Some parameters not available both and ignored (ex. if FROM greater than TO).

Program tested under Active Perl 5.21 and Netware 5 Perl NDK 333,334
Program doesn't work under native perl from  Netware 5 without Perl NDK !!! 
You can download last version perl NDK for Netware from 
http://developer.novell.com (free)
If you can see message "Can`t locate timelocal.pl in @INC at wanstat.pl line 1" 
after start with key "--noscreen" you must upgrade you perl version for Netware.

Sorry for my very poor english. :)