Standardizing on Time Lab - Zacham17/my-tech-journal GitHub Wiki

Change Time Settings in System Logs

This lab focuses on how to change the time settings for different operating system logs. This includes enhancing logs so that the time stamp information is captured.

Ubuntu Linux

  • On ubuntu, the settings for system logs can be found in /etc/rsyslog.conf
  • To make higher precision timestamps appear on logs, the line, shown in the screenshot below, must be commented out. image
  • After changing the configuration, restart the rsyslog service.
  • You can test your changes by creating a log with logger -t test "MESSAGEHERE"
  • You can then cat the /var/log/syslog file to check if the changes were applied

Rocky Linux

  • On rocky Linux, the settings for system logs can be found in /etc/rsyslog.conf
  • To make higher precision timestamps appear on logs, the line, shown in the screenshot below, must be commented out. image
  • After changing the configuration, restart the rsyslog service.
  • You can test your changes by creating a log with logger -t test "MESSAGEHERE"
  • You can then cat the /var/log/messages file to check if the changes were applied