[RC5-PROXYPER] Trimming log-files...

Dirk Kuypers dk at comnets.rwth-aachen.de
Fri Dec 5 10:12:29 EST 1997

On Thu, 4 Dec 1997, David Kelly wrote:

Hi again,

> Dirk Kuypers writes:
> > 
> > thanks for the info. The problem seems to be that ls -l and quota give
> > different results now about the file space I use;-). ls insists about
> > the file being now about 14 MB, while quota has dropped those 13 MB.
> > Now I have again some time till I have to trim the files again.
> Now wait one second, just what log file are we talking about? Are you 
> trying to rotate a file generated by redirecting the proxy's stdout to 
> a file? Or are you attempting to rotate the proxy's logfile?

sorry, I should have clarified this: Of course I am talking about the 
redirected STDOUT. The keylog-files are parsed under


> The FreeBSD proxyper automatically rotates the log at 0000 GMT. A few 
> minutes past I use cron to gzip that log and move to another directory.

So you mean the keylog-files where statistics are made about who finished 
which block when under what OS and so on, don't you. I think I will have 
to gzip them, too. But first I have to learn a bit more perl to read in a 
gzipped file and split the data by emails;-)

> But what you seem to be describing is a case where you are attempting 
> to rotate, pluck off the tail for saving, and delete the rest. If you 
> attempt to do that to a file which a process has open, you will not 
> release the disk space until the file is closed. Under FreeBSD, "fstat" 
> will show you the processes that have a file open. SGI Irix uses 
> "fuser", and "lsof" is a widely available utility to do the same.

Yes, I think normally I would have to send a HUP to the proxy before 
doing so, but because I started it by using 'nohup rc5proxy' it is immune 

I tried it again now. Here is what I get before the trimming:

13 [hera] dk> du -s .
62549   .
14 [hera] dk> df .
Filesystem         1024-blocks  Used Available Capacity Mounted on
                     1042600  605232   437368     58%   /home/dk

That's after the trimming:

21 [hera] proxy> df .
Filesystem         1024-blocks  Used Available Capacity Mounted on
                     1042600  603560   439040     58%   /home/dk
24 [hera] dk> du -s
60899   .

So the file space seems to be freed, although ls -l gives

-rw-------   1 dk       AEG      15129397 Dec  5 09:58 nohup.out

Maybe the messages which are now written to STDOUT should go to a
specified log-file in future which is also automatically rotated at 0:00
every day, to make trimming or deleting easier. STDOUT could then be used
for more the really important messages. Or a verbosity switch which 
implements different levels of talking to STDOUT could be a feature of 
the next version.

To unsubcribe, send 'unsubscribe rc5-proxyper' to majordomo at llamas.net
rc5-proxyper-digest subscribers replace rc5-proxyper with rc5-proxyper-digest

More information about the proxyper mailing list