Comment 1 for bug 1429427

Revision history for this message
sgofferj (sgofferj) wrote :

Script used for monitoring:

#!/bin/bash

oldTime=$(date +%s)
oldPsOutput=$(ps faux)
while sleep 1
do
  currentTime=$(date +%s)
  currentPsOutput=$(ps faux)
  if [ "$currentTime" -lt "$oldTime" ] # clock change detected?
  then
    (
        echo '========='
        echo "$currentTime < $oldTime"
        echo "$oldPsOutput"
        echo ':::::::::'
        echo "$currentPsOutput"
    ) | mail -s "Time jump" root
  fi
  oldPsOutput=$currentPsOutput
  oldTime=$currentTime
done