6,534
edits
Changes
→Configuring logrotate: added postrotate
==== Configuring logrotate ====
For long term capturing you would like to do log rotating some way. With logrotate you can do it by creating config file /etc/logrotate.d/netconsole:
copytruncate
notifempty
# Need to restart logger after log file move
postrotate
# Below line assumes netcat will be restarted by init
killall -TERM netcat > /dev/null 2>&1 || true
}
</pre>
For more details, see man logrotate.
=== Testing netconsole ===