Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie (2 days) needs help

Status
Not open for further replies.
Aug 25, 2002
4
GB
I apologise for asking this question coz I know with enough time I could solve it myself, but I need this project sorted very soon.

The problem I have is to analyse a radius log file, 1 particular field is causing me a lot of grief. The log file is a CSV file, I am reading the file into an array, the field I am interested in is the seession-time. The field is element 49 in the array and is 4 bytes in length, the 4th byte is the no of seconds, the 3rd byte is the no of seconds * 256 the 2nd byte is the no of seconds * 65536 etc... the field has the following format:

0x00 0x00 0x06 0x2e

The script I have written seems to have a problem reading the 50th field; element 49 in the array.

My questions are
1. Does anybody have a snippet of code that will point me in the right direction.

2. Has anybody else written a script to analyse a Radius log file.

I can supply some "sanitised" data files if anybody is willing to collabarate on writing a log analysis script for this type of log file.

If this query is off topic I am apologise, and request a gentle prod into the correct forum.


TIA


Graham




 
Perhaps you can post the relevant part of your script with an explaination of why it isn't working and how it should work. I have no experience with Radius log files but I or someone else can probably help you with the Perl part of it.

jaa
 
Thanks for that justice41, I have done a little further digging since I posted the original request, the problem turned out to be the way split was handling multiple seperators, there were in fact two spaces between each field, I substituted one space for each of the double spaces before splitting and hey presto it worked!

Thanks for the offer of assistance I may take you up on it at a later date ;)

Graham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top