Projects Personal Contact Rss
 


System Utilities / RadiusReport

Program:	RadiusReport
Author:		Paul Gregg 
Date:		May 1997 (V0.1)
Beta Ver:	V0.3b6, July 1998
URL:		http://www.pgregg.com/projects/radiusreport/

Brief:		Radiusreport is a utility which parses RADIUS files
		to produce various reports on user and system usage.

Licence:	Basically GPL, but I ask is that if you pass it on that
		it is passed on in its original format and also includes 
		all supplimentary files.
		I also ask that you email me to let me know you are using it.

Thanks:		To everyone for the support and saying how useful radiusreport
		is :-)

Comments:	If you find a version of Radius this doesn't work on then
		please send me details of 1) The radius server and 2) Examples
		of your logs (note: confidentiality of any logs are assured).

Usage:
------

Radiusreport can produce many varied reports by analysing your RADIUS
detail files. detail files can be uncompressed/compressed/gzipped.

 . User Online time reports plus extras like bandwidth used, etc.
 . IP address usage
 . Last login time reports

As of V.02 radiusreport can generate individual files for each user by using
the -o flag in conjunction with '-l all'.  This function will enable you to
'reprocess' radiusreport's output, e.g. to email a copy of each users report
to them.

RadiusReport does not need special priveleges, just read access to the
detail files, and if using the -o flag write access to the directory
you are putting the user reports into.

This README was knocked out very quickly, so I'd appreciate any comments


Examples on use:

1. To produce a 'minimal' report on 'abcedf'.

	radiusreport -l abcdef -f /var/adm/radacct/portmaster1/detail

Radius Log Report for: abcdef
Date     Login    Logout   Ontime  Port
------------------------------------------------------------------------
02/07/97 22:54:07 23:03:54   9m48s A9  
......
------------------------------------------------------------------------


2. To produce the same, but without that head/food text. (most minimal)

	radiusreport -h -l abcdef -f /var/adm/radacct/portmaster1/detail


3. To produce a 'full' report on account 'abcdef'.

	radiusreport -tba -l abcdef -f /var/adm/radacct/portmaster1/detail

Radius Log Report for: abcdef
Date     Login    Logout   Ontime  Port BW-In/Out     Total
------------------------------------------------------------------------
01/06/97 13:18:19 13:38:07  19m48s A1   120.1K/309.3K   0h19m
01/06/97 22:32:24 23:32:17  59m54s A3   218.1K/1.7M     1h19m
02/06/97 19:54:33 21:15:01  80m29s A2   396.7K/1.3M     2h40m
........
30/06/97 19:33:53 20:05:25  31m32s A2   116.0K/1017.6K  54h24m
30/06/97 22:29:00 01:56:13 207m08s A1   1.2M/5.7M      57h51m
02/07/97 23:33:13 00:40:42  67m30s A3   276.7K/1.0M    58h59m
------------------------------------------------------------------------
  Total Hours:  58h59m
  Average Online times:   1h52m per day,   13h08m per week
  Total Data transferred In/Out: 18.2M/67.8M


A couple of points:
Port is made up from a combination of 2 things, the login type Async or Isdn
BW-In/Out is the about of data transferred during the dialup *from the
perspective of the portmaster*
The rest of the columns should be pretty straight forward ;)


4. To produce reports for every user for the last 2 months.
   (I archive my months details away, May's is gzipped, June's is plain)

	radiusreport -tba -l all -f /var/adm/radacct/portmaster1/archives/1997\
	/06/detail:/var/adm/radacct/portmaster1/archives/1997/05/detail.gz

of course this shoulds all be on one line.

To make the output be placed in a file per user set up a 'clean' directory
to put the files in, e.g. mkdir /tmp/reports  and use the above command with
the extra flag -o /tmp/reports

Note: This will quickly eat memory. Unfortunately due to the memory based
hash tables RadiusReport uses even a small ISP can easily overload a 64Mb
system.  I'll be developing file based hash tables for the next major release
which will remove this problem. Speed will probably not suffer much because
RadiusReport will no longer need to make extensive use of most systems swap
space ;) (I'm a 200 user ISP and RadiusReport builds to 80Mb on 2 months
worth of logs)


5. To produce a list of users who used IP address aaa.bbb.ccc.ddd

	radiusreport -i aaa.bbb.ccc.ddd -f detail


6. To produce a list of users, along with their last login times.
   (Only really useful if performed on at least 1 or 2 months logs)

	radiusreport -r -f detail:detail.lastmonth

7. To produce a complete Login User / IP address mapping list

	radiusreport -i 0 -f detail


8. To generate a telco cost for user 'joe' for the month of June

	radiusreport -tbac -l joe -f detail.june:detail.july -d Jun

(Using July's logfile, in case a login rolled over to the next month).

Have fun.

Suggestions welcome.

Paul.



All content © Paul Gregg, 1994 - 2019
Page last updated: 15 July 2008 23:07:01.
This site http://pgregg.com has been online since 5th October 2000
Previous websites live at various URLs since 1994