
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Apache: Logging: how-to pipe logs or logtoanothermachine(was Disk
>>>>> "BR" == Bruno Raoult <br@example.com> writes:
BR> On Sun, 2002-09-08 at 16:29, Jean-Christian Imbeault wrote:
>> >From: Viktor Pavlenko <vvp@example.com>
>> >
>> > JC> BTW how can I find out the size of BUFSIZE?
>> >
>> > From gzip sources :)
>>
>> Yuck :)
>>
>> [...]
BR> 110 tschai br> cat a.c
BR> #include <stdio.h>
BR> main() { printf("%d\n", BUFSIZ); }
BR> 111 tschai br> make a
BR> cc a.c -o a
BR> 112 tschai br> ./a
BR> 8192
A small experiment. Run this from one terminal (sorry for the long
line):
$ perl -e 'select(STDOUT); $|=1; for (0..1000000) { print 1; sleep 1 && system("ls -l t.gz >> t") unless $_ % 200000; }' | gzip - > t.gz
And watch content of file t with tail -f from another. (You may need
to remove a couple of zeros above, my machine is very fast:) This is
what I see:
$ tail -f t
-rw-rw-r-- 1 vik vik 0 Sep 8 10:51 t.gz
-rw-rw-r-- 1 vik vik 0 Sep 8 10:51 t.gz
-rw-rw-r-- 1 vik vik 0 Sep 8 10:51 t.gz
Any ideas why?
Viktor
Home |
Main Index |
Thread Index