On 19.08.2012, Bob Goodwin - Zuni, Virginia, USA wrote:
Can someone tell me the proper command to save log data to " /home/bobg/xxlog" instead of filling up "var/log/messages" nothing I've tried has worked?
Here's what works for me:
1. Go to /etc/sysconfig/rsyslog and add the "-r" option to the parameters for rsyslogd (as far as I know, the "-r" option has been obsoleted some time ago, and is replaced by 2., so just try or read the manpages).
2. Go to /etc/rsyslogd.conf and let the daemon listen on UDP port 514:
$ModLoad imudp $UDPServerRun 514
3. Go to /etc/rsyslog.d and create an empty file. Write this into it:
:source, isequal, "sunshine" /var/log/tomato.log :source, isequal, "sunshine" ~
Replace "sunshine" with your routers name, or use its IP.
4. Restart rsyslogd:
systemctl restart syslog.service
That's it.