From owner-freebsd-stable Mon Dec 10 11: 3:59 2001 Delivered-To: freebsd-stable@freebsd.org Received: from manager.sendoutmail.com (manager.sendoutmail.com [207.241.66.202]) by hub.freebsd.org (Postfix) with ESMTP id 95ACE37B417 for ; Mon, 10 Dec 2001 11:03:51 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by manager.sendoutmail.com (Postfix) with SMTP id 8D8EB3BB384 for ; Mon, 10 Dec 2001 13:02:57 -0600 (CST) From: "Vlad Marchenko" To: Subject: syslog lose lines in log Message-Id: <20011210190257.8D8EB3BB384@manager.sendoutmail.com> Date: Mon, 10 Dec 2001 13:02:57 -0600 (CST) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Need advise on my problem. I have mail application that sends a lot of lines to MAIL log: 100+ lines per second. Since we have stats based on analyzing maillog, it's important for us to have ALL lines. I noticed that under that load, syslog lose at least 30-40% of all lines. Digging the situation I found that it happens because DGRAM kind of socket used for delivering messages to syslogd by syslog(3). OK, I've installed /usr/ports/system/syslog-ng that supports STREAM unix sockets, and patched /usr/src/lib/libc/gen/syslog.c to have SOCK_STREAM type of socket when opening socket in function connectlog(): static void connectlog() { struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */ if (LogFile == -1) { if ((LogFile = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) return; (void)_fcntl(LogFile, F_SETFD, 1); } .... BUT IT STILL LOSES LINES!!! Guys, any ideas? p.s. the same application DOESNT lose lines to /var/log/maillog when I run it on linux p.p.s. system is FreeBSD 4.4-STABLE, all system settings (like max open files, mbufs, etc) are ok... at least nothing in /var/log/messages Thanks in advance. -- Best Regards, Vlad Marchenko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message