Statistics tool?

Dennis Skinner dskinner at bluefrog.com
Wed Jun 13 20:20:06 CEST 2007


Kevin J wrote:
>     > I need something that can tell me how many users got accepted and
>     > rejected so far since Radius started.
> 
>     Rotate the log whenever you restart radius then:
> 
>     grep -c OK radius.log
>     grep -c Failed radius.log
> 
> If you meant that I have to restart radius whenever I need the
> statistics, I will not do that.  Is there a way that we can rotate
> radius.log then?

(Note: I moved your response to preserve the flow of the conversation)

The other way around.

You asked for a method to count the number of good and bad logins since
the service was started, not since the last time you got stats or some
other arbitrary time.  If you only rotate the log when you restart
radius, then the log will have all good and bad logins in it since the
last restart (assuming you are not running in debug mode, which outputs
to stdout and not to the log).

If what you asked for is truly what you want, then my method should work
perfectly unless the system is busy enough to grow the log VERY large
between restarts.  I know radius used to die if certain log files hit
the 2GB limit, but I don't know if radius.log was one of them.  This can
then be remedied by weekly or nightly restarts.  Restarts are really
quick and you should have a secondary sitting there waiting if it isn't
for some reason.  Just don't restart both at the same time.

If that is not what you want, then please restate your question.

-- 
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com



More information about the Freeradius-Users mailing list