Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Counting concurrent event jobs

by mantadin (Beadle)
on Apr 24, 2006 at 18:05 UTC ( [id://545339]=note: print w/replies, xml ) Need Help??


in reply to Re: Counting concurrent event jobs
in thread Counting concurrent event jobs

In that case, your script would print out the results for each time interval and then go on to evaluate the next lines of the logfiles, like this:

while(<>) { $timestring = $_ =~ $some_regexp; $min = &get_nr_of_mins ($timestring); if(/start:/) { /split/ and ++$split; /filter/ and ++$filter; } elsif(/finish:/) { /split/ and --$split; /filter/ and --$filter; } if($min % $granularity == 0) { print "$time: $split, $filter\n"; } }

(note, that this gives you the number of processes at the time of the last line eaten from the logfile, not an average value for the last interval).

OTOH, if you want to do more sophisticated analysis of the logfile, this approach might be too simple.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://545339]
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-20 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found