Displaying 1 result from an estimated 1 matches for "testfileopen".
2008 Nov 27
0
OT: Testing copytruncate
...start, I have written a quick script to create values in a file at
high rate.
#!/usr/bin/perl
open FILE, ">testdata" or die $!;
for (my $i = 1; $i <= 10000000; $i++){
print FILE "$i\n";
# sleep 1;
}
close FILE
and a logrotate.conf file that rotates the file
/home/blah/testfileopen/testdata {
copytruncate
daily
rotate 2
size=10M
}
It works but the copy truncate messes up the file the application is
writing to... or it might be my simplistic perl script. I can't to a
head on the testdata file. A hexdump reveals some strange errors which I
believe is the ca...