# ntpd logging & debugging



## Ludwig (Jan 10, 2016)

I have a FreeBSD 10.2-RELEASE server running as a KVM guest and doesn't keep its clock synchronize. I have enabled ntpd in /etc/rc.conf:

```
ntpd_enable=YES
    ntpd_sync_on_start=YES
```
but it doesn't solve my problem. If the server runs for a few hours the difference between real time and server time is already in a range of minutes.

I have the feeling that ntpd doesn't work as expected. How can I "debug" ntpd? How can I find out when a successful / failed ntp update took place?
I have enabled logging in file /etc/ntp.conf with:

```
logfile /var/log/ntp.log
```
 but the log file only tells me about the binding address which does not help me.


----------



## rotor (Jan 11, 2016)

Take a look at this thread:
Thread clock-rapidly-getting-out-of-sync.53846/

and try the debug technique recommended there, substituting `ntpq -p` for `ntpctl -s all` and `ntpctl -sa`.


----------

