I'm trying to capture messages that are logged at a specific facility (kern) to a specific kernel.log file. Below are my definitions source kernel_file { file("/proc/kmsg"); }; destination kernel { file("/var/kernel/kernel.log");}; filter kern {facility(kern);}; log { source(kernel_file); filter(kern); destination(kernel);}; log { source(internal_src); filter(kern); destination(kernel);}; log { source(stream); filter(kern); destination(kernel);}; log { source(udp_src); filter(kern); destination(kernel);}; When I issue the following logger -p kern.info "test messages" The logs show up in my default message log. Am I missing something, this doesn't seem right...? I've configured it to take it from four different sources just to make sure it was being captured, as I think I only need the kernel_file source. This is on a redhat linux 7.0 pc. Thanks, Brian Seppanen seppy@chartermi.net 906-228-4226 ext 23
On Thu, Jun 28, 2001 at 02:12:00PM -0400, Brian E. Seppanen wrote:
I'm trying to capture messages that are logged at a specific facility (kern) to a specific kernel.log file.
Below are my definitions
source kernel_file { file("/proc/kmsg"); }; destination kernel { file("/var/kernel/kernel.log");}; filter kern {facility(kern);}; log { source(kernel_file); filter(kern); destination(kernel);}; log { source(internal_src); filter(kern); destination(kernel);}; log { source(stream); filter(kern); destination(kernel);}; log { source(udp_src); filter(kern); destination(kernel);};
When I issue the following
logger -p kern.info "test messages"
The logs show up in my default message log. Am I missing something, this doesn't seem right...? I've configured it to take it from four different sources just to make sure it was being captured, as I think I only need the kernel_file source.
I can't see your default log statement. please make the smallest possible configuration which shows what you think is incorrect. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
On Thu, Jun 28, 2001 at 02:12:00PM -0400, Brian E. Seppanen wrote:
When I issue the following
logger -p kern.info "test messages"
I ran into this problem a while back. Under Solaris (and I'm guessing all Unix-like OSes), only the kernel can send messages on the kernel facility. If you try to send them using logger they wind up being sent on the user facility. Get your kernel to log something (booting is a good way to do this) to test whether kernel messages are handled correctly. ---------------------------------------------------------------------------- __o Bradley Arlt Email: arlt@cpsc.ucalgary.ca o__ _ \<_ WWW: www.acs.ucalgary.ca/~bdarlt _>/ _ (_)/(_) -Eat well, sleep peacefully, drink lots, and ride like hell. (_)\(_)
participants (3)
-
Balazs Scheidler
-
Brad Arlt
-
Brian E. Seppanen