the large file challenge
Sannyasin Sivakatirswami
katir at hindu.org
Sat Nov 9 23:25:01 EST 2002
Om Sadhunathan:
Excellent! i had been thinking that we should probably save access logs
from our servers in honolulu, but then parsing those was a blind spot.
This will help immensely.
Now, do i read this to say that there were 17,338 attempts to look at
Mystic Mouse PDF's ? and if so, over what period of time? A small
addtion to the script and we could determine if the download was
completed. (204, i think... or may be 304?)
On Saturday, November 9, 2002, at 03:17 PM, Sadhunathan Nadesan wrote:
> metacard
> Sat Nov 9 16:52:09 PST 2002
> 17338
> Sat Nov 9 16:54:28 PST 2002
> .....
>
>
>
> So that is 1:53 for bash, 2:04 for pascal, and 2:19 for MC. darn good!
>
> Here's the code, gott go...
>
>
> #!/usr/local/bin/mc
> on startup
> put 0 into the_counter
> put 1 into the_offset
> put 333491183 into file_size
> put 30000 into the_increment
> put "/gig/tmp/log/access_log" into the_file
>
> open file the_file for read
>
> repeat until (the_offset >= file_size)
> read from file the_file at the_offset for the_increment
> put it into the_text
> repeat for each line this_line in the_text
> get offset("mystic_mouse", this_line)
> if (it is not 0) then add 1 to the_counter
> end repeat
> add the_increment to the_offset
> end repeat
>
> put the_counter
> end startup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 10630 bytes
Desc: not available
Url : http://lists.runrev.com/pipermail/metacard/attachments/20021109/09967362/attachment.bin
More information about the metacard
mailing list