(RADIATOR) Problem with Timestamp and DateFormat
Hugh Irvine
hugh at open.com.au
Sun May 30 18:50:52 CDT 2004
Hello Herman -
The Radiator "Timestamp" is the *nix number of seconds since 1/1/1970
and is the time on the local host running Radiator. For accounting
packets there is a correction for any non-zero Acct-Delay-Time. In
other words, the Timestamp is corrected to be the time that the event
occured on the NAS.
From section 6.28.14 of the Radiator 3.9 reference manual
("doc/ref.html"):
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.
It would be helpful if you could send me a trace 4 debug from Radiator
showing what is happening, together with the contents of the
corresponding database columns showing the problem you are describing.
regards
Hugh
On 31 May 2004, at 04:32, Herman verschooten wrote:
> Hi,
>
> I seem to be having a problem with the way time is handled in
> Radiator... My Calls-table is a remnant of an earlier
> RadiusNT-installation, and has a CallDate-field which is a
> datetime-value. My online-table uses a numeric field to contain the
> timestamp. I assumed that adding 1/1/1970 to this timestamp would give
> me the same datetime as the one inserted in the calls table. But that
> does not seem to be right, the datetime is adjusted to my timezone, but
> the other timestamp seems to be GMT is this true or have I made a
> mistake somewhere?
>
> Tx,
>
> Herman
>
> Relevant pieces of my config-file.
>
> <Handler>
> AcctLogFileName %L/%Y%m%d.log
> AuthByPolicy ContinueWhileAccept
> SessionDatabase ADSL
> <AuthBy SQL>
> DBSource dbi:ODBC:xxx
> DBUsername xxxxxx
> DBAuth xxxxxxx
> # Accounting
> DateFormat %b %e, %Y %H:%M:%S
> AccountingTable Calls
> AcctColumnDef NASIdentifier,NAS-Identifier
> AcctColumnDef NASIdentifier,NAS-IP-Address
> AcctColumnDef NASPort,NAS-Port,integer
> AcctColumnDef AcctSessionId,Acct-Session-Id
> AcctColumnDef AcctStatusType,Acct-Status-Type,integer
> AcctColumnDef CallDate,Timestamp,integer-date
> AcctColumnDef UserName,User-Name
> AcctColumnDef AcctDelayTime,Acct-Delay-Time,integer
> AcctColumnDef AcctSessionTime,Acct-Session-Time,integer
> AcctColumnDef FramedAddress,Framed-IP-Address
> AcctColumnDef AcctTerminateCause,Acct-Terminate-Cause,integer
> AcctColumnDef ConnectInfo,Connect-Info,string
> AcctColumnDef CallerID,Calling-Station-Id,string
> AcctColumnDef AcctInputOctets,Acct-Input-Octets,integer
> AcctColumnDef AcctOutputOctets,Acct-Output-Octets,integer
> AcctColumnDef AcctInputOctets,RB-Acct-Input-Octets-64,integer
> AcctColumnDef AcctOutputOctets,RB-Acct-Output-Octets-64,integer
> </AuthBy>
> </Handler>
>
> <SessionDatabase SQL>
> Identifier ADSL
> DBSource dbi:ODBC:xxx
> DBUsername xxxxxxx
> DBAuth xxxxxxx
> AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT,
> ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE,
> CALLERID, INPUTOCTETS, OUTPUTOCTETS, SESSIONTIME) values ('%n','%N',
> 0%{NAS-Port}, '%{Acct-Session-Id}', %{Timestamp},
> '%{Framed-IP-Address}', '%{NAS-Port-Type}','%{Service-Type}',
> '%{Calling-Station-Id}',0%{Acct-Input-Octets},0%{Acct-Output-
> Octets},0%{
> Acct-Session-Time})
> </SessionDatabase>
>
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
>
>
NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list