Re: Trying to do accounting on freeradius+mysql
Iq wrote: I will appreciate any help on how can I get accounting done on the data in mysql (even an sql query will do), for the moment I am using plain text files and getting accounting done by "Optigold ISP" log parser. I want customers to check their usgae using a web base interface. why don't you just take the example in sql.conf ? AcctSessionTime is the duration, AcctInputOctetd and OutputOctets are the transfered data. 'hope this help, @+ -- DouRiX - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Trying to do accounting on freeradius+mysql
Well if I am not mistaken, you can see in dialupadmin, the daily totals etc. But again if I am not mistaken there is mysql commands for adding up the search results. You should either figure out the mysql commands from the mysql manual or dig into dialup_admin files to find how its doing it, then you write your own scripts or use the same commands Perhaps somebody else on the list might have more information but I just wanted to write a quick reply. =) Evren On Tue, 21 Jan 2003, Iq wrote: > Hi Everyone, >I have steup freeradius+mysqlfairly easy with the > following links. > http://www.ccs.neu.edu/home/peterm/freeradiusbuild.html > http://www.frontios.com/freeradius.html > > I did connect for a while to my POP as well using mysql at the backend. But > i don't know how to do accounting. I did setup dialup_admin > www.dialup.goldenwireless.com.au > but I am doing something wring their is it is not working properlyl. I have > all the values in radacct table but I don't know how to calculate the time a > customer is on and the data he has utilized. > "iraja" is the username that get connected to the server rest of the > usernames are just wrong attempts. > > mysql> select * from radacct; > > | RadAcctId | AcctSessionId | AcctUniqueId | UserName | Realm | > NASIPAddress | NASPortId | NASPortType | AcctStartTime | AcctStopTime > | AcctSessionTime | AcctAuthentic | ConnectInfo_start | ConnectInfo_stop | > AcctInputOctets | AcctOutputOctets | CalledStationId | CallingStationId | > AcctTerminateCause | ServiceType | FramedProtocol | FramedIPAddress | > AcctStartDelay | AcctStopDelay | > +---+---+--+--+---+- > -+---+-+-+-+ > -+---+---+---+-- > ---+--+-+--+ > +-++-+-- > --+---+ > | 1 | 71000344 | | p.richardson | | > 203.14.183.2 |16 | Async | -00-00 00:00:00 | 2002-11-26 > 22:26:56 |2197 | RADIUS| | 49333 > LAPM/V42BIS | 434240 | 3449921 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.82 | > 0 |45 | > | 2 | 7100034B | | iraja| | > 203.14.183.2 |12 | Async | 2002-11-26 22:27:39 | 2002-11-26 > 22:29:08 | 89 | RADIUS| 38666 LAPM/V42BIS | 24000 > LAPM/V42BIS |1399 | 1064 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.68 | > 0 | 0 | > | 3 | 7100033F | | mbc | | > 203.14.183.2 | 0 | Async | -00-00 00:00:00 | 2002-11-26 > 22:30:45 |4705 | RADIUS| | 49333 > LAPM/V42BIS | 179854 | 1081219 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.84 | > 0 | 0 | > | 4 | 7100034C | | iraja| | > 203.14.183.2 |11 | Async | 2002-11-26 22:30:46 | 2002-11-26 > 22:36:12 | 326 | RADIUS| 52000 LAPM/V42BIS | 52000 > LAPM/V42BIS | 159179 | 1355687 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.87 | > 0 | 0 | > | 5 | 71000348 | | colrado | | > 203.14.183.2 | 6 | Async | -00-00 00:00:00 | 2002-11-26 > 22:31:29 | 847 | RADIUS| | 52000 > LAPM/V42BIS | 30517 | 245308 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.75 | > 0 | 0 | > | 6 | 71000341 | | arma | | > 203.14.183.2 |14 | Async | -00-00 00:00:00 | 2002-11-26 > 22:33:25 |3580 | RADIUS| | 26400 > LAPM/V42BIS | 617265 | 4066119 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.79 | > 0 | 0 | > | 7 | 71000345 | | hjbems | | > 203.14.183.2 | 5 | Async | -00-00 00:00:00 | 2002-11-26 > 22:33:37 |1988 | RADIUS| | 4 > LAPM/V42BIS | 517318 | 6394135 | 87966000| > | User-Request | Framed-User | PPP| 203.14.183.94 | > 0 | 0 | > +---+---+--+--+---+- > -+---+-+-+-+ > -+---+---+-
Trying to do accounting on freeradius+mysql
Hi Everyone, I have steup freeradius+mysqlfairly easy with the following links. http://www.ccs.neu.edu/home/peterm/freeradiusbuild.html http://www.frontios.com/freeradius.html I did connect for a while to my POP as well using mysql at the backend. But i don't know how to do accounting. I did setup dialup_admin www.dialup.goldenwireless.com.au but I am doing something wring their is it is not working properlyl. I have all the values in radacct table but I don't know how to calculate the time a customer is on and the data he has utilized. "iraja" is the username that get connected to the server rest of the usernames are just wrong attempts. mysql> select * from radacct; | RadAcctId | AcctSessionId | AcctUniqueId | UserName | Realm | NASIPAddress | NASPortId | NASPortType | AcctStartTime | AcctStopTime | AcctSessionTime | AcctAuthentic | ConnectInfo_start | ConnectInfo_stop | AcctInputOctets | AcctOutputOctets | CalledStationId | CallingStationId | AcctTerminateCause | ServiceType | FramedProtocol | FramedIPAddress | AcctStartDelay | AcctStopDelay | +---+---+--+--+---+- -+---+-+-+-+ -+---+---+---+-- ---+--+-+--+ +-++-+-- --+---+ | 1 | 71000344 | | p.richardson | | 203.14.183.2 |16 | Async | -00-00 00:00:00 | 2002-11-26 22:26:56 |2197 | RADIUS| | 49333 LAPM/V42BIS | 434240 | 3449921 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.82 | 0 |45 | | 2 | 7100034B | | iraja| | 203.14.183.2 |12 | Async | 2002-11-26 22:27:39 | 2002-11-26 22:29:08 | 89 | RADIUS| 38666 LAPM/V42BIS | 24000 LAPM/V42BIS |1399 | 1064 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.68 | 0 | 0 | | 3 | 7100033F | | mbc | | 203.14.183.2 | 0 | Async | -00-00 00:00:00 | 2002-11-26 22:30:45 |4705 | RADIUS| | 49333 LAPM/V42BIS | 179854 | 1081219 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.84 | 0 | 0 | | 4 | 7100034C | | iraja| | 203.14.183.2 |11 | Async | 2002-11-26 22:30:46 | 2002-11-26 22:36:12 | 326 | RADIUS| 52000 LAPM/V42BIS | 52000 LAPM/V42BIS | 159179 | 1355687 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.87 | 0 | 0 | | 5 | 71000348 | | colrado | | 203.14.183.2 | 6 | Async | -00-00 00:00:00 | 2002-11-26 22:31:29 | 847 | RADIUS| | 52000 LAPM/V42BIS | 30517 | 245308 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.75 | 0 | 0 | | 6 | 71000341 | | arma | | 203.14.183.2 |14 | Async | -00-00 00:00:00 | 2002-11-26 22:33:25 |3580 | RADIUS| | 26400 LAPM/V42BIS | 617265 | 4066119 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.79 | 0 | 0 | | 7 | 71000345 | | hjbems | | 203.14.183.2 | 5 | Async | -00-00 00:00:00 | 2002-11-26 22:33:37 |1988 | RADIUS| | 4 LAPM/V42BIS | 517318 | 6394135 | 87966000| | User-Request | Framed-User | PPP| 203.14.183.94 | 0 | 0 | +---+---+--+--+---+- -+---+-+-+-+ -+---+---+---+-- ---+--+-+--+ +-++-+-- --+---+ I will appreciate any help on how can I get accounting done on the data in mysql (even an sql query will do), for the moment I am using plain text files and getting accounting done by "Optigold ISP" log parser. I want customers to check their usgae using a web base interface. RH7.3 + Freeradius 8 kind regards, Internet Services Administrator Golden IT Ph: +61 (3) 97052511 Fax: +61 (3) 97052544 Email: [EMAIL PROTECTED] Web: www.goldenit.net.au ---