TCCRadius User Report Program Copyright 2000 Talon Computer Consulting, Inc http://www.tccsoftware.com support@tccsoftware.com (903) 534-9911 Developer: Brian Collins ================================== Description =========== This script scans RADIUS Accounting Logfile(s) for STOP records from one file only. The script then accumulates total time logged, packets in, and out as per username. The final report will show each username the total number of HHHH:MM:SS logged, plus the packets in and out. See the included file input.txt for an example of the RADIUS Accounting Logfile format. Plus, this script totals up the input data, output data, and time online to produce totals and averages for each. Package Contents ================ UserReport.pl readme.txt input.txt - a sample log file with sample packets Users.nov.1999.txt - a sample output file Installation and Setup ====================== If PERL is not installed, you must install it. http://www.activestate.com 1. Creat a directory for this script. 2. Open UserReport.pl and change the $InputPath variable to point to the full path of the folder that contains your log files. Example: $InputPath = "c:/Log.txt"; 3. Change the $OutputFile to what you would like to call your output report. The month and year will be added to the Output File name when the program scans through your log file. Example of what you should call the file: $OutputFile = "users.txt"; Example of file after program has run: users.nov.1999.txt 4. Change the $iAmt to how many entries you want LogTime.pl to check for repeat packets. This keeps the UserReport.pl script from logging duplicate Stop entries with identical Session IDs. Example : $iAmt = 12; (you need to keep the semicolon on the end) 5. Save UserReport.pl Command Line Operations ======================= 1. You can simply type in UserReport.pl with a '?' as an extension to get an output of command line options for the program. Examples : UserReport.pl ? : UserReport.pl input.txt ? : UserReport.pl input.xt -q ? 2: The command line should contain the name of the log file being scanned and with or without the -q switch. The -q command line switch is there to speed up the processing, because if you do not have this switch UserReport.pl script will mirror print the output to the screen. I would suggest that you do not use the -q switch to help you see and make sure that the input file path is correct. If you want to double check you input file path, then you can put the ? switch in, and it will display this for you at the end of the output printed to the screen. Examples of command line input : input.txt input.xt -q Example Output ============== ================================================ Radius Logs for nov 1999 UserName Time Online Data In Data Out HHHH:MM:SS fstout 0000:05:23 13577 941 mfortner 0000:00:30 59299 15340 odessaoffice 0000:05:05 631 1269