TCCRadius NAS Time Compiler 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. The script then accumulates total time logged on a per NAS basis. The final report will show each NAS and the total number of HH:MM:SS logged on that NAS. See the included file SummaryLog.txt for an example of the RADIUS Accounting Logfile format. Package Contents ================ LogTime.pl readme.txt SampleLog.txt - a sample file with a directory to the log files SummaryLog.txt - a sample log file with 5 sample packets 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 LogTime.pl and change the $InputFile variable to point to the full path of the file that will read in all your NAS log files. Example: $InputFile = "c:/Log.txt"; 3. Create a file with the same name as your $InputFile was named and type in the full path names of each NAS log file ,and hit enter after typing in each of these NAS log files. So, each file name and directory is on a seperate line. Example : c:\TCCRadius\logs\level3detail : c:\NAS1\NASlog11.dat 4. Change the $OutputFile to the file name and directory that you would like to save it as. Example : $OutputFile = "c:/LogSummary/NASTimes.txt" 4. Change the $iAmt to how many entries you want LogTime.pl to check for repeat packets. This keeps the LogTime.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 LogTime.pl Command Line Operations ======================= 1. You can simply type in LogTime.pl with a '?' as an extension to get an output of command line options for the program. Example : LogTime.pl ? 2: The command line should contain the month and a four digit year. A day limit is optional. Each option should be seperated by a space. Examples : June 1999 1-10 06 1999 1-10 Jun 1999 1-10 June 1999 A. The [Month] can be in a three charater format, a two digit number or spelled out, and there is no problem with capitalization. B. The [Year] has to be four digits. No alpha characters. C. The [Start Days-Stop Days] is an optional command line. I must contain digits and no alpha character. The Start Day should be immediatly followed by the Stop Day. They can only be seperated by a hyphen and nothing else. Example Output ============== ================================================ Radius Logs for april 1999 NAS-Id Total Time 209.244.42.166 0000:09:57 209.244.42.170 0000:07:33