Check Linux Log Files For System Time Changes

System time changes can cause major problems to applications and business data. It is extrememly important that any system time changes are planned and explained.

The following command lines can be used to carry out a quick check to see how manu times the system time has been changed.

 

On a CentOS/RHEL version 6 or equivalent:

grep -c “Time has been changed” /var/log/messages

 

On a CentOS/RHEL version 7 or equivalent:

journalctl | grep -c "Time has been changed"

 

The following screen shot shows that a system time change has been logged 51 times:

 

Share this post