You are not logged in.

#1 2005-07-26 00:58:19

soloport
Member
Registered: 2005-03-01
Posts: 442

Get rid of "STATS: dropped 0" in syslog.log

Do the following lines from /var/log/syslog.log look familiar?

Jul 23 06:58:27 hostname syslog-ng[2419]: STATS: dropped 0
Jul 23 07:08:27 hostname syslog-ng[2419]: STATS: dropped 0
Jul 23 07:18:27 hostname syslog-ng[2419]: STATS: dropped 0
Jul 23 07:28:28 hostname syslog-ng[2419]: STATS: dropped 0
Jul 23 07:38:28 hostname syslog-ng[2419]: STATS: dropped 0

If you're tired of your log files filling up with this useless information, here's a solution.  In /etc/syslog-ng/syslog-ng.conf make the following changes:

options {
  # add this so STATS occurs every hour instead of every 10 min.
  stats (3600);
  ...
}

# add a destination to null
destination null { file("null"); };

# filter for the above lines
filter f_STATSdropped { match("STATS: dropped 0"); };

# send those space-wasting lines to oblivion
log { source(src); filter (f_STATSdropped); destination(null); };

Now add a weekly cron job:

cat > /etc/cron.weekly/syslog-ng <<EOF
#!/bin/bash
echo "" > /var/log/null
EOF
chmod 755 /etc/cron.weekly/syslog-ng

(I though Unix was supposed to be "silent unless there is something important to tell" roll )

[Edit] Changed file(/dev/null) to file(null) and added job to /etc/cron.weekly

Offline

#2 2007-05-30 02:03:48

judfilm
Member
Registered: 2004-02-12
Posts: 229

Re: Get rid of "STATS: dropped 0" in syslog.log

Is this still needed for a new installation with Duke.iso?

Offline

#3 2007-05-30 02:43:55

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Get rid of "STATS: dropped 0" in syslog.log

Yes, syslog-ng still has the same configuration.

I just used "stats (0);" and made the messages stop entirely. No need for fancy redirection, that one line will handle it all.

Offline

Board footer

Powered by FluxBB