From owner-freebsd-hackers Fri Feb 15 10:58:39 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 5FDFA37B41D for ; Fri, 15 Feb 2002 10:58:00 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id g1FIvv4140550; Fri, 15 Feb 2002 13:57:57 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020215145241.T36923-100000@gwdu60.gwdg.de> References: <20020215145241.T36923-100000@gwdu60.gwdg.de> Date: Fri, 15 Feb 2002 13:57:56 -0500 To: Konrad Heuer , freebsd-hackers@FreeBSD.ORG From: Garance A Drosihn Subject: Re: lpd & filter stderr & log files Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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