summaryrefslogtreecommitdiff
path: root/sysklogd/Config.src
diff options
context:
space:
mode:
authorPeter Korsgaard2013-01-06 00:07:19 +0100
committerMike Frysinger2013-01-06 13:30:50 -0500
commitcd776cf96735760311560495f3f0078ae72e98a0 (patch)
tree21aa8361ce965d00921923430f4773fcc060e6cd /sysklogd/Config.src
parentd189b598b449f3a258354133180e7b770c04526c (diff)
downloadbusybox-cd776cf96735760311560495f3f0078ae72e98a0.zip
busybox-cd776cf96735760311560495f3f0078ae72e98a0.tar.gz
syslogd: add option to log to Linux kernel printk buffer
Why invent our own shared memory circular buffer when the kernel has a perfectly fine one already? This can be used as a smaller/simpler alternative to the syslogd IPC support (as IPC shmem/klogd/logread aren't needed), while also allowing centralised logging of everything (kernel messages, userspace bootup and syslog) when used together with ttyprintk. Notice that kernel 3.5+ is needed to store syslog facility in printk buffer, otherwise only the priority is stored. bloat-o-meter compared to IPC+klogd+logread: function old new delta get_linux_version_code - 84 +84 lbb_prepare 25 90 +65 applet_nameofs 6 - -6 static.stdout@@GLIBC_2 8 - -8 applet_names 23 9 -14 bb_msg_standard_output 16 - -16 init_sem 18 - -18 xatoull_range 19 - -19 overlapping_strcpy 21 - -21 init_data 56 32 -24 applet_main 24 - -24 main 124 99 -25 full_write2_str 26 - -26 error_exit 26 - -26 bb_basename 30 - -30 sem_up 32 - -32 interrupted 35 - -35 fflush_stdout_and_exit 38 - -38 bb_banner 46 - -46 find_applet_by_name 59 - -59 bb_signals_recursive_norestart 90 - -90 run_applet_no_and_exit 104 - -104 timestamp_and_log 651 523 -128 syslogd_main 798 581 -217 xstrtoull_range_sfx 267 - -267 run_applet_and_exit 432 - -432 klogd_main 490 - -490 logread_main 508 - -508 .rodata 1870 937 -933 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 2/26 grow/shrink: 1/6 up/down: 149/-11829) Total: -11680 bytes Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sysklogd/Config.src')
-rw-r--r--sysklogd/Config.src16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysklogd/Config.src b/sysklogd/Config.src
index b7a494e..fcf9930 100644
--- a/sysklogd/Config.src
+++ b/sysklogd/Config.src
@@ -113,6 +113,19 @@ config FEATURE_LOGREAD_REDUCED_LOCKING
from circular buffer, minimizing semaphore
contention at some minor memory expense.
+config FEATURE_KMSG_SYSLOG
+ bool "Linux kernel printk buffer support"
+ default y
+ depends on SYSLOGD
+ select PLATFORM_LINUX
+ help
+ When you enable this feature, the syslogd utility will
+ write system log message to the Linux kernel's printk buffer.
+ This can be used as a smaller alternative to the syslogd IPC
+ support, as klogd and logread aren't needed.
+
+ NOTICE: Syslog facilities in log entries needs kernel 3.5+.
+
config KLOGD
bool "klogd"
default y
@@ -123,6 +136,9 @@ config KLOGD
you wish to record the messages produced by the kernel,
you should enable this option.
+comment "klogd should not be used together with syslog to kernel printk buffer"
+ depends on KLOGD && FEATURE_KMSG_SYSLOG
+
config FEATURE_KLOGD_KLOGCTL
bool "Use the klogctl() interface"
default y