Linux Tips: rsyslogd

This is a quick demo of how to use rsyslogd, I intended to capture whether or not my cron job did execute.

First make sure rsyslogd is installed, this can be referenced here

run in shell

rsyslogd

as soon as it ran, we can tail syslog

tail -f /var/log/syslog


<sample output>
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.219761] XFS (dm-17): Ending clean mount
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.464436] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.474570] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.475096] docker0: port 7(vethrfcdcac393a) entered blocking state
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.475101] docker0: port 7(vethrfcdcac393a) entered disabled state
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.475197] device vethrfcdcac393a entered promiscuous mode
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.475253] docker0: port 7(vethrfcdcac393a) entered blocking state
Mar 15 11:13:49 mongodb-enterprise-mongo-1 kernel: [21412388.475256] docker0: port 7(vethrfcdcac393a) entered forwarding state
Mar 15 11:14:01 mongodb-enterprise-mongo-1 CRON[308]: (root) CMD (./logrotate.sh >> /ran.txt)
Mar 15 11:15:01 mongodb-enterprise-mongo-1 CRON[316]: (root) CMD (./logrotate.sh >> /ran.txt)

Comments

Popular posts from this blog

MongoDB Tips: Kill long running processes

Oracle Goldengate Extract, Pump, and Replicat

MongoDB Ops Manager Basic Installation and Configuration