help wanted configuring syslod klogd
I am trying to set the loglevel in syslog/klogd on my dm800 running busybox.
I am not able to set loglevels or log specific messages.
Code:
uname -r = 2.6.18-7.4-dm800
root:dm800:/# cat /proc/cpuinfo
system type : BCM97xxx Settop Platform
build target : dm800
processor : 0
cpu model : Brcm3300 V0.0
cpu MHz : 294.91
BogoMIPS : 294.91 ( udelay_val : 147456 HZ = 1000 )
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
VCED exceptions : not available
VCEI exceptions : not available
RAC setting : I/D-RAC enabled
unaligned access : 4139493
rdhwr/brdhwr traps : 0 / 0
Anybody with help or suggestions?
I modified the /etc/default/syslog.busybox and /var/etc/init.d/syslog.busybox
The bold/italic parts are added by me.
Code:
#! /bin/sh
#
# syslog init.d script for busybox syslogd/klogd
# Written by Robert Griebl <sandman.at.handhelds.org>
# Configuration file added by <bruno.randolf.AT.4g-systems.biz>
set -e
if [ -f /etc/default/busybox-syslog ]; then
. /etc/default/busybox-syslog
LOG_LOCAL=0
LOG_REMOTE=0
for D in $DESTINATION; do
if [ "$D" = "buffer" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -C$ BUFFERSIZE"
LOG_LOCAL=1
elif [ "$D" = "file" ]; then
if [ -n "$LOGFILE" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE"
fi
if [ -n "$ROTATESIZE" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE"
fi
if [ -n "$ROTATEGENS" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS"
fi
LOCAL=0
elif [ "$D" = "remote" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE"
LOG_REMOTE=1
fi
done
if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -L"
fi
if [ -n "$LOGLEVEL" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -l $LOGLEVEL"
fi
if [ -n "$MARKINT" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -m $MARKINT"
fi
if [ "$REDUCE" = "yes" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -S"
fi
else
# default: log to 16K shm circular buffer
SYSLOG_ARGS="-C"
fi
case "$1" in
start)
echo -n "Starting syslogd/klogd: "
start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
echo "done"
;;
stop)
echo -n "Stopping syslogd/klogd: "
start-stop-daemon -K -n syslogd
start-stop-daemon -K -n klogd
echo "done"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: syslog { start | stop | restart }" >&2
exit 1
;;
esac
exit 0
Code:
DESTINATION="file" # log destinations (buffer file remote)
MARKINT=20 # interval between --mark-- entries [min]
REDUCE=no # reduced-size logging
LOGLEVEL=4 # Set by devastate
BUFFERSIZE=64 # buffer: size of circular buffer [kByte]
LOGFILE=/media/hdd/messages # file: where to log
ROTATESIZE=32 # file: rotate log if grown beyond X [kByte] (busybox 1.2+)
ROTATEGENS=4 # file: keep X generations of rotated logs (busybox 1.2+)
REMOTE=loghost:514 # remote: where to log
FOREGROUND=no # run in foreground (don't use!)