Module Statistics in freeradius

Alan DeKok aland at deployingradius.com
Fri Sep 26 20:08:37 CEST 2014


Himanshu Pandey wrote:
> But as we discussed, the server does NOT keep track of statistics for
> each module return codes.

  Yes... I've said that repeatedly.  Perhaps you could repeat it some
more, to be sure that I understand how the server works?

> The very first thing that I did was finding out the basic module
> structure in freeradius, if I am not wrong this is the basic module
> structure used:

  Yes.

> Now I added an unsigned long array in this structure in which module
> return code act as an index. Please see the snippet below:

  That's not a good idea.  For one, the module return codes are already
in a typedef.  Just use that one.  There's no reason to create a new one.

  And "unsigned long" isn't used anywhere else in the server.  Just use
"uint64_t".

> Please advice me that how should I update this my unsigned long
> rtcode[RLM_RETCODE_COUNT] array with each module return code.

  Use C code to increment the array entry.  See modcall.c, call_modsingle().

  Alan DeKok.


More information about the Freeradius-Users mailing list