From: Eray Aslan <eray.aslan@caf.com.tr>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] strange cron messages...
Date: Mon, 16 Nov 2009 09:05:18 +0200 [thread overview]
Message-ID: <4B00F9AE.8010209@caf.com.tr> (raw)
In-Reply-To: <200911151145.28867.michaelkintzios@gmail.com>
On 15.11.2009 13:45, Mick wrote:
> On Saturday 14 November 2009 16:53:24 Alex Schuster wrote:
>> I assume you are using logrotate, and have the /etc/logrotate.d/kernel
>> file? I guess the 'compytruncate' is misspelled and should be
>> 'copytruncate'. And 'endscript' is used after using 'prerotate' or
>> 'postrotate', which you probably do not have.
>>
>> Something like that, I never used logrotate by myself. See the man page
>> for more information.
>
> Hmm ... how do you keep your log files under control?
Use time-based file names. For syslog-ng something like:
destination mail {
file("/var/log/mail/$YEAR/$MONTH/$DAY/$HOUR"
template("$ISODATE $HOST $MSG\n") template_escape(no)
owner("root") group("log") perm(0640)
dir_owner("root") dir_group("log")
dir_perm(02750) create_dirs(yes));
};
destination msgs {
file("/var/log/msgs/$YEAR/$MONTH/$DAY/$HOUR"
template("$ISODATE $HOST $MSG\n") template_escape(no)
owner("root") group("log") perm(0640)
dir_owner("root") dir_group("log")
dir_perm(02750) create_dirs(yes));
};
source local { unix-dgram("/dev/log"); pipe("/proc/kmsg");
internal(); };
filter mail { facility(mail); };
filter notmail { not facility(mail); };
log { source(local); filter(mail); destination(mail); };
log { source(local); filter(notmail); destination(msgs); };
Important points:
- "unix-dgram" is good
- Use template() to determine the format
- No need to logrotate with time based filenames. Hence, no need to
"kill -HUP" the syslog daemon. No missed logs.
- Easier to get the log files to a central server with time based
filenames.
- "log" group is for transfering the log files to a central server
--
Eray
next prev parent reply other threads:[~2009-11-16 8:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 14:01 [gentoo-user] strange cron messages Jarry
2009-11-14 16:53 ` Alex Schuster
2009-11-15 11:45 ` Mick
2009-11-16 7:05 ` Eray Aslan [this message]
2009-11-16 8:08 ` Graham Murray
2009-11-16 11:10 ` Eray Aslan
2009-11-16 12:46 ` Neil Bothwick
2009-11-16 15:55 ` Eray Aslan
2009-11-16 18:04 ` Alan McKinnon
2009-11-17 8:59 ` Neil Bothwick
2009-11-17 12:08 ` Eray Aslan
2009-11-17 12:43 ` Alan McKinnon
2009-11-17 15:08 ` Neil Bothwick
2009-11-17 15:25 ` Eray Aslan
2009-11-17 16:08 ` Neil Bothwick
2009-11-17 16:14 ` Alan McKinnon
2009-11-16 17:38 ` Alex Schuster
2009-11-16 17:56 ` Jarry
2009-11-16 18:47 ` Alex Schuster
2009-11-16 20:09 ` Neil Walker
2009-11-16 22:14 ` Alan McKinnon
2009-11-17 2:35 ` Neil Walker
2009-11-17 8:32 ` Alan McKinnon
2009-11-16 22:31 ` Alex Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B00F9AE.8010209@caf.com.tr \
--to=eray.aslan@caf.com.tr \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox