Hi All,
I have an ESXi server that I need to setup to sync NTP from the command line / unsupported mode.
I noticed that there is an /etc/ntpd.conf a and /etc/init.d/ntpd.
I know I can stop, restart, and check status of the ntpd by using the init.d script.
How can I know that ntpd is receiveing accurate time data from the source?
Is /var/log/messages my best option? I'd really like something else so I don't have to scan through all of the other junk in /var/log/messages.
THANKS !!!
Andrew
pcerda,
Thanks for the helpful response! I tested those commands and they worked as you described.
I am still looking for a way to verify that NTP is receiving time from the source though.
Once the host is added to vCenter it will be easy.
I am hoping to find a way not just to verify what the time is on the host, but that it is able to succesfully talk to the NTP server.
I will try to tail /var/log/messages and restart the service to see if any NTPd messages are reported.
Andrew
Will PowerCli do?
If so, the solution is in the following thread:
http://communities.vmware.com/thread/283523
what about this:
echo restrict default kod nomodify notrap noquerynopeer > /etc/ntp.conf
echo restrict 127.0.0.1 >> /etc/ntp.conf
echo server 10.0.0.11 >> /etc/ntp.conf
echo server 10.0.0.12 >> /etc/ntp.conf
echo driftfile /var/lib/ntp/drift >> /etc/ntp.conf
/sbin/chkconfig --level 345 ntpd on
/etc/init.d/ntpd stop
/etc/init.d/ntpd start
Wrote about it on this blog: http://blogs.vmware.com/esxi/2011/02/ops-changes-part-2-scripted-installation.html
Duncan (VCDX)
Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive
Hi,
The only way I have found in ESXi is to troll the /var/log/messages log. I do this from the vSphere client and then filter on ntpd which makes it easier to see what is happening. On my ESXi server I could see events like: synchronized to x.x.x.x, stratum 2, etc.
Trust this helps.
Kind regards,
Glen
Hi,
Just fully read your reply and noticed the part about not being connected to vCenter. In this case I would grep the messages log for ntpd and this will show you the time sync process.
Kind regards,
Glen
log into the host and at the cmd line:
# ntpq -p
or
# for i in 1 2 3 4 5 6 7 8 9
# do
# ntpq -p; sleep 10
# done