relaxed137 has asked for the wisdom of the Perl Monks concerning the following question:
Here's my current code for doing this.
Output example:perl -n -a -F\\\| -e'END { print "$v\t$k\n" while($k,$v)=each%h} $h{$F +[9]}++' FILENAME
57 10.104.52.165
299 10.100.85.172
( ... )
811 10.100.94.146
737 10.128.145.15
My most recent parse of this file came up with 350 unique IP addresses with anywhere from 1 to 57000 occurances.
The time to do this parse on a server I use was:
real 19m12.03s
user 17m38.42s
sys 0m7.87s
So, my question is - Can anyone out there help me make this even faster?
I know that I'm at the mercy of the CPU cycles, etc, but maybe there *is* a way to cut a few minutes off of this report.
As a note, I cannot use "cut -f10 -d| | sort | uniq -c" because the file is too big for sort to handle.
Thanks
'relaxed137'
|
|---|