in reply to dumping hashes to pcap files
* Did you test how many open files you can have simultaneously? Maybe it is enough for you to just dump to the files directly, maybe it can be extended until it is enough. If you store everything in a hash you have to think about the memory limit. Do all the PCAP files fit into memory? If not, maybe you have to write to file inbetween whenever memory is nearly full.
* I don't get why you would use random keys for the hash. If you use random keys you might as well use a simple array where the array index is the not-that-random "key". I'm talking about %sip, that should be @sip instead (or removed completely, see below)
* What you do in your final step (when there is already a key $callid in main_has) is not working. Whenever you do "$main_hash{$callid} = {increase() => $value}", you are overwriting aka initializing the previous hash there with a new hash, not adding a value! The right form would be "$main_hash{$callid}{increase()}= $value"
* I don't see any reason why you do that inserting into $main_hash in two steps? Why not add to the main_hash in process_sip itself instead of using the extraneous %sip hash
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: dumping hashes to pcap files
by bigmoose (Acolyte) on Dec 19, 2011 at 12:38 UTC | |
by jethro (Monsignor) on Dec 19, 2011 at 14:41 UTC | |
by bigmoose (Acolyte) on Dec 19, 2011 at 15:35 UTC | |
|
Re^2: dumping hashes to pcap files
by bigmoose (Acolyte) on Dec 19, 2011 at 13:15 UTC |