Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Suspect FH issues

by McA (Priest)
on Oct 23, 2014 at 07:55 UTC ( [id://1104743]=note: print w/replies, xml ) Need Help??


in reply to Suspect FH issues

Hi,

in this case it would be good to have an example file of your logs to be able to see what you want to do and where the problem is.

But, if I understand the intent of the program right you have a certain pattern to identify session starts and you have a certain pattern to identify session continuation entries. Why don't you do it in one rush?

It seems that you can always identify a line by a session id. As soon as you hit a line you decide whether it's a session start or session cont line. If it's a session start you do somthing like:

my %sessions; $sessions{$id}->{'start'}->{'line'} = $lineno; $sessions{$id}->{'start'}->{'timestamp'} = $timestamp;

For every cont entry you do the following:

$sessions{$id}->{'last'}->{'line'} = $lineno; $sessions{$id}->{'last'}->{'timestamp'} = $timestamp;

assuming that the timestamps in the log file a monotonous rising. In the end you have a hash %sessions where every key is a session-id and with the value hash you can do all calculations you want.

Am I wrong in my assumptions?

Regards
McA

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1104743]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-25 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found