(RADIATOR) Timestamp attribute

2002-07-24 Thread Viraj Alankar

Hello,

From what I can understand, the timestamp used in AuthSQL for accounting is
the Timestamp attribute that is created in the request packet by the current
time minus Acct-Delay-Time.

However, when I have one Radiator proxying to another, the 2nd Radiator ends
up with 2 Timestamp different attributes. It isn't clear to me which one will
be used by the 2nd Radiator. I see get_attr in the code being called for this
value but wouldn't this just return the first (incorrect) Timestamp value?

Would it be better for me to depend on a database function for the timestamp?
For example, with an insert statement similar to:

..., now() - 0%{Acct-Delay-Time}, ...

Viraj.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



RE: (RADIATOR) Timestamp attribute

2002-07-24 Thread Dave Kitabjian

Interesting question.

The question for you is, what event do you want the stamp for?

The Timestamp attribute indicates, I think, when the RADIUS packet is
actually sent by the NAS. 

The line at the top:

Wed Jul 24 12:59:01 2002
  Acct-Session-Id = 0002BAA0
Framed-Protocol = PPP

indicates when RADIATOR generated the record. 

Your 2nd Timestamp attribute might be when RADIATOR is acting like a NAS
and proxying the packet to the next RADIUS server. In theory, that could
be minutes or hours later.

So, which of these events do you want to capture? You may want to write
a hook to throw out preexisting Timestamp attributes before you proxy
them over to the next RADIUS server...

Dave
:)

 -Original Message-
 From: Viraj Alankar [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, July 24, 2002 9:36 AM
 To: [EMAIL PROTECTED]
 Subject: (RADIATOR) Timestamp attribute
 
 
 Hello,
 
 From what I can understand, the timestamp used in AuthSQL for 
 accounting is the Timestamp attribute that is created in the 
 request packet by the current time minus Acct-Delay-Time.
 
 However, when I have one Radiator proxying to another, the 
 2nd Radiator ends up with 2 Timestamp different attributes. 
 It isn't clear to me which one will be used by the 2nd 
 Radiator. I see get_attr in the code being called for this 
 value but wouldn't this just return the first (incorrect) 
 Timestamp value?
 
 Would it be better for me to depend on a database function 
 for the timestamp? For example, with an insert statement similar to:
 
 ..., now() - 0%{Acct-Delay-Time}, ...
 
 Viraj.
 ===
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



RE: (RADIATOR) Timestamp attribute

2002-07-24 Thread miko

I have a question along the same lines,,, What is the Timestamp
Attribute??? I could only find a Timestamp in the Tunneling
attributes...

Miko

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Kitabjian
 Sent: Wednesday, July 24, 2002 10:03 AM
 To: Viraj Alankar; [EMAIL PROTECTED]
 Subject: RE: (RADIATOR) Timestamp attribute
 
 
 Interesting question.
 
 The question for you is, what event do you want the stamp for?
 
 The Timestamp attribute indicates, I think, when the RADIUS 
 packet is actually sent by the NAS. 
 
 The line at the top:
 
   Wed Jul 24 12:59:01 2002
 Acct-Session-Id = 0002BAA0
   Framed-Protocol = PPP
 
 indicates when RADIATOR generated the record. 
 
 Your 2nd Timestamp attribute might be when RADIATOR is acting 
 like a NAS and proxying the packet to the next RADIUS server. 
 In theory, that could be minutes or hours later.
 
 So, which of these events do you want to capture? You may 
 want to write a hook to throw out preexisting Timestamp 
 attributes before you proxy them over to the next RADIUS server...
 
 Dave
 :)
 
  -Original Message-
  From: Viraj Alankar [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 24, 2002 9:36 AM
  To: [EMAIL PROTECTED]
  Subject: (RADIATOR) Timestamp attribute
  
  
  Hello,
  
  From what I can understand, the timestamp used in AuthSQL for
  accounting is the Timestamp attribute that is created in the 
  request packet by the current time minus Acct-Delay-Time.
  
  However, when I have one Radiator proxying to another, the
  2nd Radiator ends up with 2 Timestamp different attributes. 
  It isn't clear to me which one will be used by the 2nd 
  Radiator. I see get_attr in the code being called for this 
  value but wouldn't this just return the first (incorrect) 
  Timestamp value?
  
  Would it be better for me to depend on a database function
  for the timestamp? For example, with an insert statement similar to:
  
  ..., now() - 0%{Acct-Delay-Time}, ...
  
  Viraj.
  ===
 ===
 Archive at http://www.open.com.au/archives/radiator/
 Announcements on [EMAIL PROTECTED]
 To unsubscribe, email '[EMAIL PROTECTED]' with
 'unsubscribe radiator' in the body of the message.
 

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp attribute

2002-07-24 Thread Hugh Irvine


Hello Dave, Hello Viraj -

The radius protocol itself has no notion of wall (clock) time - it only deals 
with delta times in numbers of seconds. This being the case, there are 
various hacks in use to get some idea of wall time. 

In the case of Radiator, there is an internal Radiator attribute called 
Timestamp added to each packet when it is received which contains the local 
time on the host on which Radiator is running.

In addition, there are some other definitons for Timestamp, such as when using 
GRIC roaming services, that add a Timestamp attribute to forwarded 
requests. 

As Dave says, the question really is what time do you need?.

If it is the local time on the local host, then it is most useful to use the 
Radiator Timestamp, because it has already been corrected to deal with any 
potential Acct-Delay-Time in the request. Again keep in mind that the radius 
protocol is UDP based, and packets can and do go missing, therefore 
accounting packets contain this mechanism to indicate how much of a delay 
there was between the actual event occuring and the transmission of the 
request.

regards

Hugh


On Thu, 25 Jul 2002 03:03, Dave Kitabjian wrote:
 Interesting question.

 The question for you is, what event do you want the stamp for?

 The Timestamp attribute indicates, I think, when the RADIUS packet is
 actually sent by the NAS.

 The line at the top:

   Wed Jul 24 12:59:01 2002
 Acct-Session-Id = 0002BAA0
   Framed-Protocol = PPP

 indicates when RADIATOR generated the record.

 Your 2nd Timestamp attribute might be when RADIATOR is acting like a NAS
 and proxying the packet to the next RADIUS server. In theory, that could
 be minutes or hours later.

 So, which of these events do you want to capture? You may want to write
 a hook to throw out preexisting Timestamp attributes before you proxy
 them over to the next RADIUS server...

 Dave

 :)
 :
  -Original Message-
  From: Viraj Alankar [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 24, 2002 9:36 AM
  To: [EMAIL PROTECTED]
  Subject: (RADIATOR) Timestamp attribute
 
 
  Hello,
 
  From what I can understand, the timestamp used in AuthSQL for
  accounting is the Timestamp attribute that is created in the
  request packet by the current time minus Acct-Delay-Time.
 
  However, when I have one Radiator proxying to another, the
  2nd Radiator ends up with 2 Timestamp different attributes.
  It isn't clear to me which one will be used by the 2nd
  Radiator. I see get_attr in the code being called for this
  value but wouldn't this just return the first (incorrect)
  Timestamp value?
 
  Would it be better for me to depend on a database function
  for the timestamp? For example, with an insert statement similar to:
 
  ..., now() - 0%{Acct-Delay-Time}, ...
 
  Viraj.
  ===

 ===
 Archive at http://www.open.com.au/archives/radiator/
 Announcements on [EMAIL PROTECTED]
 To unsubscribe, email '[EMAIL PROTECTED]' with
 'unsubscribe radiator' in the body of the message.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp attribute

2002-07-24 Thread Hugh Irvine


Hello Miko -

The Timestamp attribute is an internal Radiator attribute that is the local 
hosts time (in UNIX number of seconds since Jan 1, 1970).

The radius protocol itself has no notion of wall time - all times in radius 
are delta times in number of seconds.

From the Radiator 3.1 reference manual (search Timestamp):

The attribute Timestamp is always available for insertion, and is set to the 
time the packet was received, adjusted by Acct-Delay-Time (if present), as an 
integer number of seconds since Midnight Jan 1 1970 UTC. The Timestamp 
atttribute is added by Radiator to all received Accounting requests, and is 
set to the current time according to the host on which the Radiator is 
running.

regards

Hugh
 
On Thu, 25 Jul 2002 04:19, [EMAIL PROTECTED] wrote:
 I have a question along the same lines,,, What is the Timestamp
 Attribute??? I could only find a Timestamp in the Tunneling
 attributes...

 Miko

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Kitabjian
  Sent: Wednesday, July 24, 2002 10:03 AM
  To: Viraj Alankar; [EMAIL PROTECTED]
  Subject: RE: (RADIATOR) Timestamp attribute
 
 
  Interesting question.
 
  The question for you is, what event do you want the stamp for?
 
  The Timestamp attribute indicates, I think, when the RADIUS
  packet is actually sent by the NAS.
 
  The line at the top:
 
  Wed Jul 24 12:59:01 2002
Acct-Session-Id = 0002BAA0
  Framed-Protocol = PPP
 
  indicates when RADIATOR generated the record.
 
  Your 2nd Timestamp attribute might be when RADIATOR is acting
  like a NAS and proxying the packet to the next RADIUS server.
  In theory, that could be minutes or hours later.
 
  So, which of these events do you want to capture? You may
  want to write a hook to throw out preexisting Timestamp
  attributes before you proxy them over to the next RADIUS server...
 
  Dave
 
  :)
  :
   -Original Message-
   From: Viraj Alankar [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, July 24, 2002 9:36 AM
   To: [EMAIL PROTECTED]
   Subject: (RADIATOR) Timestamp attribute
  
  
   Hello,
  
   From what I can understand, the timestamp used in AuthSQL for
   accounting is the Timestamp attribute that is created in the
   request packet by the current time minus Acct-Delay-Time.
  
   However, when I have one Radiator proxying to another, the
   2nd Radiator ends up with 2 Timestamp different attributes.
   It isn't clear to me which one will be used by the 2nd
   Radiator. I see get_attr in the code being called for this
   value but wouldn't this just return the first (incorrect)
   Timestamp value?
  
   Would it be better for me to depend on a database function
   for the timestamp? For example, with an insert statement similar to:
  
   ..., now() - 0%{Acct-Delay-Time}, ...
  
   Viraj.
   ===
 
  ===
  Archive at http://www.open.com.au/archives/radiator/
  Announcements on [EMAIL PROTECTED]
  To unsubscribe, email '[EMAIL PROTECTED]' with
  'unsubscribe radiator' in the body of the message.

 ===
 Archive at http://www.open.com.au/archives/radiator/
 Announcements on [EMAIL PROTECTED]
 To unsubscribe, email '[EMAIL PROTECTED]' with
 'unsubscribe radiator' in the body of the message.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) timestamp ?

2001-05-30 Thread Hugh Irvine


Hello Chairarth -

You should set up the SQL database with a simple string field as the 
destination column (not a datetime field), because you just want to write 
the string as you describe below. Also, you should use the DateFormat 
statement together with the AcctColumnDef, something like this:

..
DateFormat %e %m %Y %T
..
AcctColumnDef DATESTRING, Timestamp, integer-date

Have a look at section 6.3 in the Radiator 2.18.1 reference manual.

regards

Hugh

On Wednesday 30 May 2001 18:00, chairarth wrote:

  Hi Hugh

 According to your suggestion , I 've add column name DATE to the RADUSAGE
 table and add this line below in configuration file

 AcctColumnDef DATE,Timestamp,integer-date

 After restart radiator and try to make a connection , I find that there are
 datetime value at DATE column at SQL Server. It's ok.But we want date
 format like  DD MM  HH24:MM:SS . So I edit AcctCoumnDef DATE as
 below.

 AcctColumnDef DATE,Timestamp,integer-date,to_date(’%e %m %Y %H:%M:%S’)

 Well, it's not work . In Radiator log file show error message

 Wed May 30 14:24:23 2001: ERR: do failed for 'insert into RADUSAGE
 (USERNAME, TIME_STAMP, ACCTSTATUSTYPE, ACCTSESSIONID, FRAMEDIPADDRESS,
 NASIDENTIFIER, DATE) values  ('test', 991207463, 1, '51012c24',
 '10.10.64.63', '10.10.0.2', 'to_date(30 05 2001 14:24:23)')':
 [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
 datetime from character string. (SQL-22008)(DBD: st_execute/SQLExecute
 err=-1)

 What should I do?

 Thanks
 Chairath
  

 Hugh Irvine wrote:
  Hello Chairath -
 
  Have a look at the radacct.cgi script in the main Radiator directory to
  see how it is done. Otherwise, you could add a column to the RADUSAGE
  table into which you could directly write the formatted date string when
  posting accounting records.
 
  hth
 
  Hugh
 
  On Wednesday 30 May 2001 12:06, chairarth wrote:
Hi ,
  
   By now we implement Radiator with Radmin .  Due to we don't wanna let
   dailup users access to Radmin to check their own usage time. And we
   have web server (implement on ASP Language) to serve our customers
   already . Therefore , we plan to let our users check usage time on this
   server . But  when we check at RADUSAGE Table , we found that  the
   value of TIME_STAMP is int ( e.g. 990781489) .
  
   So how can we write ASP Scripte to show value of TIME_STAMP like RAmin
   List Usage show ( e.g. 25/05/2001 16:04) .
  
   Thanks
   Chairath
 
  
  Content-Type: text/html; charset=us-ascii; name=Attachment: 1
  Content-Transfer-Encoding: 7bit
  Content-Description:
  
 
  --
  Radiator: the most portable, flexible and configurable RADIUS server
  anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
  -
  Nets: internetwork inventory and management - graphical, extensible,
  flexible with hardware, software, platform and database independence.


Content-Type: text/html; charset=iso-8859-1; name=Attachment: 1
Content-Transfer-Encoding: 8bit
Content-Description: 


-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) timestamp ?

2001-05-29 Thread Hugh Irvine


Hello Chairath -

Have a look at the radacct.cgi script in the main Radiator directory to see 
how it is done. Otherwise, you could add a column to the RADUSAGE table into 
which you could directly write the formatted date string when posting 
accounting records.

hth

Hugh

On Wednesday 30 May 2001 12:06, chairarth wrote:

  Hi ,

 By now we implement Radiator with Radmin .  Due to we don't wanna let
 dailup users access to Radmin to check their own usage time. And we have
 web server (implement on ASP Language) to serve our customers already .
 Therefore , we plan to let our users check usage time on this server .
 But  when we check at RADUSAGE Table , we found that  the value of
 TIME_STAMP is int ( e.g. 990781489) . 

 So how can we write ASP Scripte to show value of TIME_STAMP like RAmin
 List Usage show ( e.g. 25/05/2001 16:04) .

 Thanks
 Chairath


Content-Type: text/html; charset=us-ascii; name=Attachment: 1
Content-Transfer-Encoding: 7bit
Content-Description: 


-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp Formatting

2001-05-12 Thread Shon Stephens

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hugh, 
 Thanks for the tip. I guess I could keep it as the epoch.
Really, I just want to have a time format that can be understood by
my operators. I will probably just use perl or php to convert the
timestamp after it has been selected from the database. Also, this is
the format I insert the timestamp into the database in all the other
tables. Consistency and all.

Shon Stephens
[EMAIL PROTECTED]

- - Original Message - 
From: Hugh Irvine [EMAIL PROTECTED]
To: Shon Stephens [EMAIL PROTECTED]; Radiator Mailing
List [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 7:33 PM
Subject: Re: (RADIATOR) Timestamp Formatting


 
 Hello Shon -
 
 The Timestamp used inside Radiator is a numeric value representing
 the number  of seconds since the UNIX epoch (midnight January 1,
 1970) and is used for  calculations that expect this to be the
 case.
 
 You can add an additional field to the RADPOOL table if you wish
 and provide  your own queries which will write a formatted string
 in addition to the  standard Radiator fields.
 
 Just out of interest, why do you want to do this?
 
 regards
 
 Hugh
 
 
 On Saturday 12 May 2001 02:52, Shon Stephens wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  I am planning on using AddressAllocator SQL. In the RADPOOL
  table there is a TIME_STAMP field. Is this the time that the
  address was allocated? Can I use DateFormat to format this? If so
  how? If not, what can I do?
 
  Thanks,
  Shon Stephens
  [EMAIL PROTECTED]
 
  P.S. My PGP Public Key is available from either
  ldap://europe.keys.pgp.com or http://pgpkeys.mit.edu . You can
  download it and sign it if you like.
 
  -BEGIN PGP SIGNATURE-
  Version: PGPfreeware 7.0.3 for non-commercial use
  http://www.pgp.com 
 
  iQA/AwUBOvwYwUwGLkuD4lDdEQKc0ACg8jAv9KjhxF6c4o0F3y9lh9h5XkcAoK+Z
  Bnx0wP9aTid4nkK35PnscdZV
  =3eWc
  -END PGP SIGNATURE-
 
  ===
  Archive at http://www.open.com.au/archives/radiator/
  Announcements on [EMAIL PROTECTED]
  To unsubscribe, email '[EMAIL PROTECTED]' with
  'unsubscribe radiator' in the body of the message.
 
 -- 
 Radiator: the most portable, flexible and configurable RADIUS
 server  anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT,
 MacOS X. -
 Nets: internetwork inventory and management - graphical,
 extensible, flexible with hardware, software, platform and database
 independence. ===
 Archive at http://www.open.com.au/archives/radiator/
 Announcements on [EMAIL PROTECTED]
 To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBOv0lbUwGLkuD4lDdEQJxKgCeMWbvBPquL3c5GV2f9qP04/SVsdEAoI5k
xuIucXQxPDh7c6pEPwXJDvJh
=yg67
-END PGP SIGNATURE-

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp Formatting

2001-05-11 Thread Hugh Irvine


Hello Shon -

The Timestamp used inside Radiator is a numeric value representing the number 
of seconds since the UNIX epoch (midnight January 1, 1970) and is used for 
calculations that expect this to be the case.

You can add an additional field to the RADPOOL table if you wish and provide 
your own queries which will write a formatted string in addition to the 
standard Radiator fields.

Just out of interest, why do you want to do this?

regards

Hugh


On Saturday 12 May 2001 02:52, Shon Stephens wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 I am planning on using AddressAllocator SQL. In the RADPOOL table
 there is a TIME_STAMP field. Is this the time that the address was
 allocated? Can I use DateFormat to format this? If so how? If not,
 what can I do?

 Thanks,
 Shon Stephens
 [EMAIL PROTECTED]

 P.S. My PGP Public Key is available from either
 ldap://europe.keys.pgp.com or http://pgpkeys.mit.edu . You can
 download it and sign it if you like.

 -BEGIN PGP SIGNATURE-
 Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

 iQA/AwUBOvwYwUwGLkuD4lDdEQKc0ACg8jAv9KjhxF6c4o0F3y9lh9h5XkcAoK+Z
 Bnx0wP9aTid4nkK35PnscdZV
 =3eWc
 -END PGP SIGNATURE-

 ===
 Archive at http://www.open.com.au/archives/radiator/
 Announcements on [EMAIL PROTECTED]
 To unsubscribe, email '[EMAIL PROTECTED]' with
 'unsubscribe radiator' in the body of the message.

-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) TIMESTAMp

1999-08-09 Thread Rajesh Khator

Hi all,

I want to have the database have the current time when the user is
connected.What is the variable that stores the date field apart from
timestamp.


Rajesh


Get your own FREE, personal Netscape WebMail account today at 
http://webmail.netscape.com.

ÿ
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) Timestamp and mySQL datetime

1999-08-02 Thread David Booth



I collect stop records and insert into a mySQL table. I want a 
column for intime (type datetime) that should be:

intime = Timestamp - Acct-Session-TimeI'm using a temp 
table for the radius log and a mySQL INSERT to my table because when I try to 
insert with the calculation I get a lot of zero or empty entries.

Anyone have any experience with this kind of 
calculation?

David Booth
Goulburn Internet


Re: (RADIATOR) Timestamp and mySQL datetime

1999-08-02 Thread Lon R. Stockton, Jr.


On Tue, 3 Aug 1999, David Booth wrote:

 I collect stop records and insert into a mySQL table. I want a column for intime 
(type datetime) that should be:
 
 intime = Timestamp - Acct-Session-Time
 
 I'm using a temp table for the radius log and a mySQL INSERT to my table because 
when I try to insert with the calculation I get a lot of zero or empty entries.
 
 Anyone have any experience with this kind of calculation?


I just store the stop_time and the call_duration in our sql table; storing
the start_time as well would be redundant. Rather than performing the
calculation at insert time, I just calculate it at query time if I
need it.



===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp dictionary

1999-07-28 Thread Hugh Irvine


Hello Ricardo -

On Wed, 28 Jul 1999, Ricardo Kustner wrote:
 On 28-Jul-99 Hugh Irvine wrote:
 so what should/can i do about it?
 strangely, the timestamps added to the SQL accounting tables and
 SessionDatabase are *correct*...
  We have tested this here with no errors, so could you please send us your
  config file (no Secrets) and an extract of the corresponding Trace 4?
 
 well, it doesn't give any real errors on our system... I know Radiator gives
 warnings because it's not mentioned in the dictionary... so i want to add it to
 the dictionary manually but the number being used for Timestap (103) in the
 dictionary supplied with radiator conflicts with something already assigned by
 Ascend, as i mentioned in my previous email...
 But i do wonder who generates the timestamp then... I guess radiator creates
 it?
 

Yes, we think so - that's why we would like to check the config file, just to
verify our conclusions.

thanks

Hugh

--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsod


===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) Timestamp dictionary

1999-07-27 Thread Ricardo Kustner

Hi,

I'm almost finnished with setting up our radiator to handle accounting... 
It works really great, just another example of how powerful radiator is :)
(and our old accounting system doesnt even notice any difference because
radiator sends copies of the accounting requests!)

There's one little odd thing though... Radiator gives me these warnings in
de logfile:

Tue Jul 27 16:16:47 1999: WARNING: No such attribute Timestamp

when i look in the dictionary supplied with Radiator, i see the
Timestamp Attribute has nr. 103 :
ATTRIBUTE   Timestamp   103 integer

normally when i see something like this, i just add it to my ascend dictionary,
but the ascend dictionary has this:
#   Source Auth information (in connection of "authcode-" user profile)
#
ATTRIBUTE   Ascend-Source-Auth  103 string


so what should/can i do about it?
strangely, the timestamps added to the SQL accounting tables and
SessionDatabase are *correct*... 

Ricardo.
---
--
E-Mail: Ricardo Kustner [EMAIL PROTECTED]
Date: 27-Jul-99
Time: 16:13:52

This message was sent by XFMail
--

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) timestamp

1999-07-18 Thread Mike McCauley

Hi Ricardo,

On Jul 17,  2:57am, Ricardo Guerra wrote:
 Subject: (RADIATOR) timestamp
 Hi!
 when i use the timestamp conversion
 AcctColumnDef TIMESTAMP,Timestamp,formatted-date,to_date('%e %m %Y
 %H:%M:%S','DD MM  HH24:MI:SS')
 as defined on the radiusd.cfg to store the timestamp on an oracle
 database i only get the date and not the time, how can i fix it??
 here is a copy of the debug trace

 Sat Jul 17 02:38:02 1999: DEBUG: do query is: insert into ACCOUNTING
 (USERNAME, ACCTSTATUSTYPE, TIME_STAMP, TIMESTAMP,
 NASIDENTIFIER, NASPORT, ACCTSESSIONID)
 values
 ('mikem', 'Start', 932157481, to_date('17 07 1999
 02:38:01','DD MM  HH24:MI:SS'), '203.63.154.1', 1234, '1240')

 the timestamp is a date type field

Radiator is inserting the data correctly. I suspect that you are saying that
when you use sqlplus to look at the table, you are only seeing the date? Thats
because the default format for Oracle to display a date time column, is just
shows the date. If you want to see the time too, you have to use a special
conversion function.

Hope that helps.

Cheers.


-- 
Mike McCauley   [EMAIL PROTECTED]
Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985   Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8, 
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) timestamp

1999-07-16 Thread Ricardo Guerra

Hi!
when i use the timestamp conversion
AcctColumnDef TIMESTAMP,Timestamp,formatted-date,to_date('%e %m %Y
%H:%M:%S','DD MM  HH24:MI:SS')
as defined on the radiusd.cfg to store the timestamp on an oracle
database i only get the date and not the time, how can i fix it??
here is a copy of the debug trace

Sat Jul 17 02:38:02 1999: DEBUG: do query is: insert into ACCOUNTING
(USERNAME, ACCTSTATUSTYPE, TIME_STAMP, TIMESTAMP,
NASIDENTIFIER, NASPORT, ACCTSESSIONID)
values
('mikem', 'Start', 932157481, to_date('17 07 1999
02:38:01','DD MM  HH24:MI:SS'), '203.63.154.1', 1234, '1240')

the timestamp is a date type field




===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) Timestamp

1999-05-05 Thread Mike McCauley

Hi Anton,

The timestamp figure is in UTC, ie seconds since midnight Jan 1 1970 UTC.

The "May 5 17:45:02 1999" string is generated using localtime, and therefore
takes into account your local timezone. For example, when I convert 925886702
to localtime here, I get:

Wed May  5 16:45:02 Australia/Victoria 1999

which is 10 hours ahead of the UTC version you give (as expected for my
timezone).

I suspect that your timezone setting on the host machine is not correct,
irrespective of whether its showing tghe correct time. Else, the timezone
setting that Radiator process is running as is different to the one where you
are checking where the time is right (cant be more precise, as you dont mention
what sort of host machine you are running one)

Hope that helps.

Cheers.

On May 5,  5:56pm, Anton Sparrius wrote:
 Subject: (RADIATOR) Timestamp

 [ Attachment (text/plain): 986 bytes
   Character set: Windows-1252
   plain text ]
-- End of excerpt from Anton Sparrius


Ok, It's late and I am tired, so I'll ask instead of spending ages trying to
figure it out for my self.

In the details log file, a start/stop request has this entry :

May 5 17:45:02 1999
...
TimeStamp 925886702

According to my calculations, the timestamp works out to be 05-May-99
6:45:02 AM

I think I used to know why, but I can't remember what the reason was, but
timestamp was always 10 hours wrong.  Ie, using GMT time rather than Melb
time.  However, it's now an extra hour out, ie 11 hours behind.

The time on the NAS's and on the PC running Radiator are correct.

Any ideas???

Regards,

Anton Sparrius
Chief Operations Officer

-- 
Mike McCauley   [EMAIL PROTECTED]
Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985   Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8, 
NT, Rhapsody
===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



Re: (RADIATOR) timestamp

1999-03-02 Thread Mike McCauley

Hi Lon,
The bahaviour you are seeing is because the normal behaviour of
"integer-date" is to make an SQL date/time with 0 seconds.

Its this way to be compatible with some other more braindead SQLs.

If you are at Radiator Revision 2.13, look at the new formatted-date type in
AcctColumnDef, where you can build an SQL date in any format you like.

Hope that helps.

Cheers.


---
Mike McCauley [EMAIL PROTECTED]
Open System Consultants +61 3 9598 0985

Mike is travelling right now, and there may be delays
in our correspondence.
-Original Message-
From: Lon R. Stockton, Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, March 02, 1999 1:40 PM
Subject: (RADIATOR) timestamp



I've got radiator configged to only do auth stops, and to stash the
info with SQL. One of my colums is thus:

AcctColumnDef STOPTIME,Timestamp,integer-date

My database is PostgresSQL (running under Linux), and the column
is defined as 'STOPTIME timestamp not null'.

Everything is almost cool. I note that the timestamps recorded in
the database are always approximately equal to the timestamp I see
in the detail file (minus Acct-Delay-Time)...but the seconds are
'truncated', that is, the timestamp recorded always has the seconds
set to '00'.

I actually can live with it, but it's probably something blindingly
obvious that I should know...and one year hence, I'll probably be
ashamed I ever wrote this message, but I gotta know...what's going
on here? Resolution issue in postgres's implementation of timestamp?
Radiator? Me?



===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.



(RADIATOR) timestamp

1999-03-01 Thread Lon R. Stockton, Jr.


I've got radiator configged to only do auth stops, and to stash the
info with SQL. One of my colums is thus:

AcctColumnDef   STOPTIME,Timestamp,integer-date

My database is PostgresSQL (running under Linux), and the column
is defined as 'STOPTIME timestamp not null'.

Everything is almost cool. I note that the timestamps recorded in
the database are always approximately equal to the timestamp I see
in the detail file (minus Acct-Delay-Time)...but the seconds are
'truncated', that is, the timestamp recorded always has the seconds
set to '00'.

I actually can live with it, but it's probably something blindingly
obvious that I should know...and one year hence, I'll probably be
ashamed I ever wrote this message, but I gotta know...what's going
on here? Resolution issue in postgres's implementation of timestamp?
Radiator? Me?



===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.