Resync time for CentOS
Sometimes when your machine is asleep a VM may not resync it's time with the NTP server. Here is a simple little script to reset it.
This can be especially important when time synchronization is key.
#re-sync time for a CentOS VM which was sleeping
/etc/init.d/ntpd stop
ntpdate pool.ntp.org
/etc/init.d/ntpd start
date
Original Gist: https://gist.github.com/radius314/6156581
Written by Danny Gershman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#