Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2002 13:57:56 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Konrad Heuer <kheuer@gwdg.de>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: lpd & filter stderr & log files
Message-ID:  <p05101403b893034f8043@[128.113.24.47]>
In-Reply-To: <20020215145241.T36923-100000@gwdu60.gwdg.de>
References:  <20020215145241.T36923-100000@gwdu60.gwdg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
At 3:16 PM +0100 2/15/02, Konrad Heuer wrote:
>Unfortunately, some changes in the lpd code that happened last year
>(as far as I remember) are very disadvantageous for the operation
>of our (heavily loaded) printer server which is based on FreeBSD
>for years now.

Well, I'm willing to see what we can do to help you out.

>Prior to the changes, we could observe the progress of print jobs
>by a `tail -f /var/log/lpd-err/queue_log_file'. Now, all information
>written by the filter programs to stderr gets catched by temporary
>log files the names of which are created randomly. After a print
>job has completed, the contents of the temporary file is appended
>to the queue log file.

Hmm.  I suspect that any change there is more than a year old.  We
did change how the temporary-files were generated, but I think lpd
has used temporary files for stderr for a long time.

>For our purposes, that's often too late. Why have these changes
>been made?  And can the old behaviour be restored?

I think the reason it's done this way (with the temporary files) is
so multiple queues could point to a single log file, and so all the
lines for any one job would be added onto that log file in one shot.

I think there's a number of other reasons too.  A quick look at
the history for lpd/printjob.c seems to indicate that it has
always behaved this way (or at least, it was always the *intention*
that it behave this way, perhaps there were some bugs fixed).

>We really would like to see what happens during printing a job
>(imagine a 300 mb postscript print job which may a lot of time
>to execute completely).

Well, here we see 1-gig postscript files going to our plotters, so
it's pretty easy for me to imagine a 300-meg one...   :-)

It's obvious that you just changed to a new version of lpr.  Did
you also change any of your scripts?  In some of my scripts, what
I do is:

    exec 2>>$LPD_LOG_dir/$pname/log

This causes the *script* to redirect stderr to where I want it.
Would that work in your situation?

-- 
Garance Alistair Drosehn            =   gad@eclipse.acs.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05101403b893034f8043>