Re[4]: how get current TRAFFIC (ACCT) ?
Hi. [ You wrote Thursday, December 15, 2005, 2:52:10 PM ] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= SE> Well you have set up your pppoe-server to send the accounting information SE> only at the end of the session. If connection is "lost", you will have the SE> accounting data in your database with AcctTerminateCause something like SE> "terminated by server". SE> The session you have sent me is just an open session. SE> As I said - you can set the Acct-Interim-Interval attribute so that your SE> server sends the accouting packets every few minutes for example. i try i insert into radreply : id UserName Attribute op Value 1 test Framed-IP-Address := 192.168.96.10 4 test Acct-Status-Type := Interim-Update 5 test Acct-Interim-Interval := 60 6 test Framed-IP-Netmask := 255.255.252.0 but it is not worked you wrote : add attribute into dictionary file tell me please IN WHAT FILE I NEED ADD IT ? and what will have to line ? into /etc/freeradius folder i c one file ./dictionaty : # # This is the master dictionary file, which references the # pre-defined dictionary files included with the server. # # Any new/changed attributes MUST be placed in this file, as # the pre-defined dictionaries SHOULD NOT be edited. # # $Id: dictionary.in,v 1.4 2004/04/14 15:26:20 aland Exp $ # # # The filename given here should be an absolute path. # $INCLUDE /usr/share/freeradius/dictionary # # Place additional attributes or $INCLUDEs here. They will # over-ride the definitions in the pre-defined dictionaries. # # See the 'man' page for 'dictionary' for information on # the format of the dictionary files. # # If you want to add entries to the dictionary file, # which are NOT going to be placed in a RADIUS packet, # add them here. The numbers you pick should be between # 3000 and 4000. # #ATTRIBUTE My-Local-String 3000 string #ATTRIBUTE My-Local-IPAddr 3001 ipaddr #ATTRIBUTE My-Local-Integer 3002 integer what i need add there ? like this : ATTRIBUTE Acct-Interim-Interval 3003 integer ATTRIBUTE Acct-Status-Type 3004 string ?? SE> -----Original Message----- SE> From: Andreas Sokov [mailto:andre.s@j8.com.ru] SE> Sent: Donnerstag, 15. Dezember 2005 12:42 SE> To: freeradius-users@lists.freeradius.org SE> Cc: edvin.seferovic@kolp.at SE> Subject: Re[2]: how get current TRAFFIC (ACCT) ? SE> Hi. SE> [ You wrote Thursday, December 15, 2005, 2:14:10 PM ] SE> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SE> =-= SE>> Hi, SE>> for traffic information - look at the RADACCT table in your mysql SE> database SE>> called radius. A simple sql query could be - SE> -) SE> i know what information about traffic collect in that table. SE> But please, look at this : SE> RadAcctId AcctSessionId AcctUniqueId UserName Realm SE> NASIPAddress NASPortId NASPortType AcctStartTime AcctStopTime SE> AcctSessionTime AcctAuthentic ConnectInfo_start SE> ConnectInfo_stop AcctInputOctets AcctOutputOctets SE> CalledStationId CallingStationId AcctTerminateCause SE> ServiceType FramedProtocol FramedIPAddress SE> AcctStartDelay AcctStopDelay SE> 19 43A154E9151B00 835535e0e65d3ace test SE> 213.159.102.146 0 Virtual 2005-12-15 14:35:05 0000-00-00 SE> 00:00:00 0 RADIUS 0 0 SE> Framed-User PPP 192.168.96.10 0 0 SE> 18 43A13CE87DBE00 73e57ea8afc72d3b test SE> 213.159.102.146 0 Virtual 2005-12-15 12:52:40 2005-12-15 SE> 14:10:12 4652 RADIUS 6857793 7229167 SE> User-Request Framed-User PPP 192.168.96.10 0 0 SE> look at id=19 into AcctStopTime and SE> while session OPENS! the value AcctInputOctets AcctOutputOctets == 0 SE> !!! SE> and if session will be open during 20 hourse - we can not know that current SE> value of SE> AcctInputOctets AcctOutputOctets ?! SE> What you think about it ? SE>> SELECT SUM(AcctOutputOctets) as download, SUM(AcctInputOctets) as upload SE>> GROUP BY Username ORDER BY Username ASC; SE>> This should give you a list of your users and their upload and download SE>> traffic ( list is sorted ascending by usernames ). SE>> Regards, SE>> Edvin SE>> -----Original Message----- SE>> From: freeradius-users-bounces@lists.freeradius.org SE>> [mailto:freeradius-users-bounces@lists.freeradius.org] On Behalf Of SE> Andreas SE>> Sokov SE>> Sent: Donnerstag, 15. Dezember 2005 11:33 SE>> To: freeradius-users@lists.freeradius.org SE>> Subject: how get current TRAFFIC (ACCT) ? SE>> Importance: High SE>> Hi, freeradius-users. SE>> Linux Debian, # uname -a SE>> Linux g48 2.6.14.3-1 #4 Sun Dec 11 05:57:57 MSK 2005 i686 GNU/Linux SE>> #freeradius -v SE>> freeradius: FreeRADIUS Version 1.0.5, for host , built on Oct 16 2005 at SE>> 11:56:56 SE>> # mysql -V SE>> mysql Ver 14.12 Distrib 5.0.13-rc, for pc-linux-gnu (i486) using SE> readline SE>> 5.0 SE>> TELL ME PLEASE : HOW I CAN GET CURRENT TRAFFIC INFORMATION ? SE>> I need to kno how much traffic user eat before it close your session. SE>> Do Know anybody ? SE>> I try radwho, radlast - but they show all but acct information SE>> Try radacct - but it is not show anything info, just run and no SE> information SE>> ... SE>> HELP PLEASE. SE> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SE> =-= SE> -- ------------------------------------- SE> Best Regards, Andreas SE> Thursday, December 15, 2005 2:36:16 PM SE> Web-Media L.t.d. SE> +7 (901) 301-5811 SE> ICQ UIN 177624 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- ------------------------------------- Best Regards, Andreas Thursday, December 15, 2005 2:55:28 PM Web-Media L.t.d. +7 (901) 301-5811 ICQ UIN 177624
Hi, dictionary file on your freeradius server is usually found under /usr/share/freeradius/dictionary... Search for ATTRIBUTE Acct-Interim-Interval 85 integer On your pppoe server ( which is using radiusclient ), look at /etc/radiusclient/dictionary and add if not exists ATTRIBUTE Acct-Interim-Interval 85 integer Then it might work.. what pppoe server are you using? And please set up Acct-Interim-Interval to something greater then 2 minutes. Values lower then 120 won't work. Regards, Edvin -----Original Message----- From: Andreas Sokov [mailto:andre.s@j8.com.ru] Sent: Donnerstag, 15. Dezember 2005 13:21 To: edvin.seferovic@kolp.at Cc: freeradius-users@lists.freeradius.org Subject: Re[4]: how get current TRAFFIC (ACCT) ? Hi. [ You wrote Thursday, December 15, 2005, 2:52:10 PM ] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-= SE> Well you have set up your pppoe-server to send the accounting information SE> only at the end of the session. If connection is "lost", you will have the SE> accounting data in your database with AcctTerminateCause something like SE> "terminated by server". SE> The session you have sent me is just an open session. SE> As I said - you can set the Acct-Interim-Interval attribute so that your SE> server sends the accouting packets every few minutes for example. i try i insert into radreply : id UserName Attribute op Value 1 test Framed-IP-Address := 192.168.96.10 4 test Acct-Status-Type := Interim-Update 5 test Acct-Interim-Interval := 60 6 test Framed-IP-Netmask := 255.255.252.0 but it is not worked you wrote : add attribute into dictionary file tell me please IN WHAT FILE I NEED ADD IT ? and what will have to line ? into /etc/freeradius folder i c one file ./dictionaty : # # This is the master dictionary file, which references the # pre-defined dictionary files included with the server. # # Any new/changed attributes MUST be placed in this file, as # the pre-defined dictionaries SHOULD NOT be edited. # # $Id: dictionary.in,v 1.4 2004/04/14 15:26:20 aland Exp $ # # # The filename given here should be an absolute path. # $INCLUDE /usr/share/freeradius/dictionary # # Place additional attributes or $INCLUDEs here. They will # over-ride the definitions in the pre-defined dictionaries. # # See the 'man' page for 'dictionary' for information on # the format of the dictionary files. # # If you want to add entries to the dictionary file, # which are NOT going to be placed in a RADIUS packet, # add them here. The numbers you pick should be between # 3000 and 4000. # #ATTRIBUTE My-Local-String 3000 string #ATTRIBUTE My-Local-IPAddr 3001 ipaddr #ATTRIBUTE My-Local-Integer 3002 integer what i need add there ? like this : ATTRIBUTE Acct-Interim-Interval 3003 integer ATTRIBUTE Acct-Status-Type 3004 string ?? SE> -----Original Message----- SE> From: Andreas Sokov [mailto:andre.s@j8.com.ru] SE> Sent: Donnerstag, 15. Dezember 2005 12:42 SE> To: freeradius-users@lists.freeradius.org SE> Cc: edvin.seferovic@kolp.at SE> Subject: Re[2]: how get current TRAFFIC (ACCT) ? SE> Hi. SE> [ You wrote Thursday, December 15, 2005, 2:14:10 PM ] SE> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SE> =-= SE>> Hi, SE>> for traffic information - look at the RADACCT table in your mysql SE> database SE>> called radius. A simple sql query could be - SE> -) SE> i know what information about traffic collect in that table. SE> But please, look at this : SE> RadAcctId AcctSessionId AcctUniqueId UserName Realm SE> NASIPAddress NASPortId NASPortType AcctStartTime AcctStopTime SE> AcctSessionTime AcctAuthentic ConnectInfo_start SE> ConnectInfo_stop AcctInputOctets AcctOutputOctets SE> CalledStationId CallingStationId AcctTerminateCause SE> ServiceType FramedProtocol FramedIPAddress SE> AcctStartDelay AcctStopDelay SE> 19 43A154E9151B00 835535e0e65d3ace test SE> 213.159.102.146 0 Virtual 2005-12-15 14:35:05 0000-00-00 SE> 00:00:00 0 RADIUS 0 0 SE> Framed-User PPP 192.168.96.10 0 0 SE> 18 43A13CE87DBE00 73e57ea8afc72d3b test SE> 213.159.102.146 0 Virtual 2005-12-15 12:52:40 2005-12-15 SE> 14:10:12 4652 RADIUS 6857793 7229167 SE> User-Request Framed-User PPP 192.168.96.10 0 0 SE> look at id=19 into AcctStopTime and SE> while session OPENS! the value AcctInputOctets AcctOutputOctets == 0 SE> !!! SE> and if session will be open during 20 hourse - we can not know that current SE> value of SE> AcctInputOctets AcctOutputOctets ?! SE> What you think about it ? SE>> SELECT SUM(AcctOutputOctets) as download, SUM(AcctInputOctets) as upload SE>> GROUP BY Username ORDER BY Username ASC; SE>> This should give you a list of your users and their upload and download SE>> traffic ( list is sorted ascending by usernames ). SE>> Regards, SE>> Edvin SE>> -----Original Message----- SE>> From: freeradius-users-bounces@lists.freeradius.org SE>> [mailto:freeradius-users-bounces@lists.freeradius.org] On Behalf Of SE> Andreas SE>> Sokov SE>> Sent: Donnerstag, 15. Dezember 2005 11:33 SE>> To: freeradius-users@lists.freeradius.org SE>> Subject: how get current TRAFFIC (ACCT) ? SE>> Importance: High SE>> Hi, freeradius-users. SE>> Linux Debian, # uname -a SE>> Linux g48 2.6.14.3-1 #4 Sun Dec 11 05:57:57 MSK 2005 i686 GNU/Linux SE>> #freeradius -v SE>> freeradius: FreeRADIUS Version 1.0.5, for host , built on Oct 16 2005 at SE>> 11:56:56 SE>> # mysql -V SE>> mysql Ver 14.12 Distrib 5.0.13-rc, for pc-linux-gnu (i486) using SE> readline SE>> 5.0 SE>> TELL ME PLEASE : HOW I CAN GET CURRENT TRAFFIC INFORMATION ? SE>> I need to kno how much traffic user eat before it close your session. SE>> Do Know anybody ? SE>> I try radwho, radlast - but they show all but acct information SE>> Try radacct - but it is not show anything info, just run and no SE> information SE>> ... SE>> HELP PLEASE. SE> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SE> =-= SE> -- ------------------------------------- SE> Best Regards, Andreas SE> Thursday, December 15, 2005 2:36:16 PM SE> Web-Media L.t.d. SE> +7 (901) 301-5811 SE> ICQ UIN 177624 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-= -- ------------------------------------- Best Regards, Andreas Thursday, December 15, 2005 2:55:28 PM Web-Media L.t.d. +7 (901) 301-5811 ICQ UIN 177624
participants (2)
-
Andreas Sokov -
Seferovic Edvin