Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jjohn (22)

  (email not shown publicly)
AOL IM: taskboy3000 (Add Buddy, Send Message)

Perl hack/Linux buff/OSS junkie.

Journal of jjohn (22)

Monday July 07, 2003
04:42 PM

Who listens to my music?

[ #13310 ]

Long-time readers of this journal will note that I record my own music. I don't get a lot of feedback on this forum about my music and, really, why would I? Since I'm on vacation, have a internet connection and a lot of time to kill, I decided to grep through the apache logs of taskboy and see who, if anyone else, is listening to my music.

The results surprised me.

Here are the hostnames/IP addresses of my "fans". Some of them are clearly robots (which is expected since I use a lot of synth vox). Others a personal friends whom I badger into listening to my stuff. The rest are complete strangers. The number to the right indicates the number of time that host has downloaded mp3 files from taskboy.   7
              9   9   9
             10  10  12  12
              14  16
              17  18  18  18  21  22
        22  25  26
          26  28  29  29
  45  59 438

It appears I'm big in Germany, a nation known for their love of irony and a strong, driving beat. Also notice that is way into my stuff and who can blame them?

Here's the one-liner I used to extract this information from my 25M access log:

bash-2.03$ cat access.log | grep "mp3" | perl -MSocket -lane '$ip{$F[0]}++; END{ for(sort{$ip{$a} <=> $ip{$b}} keys %ip){ next if $ip{$_} < 5; printf "%15s %3d\n", (gethostbyaddr(inet_aton($_), AF_INET) || $_), $ip{$_}}}'

Yes, I know that one-arg cat(1) is evil, but it works.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.