Thread View: news.software.nntp
5 messages
5 total messages
Started by Don Lewis
Tue, 12 Nov 1996 00:00
stderr output from INN channel feeds
Author: Don Lewis
Date: Tue, 12 Nov 1996 00:00
Date: Tue, 12 Nov 1996 00:00
18 lines
1329 bytes
1329 bytes
When a channel feed is started, it's stdout and stderr are directed to the INN errlog file. This file is rotated and compressed by news.daily, and unless the channel feeds are restarted, their error output will disappear into the old unlinked file which will continue to grow, possibly consuming all the free space on the partition where it lives. Other than restarting all the channel feeds when the logfiles are rotated or piping stderr into another process that understands the logfile rotation, I can't think of a good solution to this problem. Any brainy ideas? -- Don "Truck" Lewis TDK Semiconductor Internet: Don.Lewis@tsc.tdk.com 138 New Mohawk Road Phone: +1 916 478-8284 FAX: +1 916 478-8251 Nevada City, CA 95959
Re: stderr output from INN channel feeds
Author: Rich Salz
Date: Fri, 15 Nov 1996 00:00
Date: Fri, 15 Nov 1996 00:00
25 lines
1508 bytes
1508 bytes
In <56b0q5$m19@sunrise.gv.ssi1.com> gdonl@tsc.tdk.com (Don Lewis) writes: >When a channel feed is started, it's stdout and stderr are directed >to the INN errlog file. This file is rotated and compressed by news.daily, >and unless the channel feeds are restarted, their error output will >disappear into the old unlinked file which will continue to grow, possibly >consuming all the free space on the partition where it lives. Wow. I never thought of that. I guess I always just assumed that channel feeds would be silent, or only output via sysog. But even then it's an fd 'leak'. I suppose the quickest thing to do is write a wrapper script like this: #! /bn/sh exec <dev/null >/path/to/logs/chann.stdout 2>/path/to/logs/chan.stderr shift exec $* And then in newsfeeds put this script in front of the commandline for all channel feeds. I think the only thing innd can do is redirect stdin/stdout/stderr *all* to /dev/null. /r$
Re: stderr output from INN channel feeds
Author: USENET news
Date: Sun, 17 Nov 1996 00:00
Date: Sun, 17 Nov 1996 00:00
34 lines
2182 bytes
2182 bytes
In article <56i5hn$mh4@paperboy.osf.org>, Rich Salz <rsalz@osf.org> wrote:
>In <56b0q5$m19@sunrise.gv.ssi1.com> gdonl@tsc.tdk.com (Don Lewis) writes:
>>When a channel feed is started, it's stdout and stderr are directed
>>to the INN errlog file. This file is rotated and compressed by news.daily,
>>and unless the channel feeds are restarted, their error output will
>>disappear into the old unlinked file which will continue to grow, possibly
>>consuming all the free space on the partition where it lives.
>
>Wow. I never thought of that. ...
>...
>I suppose the quickest thing to do is write a wrapper script like this:
>...
>And then in newsfeeds put this script in front of the commandline for
>all channel feeds.
>
>I think the only thing innd can do is redirect stdin/stdout/stderr *all*
>to /dev/null.
How about if "ctlinnd flushlogs" also flushed all feeds (or all channel
feeds), as a fix for INN 1.5b3 and beyond? And for existing servers, amend
scanlogs (local modification) to do "ctlinnd flush ''" (or more specific
flushes for channel feeds only) at a point where restarted channel feeds
will find the new log (rather than opening the old one because it still
exists!). This assumes that channel feeds will always terminate reasonably
promptly when their stdin yields end-of-file, but it seems like the cleanest
approach!
John Line
--
Cambridge University Computing Service - USENET news manager. Usually John Line
newsmaster@ucs.cam.ac.uk (alias {newsmaster,news,usenet}@news.cam.ac.uk)
Re: stderr output from INN channel feeds
Author: Joe Greco
Date: Sun, 17 Nov 1996 00:00
Date: Sun, 17 Nov 1996 00:00
13 lines
900 bytes
900 bytes
In article <56i5hn$mh4@paperboy.osf.org>, Rich Salz <rsalz@osf.org> wrote: >I think the only thing innd can do is redirect stdin/stdout/stderr *all* >to /dev/null. Hey, this could very well be the solution to the continuous growth of Usenet :-) I like it... "Why didn't _I_ think of that?" ... JG
Re: stderr output from INN channel feeds
Author: Don Lewis
Date: Sun, 17 Nov 1996 00:00
Date: Sun, 17 Nov 1996 00:00
39 lines
2310 bytes
2310 bytes
In article <56i5hn$mh4@paperboy.osf.org>, Rich Salz <rsalz@osf.org> wrote: >In <56b0q5$m19@sunrise.gv.ssi1.com> gdonl@tsc.tdk.com (Don Lewis) writes: >>When a channel feed is started, it's stdout and stderr are directed >>to the INN errlog file. This file is rotated and compressed by news.daily, >>and unless the channel feeds are restarted, their error output will >>disappear into the old unlinked file which will continue to grow, possibly >>consuming all the free space on the partition where it lives. > >Wow. I never thought of that. I guess I always just assumed that channel >feeds would be silent, or only output via sysog. But even then it's an >fd 'leak'. nntplink and a bunch of the programs in inn/backends contain "fprintf(stderr, ...)". You could also be using a script that might write to stdout/stderr under unusual circumstances. >I suppose the quickest thing to do is write a wrapper script like this: > #! /bn/sh > exec <dev/null >/path/to/logs/chann.stdout 2>/path/to/logs/chan.stderr > shift > exec $* >And then in newsfeeds put this script in front of the commandline for >all channel feeds. This still has a similar problem, there is no way for the log files to be rotated. Instead the process output could be piped into "logger -p news.whatever". >I think the only thing innd can do is redirect stdin/stdout/stderr *all* >to /dev/null. Redirecting stdin of a channel feed to /dev/null makes it pretty useless ;-) -- Don "Truck" Lewis TDK Semiconductor Internet: Don.Lewis@tsc.tdk.com 138 New Mohawk Road Phone: +1 916 478-8284 FAX: +1 916 478-8251 Nevada City, CA 95959
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads