linux - Processes started with systemd are logging to /var/log/syslog and /var/log/daemon.log -
i'm running couple of python scripts on beaglebone black, both started @ init systemd. noticed yesterday emmc flash full, , reason had 1.8 gigs of log files. seems standard output of these scripts (they generate amount of data debugging purposes) being logged both /var/log/syslog , /var/log/daemon.log. also, /var/log/messages has ton of entries "rate-limiting".
now, assume fix disabling standard output on these scripts. however, rather preserve capability , somehow tell systemd not log data. however, i've been unable find information on this.
here example of current .service file:
[unit] description=description of process after=network.target [service] type=simple execstart=/opt/myprocess [install] wantedby=multi-user.target
i should note had syslog.target "after" target, because example following had it. have since removed , doesn't seem solve problem.
any or insight problem appreciated.
edit: may have found answer here:
http://www.kibinlabs.com/systemd-logging-tricks/
adding standardoutput=null , seeing if fixes it. looks promising.
edit 2: does.
systemd not log files in /var/log
itself, ever.
if log messages showing in /var/log
, suggests system running "syslog" daemon, receiving log messages either (a) reading systemd journal, or (b) applications using syslog directly.
simply disabling syslog daemon prevent files being written in /var/log
. messages still written system journal, there flexible controls available limit space used these files. see the journald docs more information.
Comments
Post a Comment