radiusContext
Introduction
radiusContext is a RADIUS (Remote Authentication Dial In User Services)
accounting log analysis package. It includes a web interface which users
can log into using their RADIUS login and password to view their current
and previous months usage. It currently works with just about every
RADIUS server out there that writes Livingston-compatible detail files,
including:
Livingston RADIUS servers
MERIT RADIUS
Cistron RADIUS
Radiator
Most RADIUS servers use this format
Microsoft's RADIUS server does not use this format. If you
are interested in funding changes to radiusContext to support
Microsoft's format, please let us know.
Mailing list
radiuscontext-discuss
Download
FTP:
ftp.tummy.com:/pub/tummy/radiusContext/
Recent changes
WHATSNEW (first 15 lines):
<Unable to find WHATSNEW file>
Press
DaveCentral's Best of Linux for February 28, 2001
Requirements
Python: a current version (1.5.1+)
to work. You can get source (and binaries for selected systems) from
www.python.org.
pyrad: The web-based
interface requires pyrad to be installed. pyrad requires Python versions
2.1 or higher. This is only required for the web interface.
The Apache Webserver: The web-based
interface requires Apache or another web server
which can run CGIs.
radiusContext works with Livingston RADIUS and MERIT RADIUS accounting
logs, and it should be easy to add other formats.
Description and License
It comes with full source code. You may modify copies of it for your own
use, but you may not redistribute modified copies without our permission.
If you have patches, bug reports or suggestions for improvement, please
contact us at radiusContext@tummy.com.
- Overall Dial-in Reports:(html, two text formats)
- User Detail Reports:(html, two text formats)
Inspiration
It was modeled after the radiusreport package
(
http://www.pgregg.com/projects/radiusreport/).
radiusContext is meant to deal with a few short-comings of radiusreport,
but of course has a few of it's own:
Advantages
Regularly maintained. Most recent radiusreport update is January
of 1998.
Uses roughly 10% of the memory. On 260MB of logs, uses 50MB RAM and
around 320MB disc space (not counting logs). radiusreport I had to
kill after it used 128MB RAM and 256MB swap.
Produces easier-to-read reports.
Produces more correct reports (users with 5 minutes on-time aren't
reported as 300+ hours).
Produces indicies of report data.
Produces text and HTML output, other output methods can be plugged in
in a modular way.
Faster (up to 10x) on processing log-files that don't fit in memory.
Incremental parsing of log files (process them every day, and
generate month-to-date reports for example)
Disadvantages
- For log-files that fit completely in memory, radiusContext is about
half as fast.
- On a Pentium II 300 machine with 128MB RAM, a 1.2 million line detail
file (containing 160 thousand accounting entries) can be processed in
12 minutes (1673 lines or 108 records per second). This includes
parsing and report generation. radiusreport can do the same report in
6 minutes.
Getting Started
radiusContext creates a database called "SessionData" in the current
directory. This name can be specified using the "-d" option to the
commands. Data is processed in two stages, importing of the data into the
database (which can be done incrementally) and report generation.
To create the database, use "raddetail". The detail file names can be
specified on the command-line, or can be piped from standard input. Now, to
create the report run "mkdir report" and "stdreport -H report -T report".
You will end up with text and HTML files in a subdirectory called "report".
There is an "index" and "index.html" file created which includes an overall
report. The "index.html" file has hyper-links to the detail files.
Running radiusContext
radiusContext runs in two stages. The first stage parses the detail file
and adds the records to a database. This stage can be run however often you
want, with whatever data you have. For example you could run it daily...
Then if you want to produce monthly reports, remove or rename the database
after the last run of the month. This phase only requires about 5% of the
database size in RAM, and is quite disc-intensive.
The second stage takes the database and generates a report. This stage can
be fairly lengthy, so you probably want to run it at night, and no more
often than once a day. Memory used during this phase is roughly 15% of the
database size, though I'm planning on making it even more stingy in the
future. This phase is also quite disk-bounded, so while it doesn't use much
processor time, your discs may be very busy.
Reports are generated in both HTML and text form. Other back-ends can be
created and plugged in quite easily.
Command line Switches
raddetail takes the following command-line switches:
[ -L | --dblib <name> ] Specify db file format to use.
[ -d | --database <file> ] Specify database file name.
[ -v | --verbose ] Display details of run.
[ --version ] Display program version.
[ --transform-user-lowercase ] Convert the user name to lower-case.
[ --transform-user-stripdomain ] Remove the domain from a user name.
[ --transform-user-appenddomain=domain ]
If no user name has no domain,
add 'domain' (no @ is included unless
specified in 'domain').
[ -h | -? | --help ] Display this usage message.
stdreport takes the following command-line switches:
[ -L | --dblib <name> ] Specify db file format to use.
[ -d | --database <file> ] Specify database file name.
[ -D | --reportdir <dir> ] Specify report directory name.
[ -g | --generate <type> ] Select reports to generate.
(May be used several times).
[ -C | --csvreportdir <dir> ] Specify CSV directory name.
[ -H | --htmlreportdir <dir> ] Specify HTML directory name.
[ -A | --htmlascendreportdir <dir> ]
Specify HTML-Ascend directory.
[ -T | --textreportdir <dir> ] Specify text directory name.
[ -R | --rawreportdir <dir> ] Specify RAW directory name.
[ -s | --split-num <n> ] Second-level report dirs are the
first 'n' chars of login. (use 0
to not create subdirectories)
[ --secsconv-limit <s> ] Limit the time conversion to at most
the specified limit. This can be a
number of seconds, or a name such as
as 'hours', 'days', or 'minutes'.
'days', or 'minutes'.
[ -u | --user ] <user name> Limit report to <user> (may be
specified multiple times)
[ -v | --version ] Display program version.
[ -h | -? | --help ] Display this usage message.
Copyright
radiusContext (source, binaries, report formats, documentation and all
related matter) is copyright © 1998-2004 Sean Reifschneider,
tummy.com, ltd.