RHEL 7 – Notes: rsyslog

echo “*.debug /var/log/messages-debug” > debug.conf
cat debug.conf
systemctl restart rsyslog
systemctl status rsyslog
logger -p user.debug “this is test message”
tailf /var/log/messages-debug

Advertisements

RHEL 7 – Notes: Journalctl

Journalctl to view system logs:

===========================

journalctl -n
journalctl -n 5
journalctl -p err
journalctl –since today
journalctl –since “2015-12-22 02:00:00” –until “2015-12-22 03:00:00”
journalctl -o verbose

journalctl _PID=1

journalctl -b (since last reboot if they were made persistent)

 

How to make persistent:

mkdir /var/log/journal

chown root:systemd-journal /var/log/journal

chmod 2755 /var/log/journal

kilall -USR1 systemd-journald