Date: Sun, 27 Oct 2002 01:00:39 +0800 From: Eugene Grosbein <eugen@grosbein.pp.ru> To: freebsd-stable@FreeBSD.ORG Subject: Re: increasing MAXLINE for syslog Message-ID: <20021027010039.A228@grosbein.pp.ru> In-Reply-To: <200210261527.g9QFR3G9034511@lurza.secnetix.de>; from olli@secnetix.de on Sat, Oct 26, 2002 at 05:27:03PM %2B0200 References: <20021026224646.A362@grosbein.pp.ru> <200210261527.g9QFR3G9034511@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 26, 2002 at 05:27:03PM +0200, Oliver Fromme wrote: > Okay, looks good. > > The syslog(3) function (which is used for local logging > by logger(1)) opens a UNIX-domain socket to syslogd and > then send(2)s the message to it. The socket(2) manpage > says: > > A SOCK_DGRAM socket supports datagrams (connectionless, > unreliable messages of a fixed (typically small) maximum > length). > > And the send(2) manpage: > > If the message is too long to pass atomically through the > underlying protocol, the error EMSGSIZE is returned, and > the message is not transmitted. > > $ sysctl net.local.dgram.maxdgram > net.local.dgram.maxdgram: 2048 > > That would explain that there is a limit, although it is > 2 Kb, not 1 Kb ... At least on my machine here. Increasing net.local.dgram.maxdgram to 10240 doesn't help either :-( > BTW: > > - char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26]; > > + char *stdp, tbuf[MAXLINE], fmt_cpy[MAXLINE], timbuf[26]; > > Note that tbuf should be 1024 bytes larger than fmt_cpy, > to account for %m expansions in the message. Yes, but that's not a case. BTW, what is default size of send/receive socket buffer size that can be changed using SO_SNDBUF/SO_RVCBUF options of setsockopt() ? May this be the issue? Eugene Grosbein To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021027010039.A228>