diff --git a/meta-forgefirm/recipes-forgefirm/forgefirm-logging/files/forgefirm-logging.init b/meta-forgefirm/recipes-forgefirm/forgefirm-logging/files/forgefirm-logging.init index 056c035..1ccb74b 100644 --- a/meta-forgefirm/recipes-forgefirm/forgefirm-logging/files/forgefirm-logging.init +++ b/meta-forgefirm/recipes-forgefirm/forgefirm-logging/files/forgefirm-logging.init @@ -24,6 +24,13 @@ LEGACY=/data/forgefirm/legacy-logs RULES=/data/forgefirm/rsyslog-forgefirm.conf +# The daemons log to /dev/log with non-blocking datagrams and drop what +# the socket will not take. The kernel default queue is 10 datagrams; +# forgectrl's arm-time burst alone is about 20, so a 10-deep queue lost +# the lines around every job start (the named safing writes among them). +# 512 holds any burst the daemons make until rsyslog drains it. +DGRAM_QLEN=512 + render() { # syslog is not up yet at this point: report to the console if [ -x "$FORGECTRL" ]; then @@ -66,6 +73,8 @@ sweep_legacy() { case "$1" in start) + # before rsyslog (S20) and the daemons that log to it + [ -w /proc/sys/net/unix/max_dgram_qlen ] && echo "$DGRAM_QLEN" > /proc/sys/net/unix/max_dgram_qlen render sweep_legacy [ -x "$LOGROTATE" ] || exit 0