help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnu-radius] multiple radius servers feeding in to one postgres


From: Sergey Poznyakoff
Subject: Re: [Help-gnu-radius] multiple radius servers feeding in to one postgres db
Date: Fri, 22 Nov 2002 17:38:07 +0200

> e.g. if I simply take the radutmp and radstat files from the main radius 
> server and copy them over to this new one, radping, radwho and radlast will 
> show the same information as the main radius server did at the time of the 
> snapshot?

Not quite so. Never copy radstat. First, it is not needed for the
utilities and secondly it is mmapped to the memory when radiusd is
running. Replacing it will have disastrous effects. Copying radutmp
and radwtmp will allow radping, radwho and radlast to work. Before
copying radutmp, apply exlusive write lock on it, so it won't disturb
the operation of the daemon. When the file is copied, remove the lock.
You can use radlock/rad_unlock from radlib/util.c to do that.

> And, just as a proof-of-concept, if I wrote a cron script which ran on each 
> radius server and simply queried the accounting database for a list of 
> current users and *generated* radutmp and radstat files, everything would 
> appear correctly?

Yes, with the correction that it should create radutmp (note the mandatory
locking!), and append new information to radwtmp.

> > That's a bit harder to implement. However I like the idea and will try
> > to figure out something.
> 
> It *could* be as simple as two two-column tables: "radius_srv" and 
[..good points follow..]
> I dunno...  it's a start I guess.  :-)

OK, I'll think about it. Thanks for the idea.

Regards,
Sergey







reply via email to

[Prev in Thread] Current Thread [Next in Thread]