# Verifying that NTP is working and device has the correct time

**URL:** <https://forums.balena.io/t/verifying-that-ntp-is-working-and-device-has-the-correct-time/48726>\
**Category:** balenaOS\
**Created:** [December 4, 2019, 10:15pm UTC](https://forums.balena.io/t/verifying-that-ntp-is-working-and-device-has-the-correct-time/48726 "2019-12-04T22:15:02Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [December 4, 2019, 11:17pm UTC](https://forums.balena.io/t/verifying-that-ntp-is-working-and-device-has-the-correct-time/48726/6 "2019-12-04T23:17:59Z")

</div>

If you’re using a relatively recent version of balenaOS, it uses the [chrony](https://chrony.tuxfamily.org/) daemon to synchronise with NTP servers, and the client tool is [chronyc](https://linux.die.net/man/1/chronyc). The `chronyc tracking` command shows some synchronisation stats:

```auto
root@5d3ffbf:~# chronyc tracking
Reference ID : A29FC87B (162.159.200.123)
Stratum : 4
Ref time (UTC) : Wed Dec 04 22:53:05 2019
System time : 0.000443322 seconds slow of NTP time
Last offset : -0.000107522 seconds
RMS offset : 0.000491016 seconds
Frequency : 6.213 ppm fast
Residual freq : -0.001 ppm
Skew : 0.029 ppm
Root delay : 0.027679516 seconds
Root dispersion : 0.002328631 seconds
Update interval : 1029.6 seconds
Leap status : Normal

```

Another suggestion/approach is to compare the time reported by the balenaCloud API server with the device’s local time:

```auto
root@5d3ffbf:~# echo 'remote:' $(curl --silent --head --insecure https://api.balena-cloud.com/ping | grep -i Date: | sed 's/[Dd]ate: //') && echo 'local:' $(date)
remote: Wed, 04 Dec 2019 22:58:42 GMT
local: Wed Dec 4 22:58:42 UTC 2019

```

Some more reference links, in case helpful:

- [Lets talk about hardware clocks and time skew, some questions](https://forums.balena.io/t/lets-talk-about-hardware-clocks-and-time-skew-some-questions/29803)
- [https://www.balena.io/docs/reference/OS/time/](https://www.balena.io/docs/reference/OS/time/)
- [https://www.balena.io/docs/reference/OS/network/2.x/#network-requirements](https://www.balena.io/docs/reference/OS/network/2.x/#network-requirements)
- [https://www.balena.io/docs/learn/develop/runtime/#checking-if-device-time-is-ntp-synchronized](https://www.balena.io/docs/learn/develop/runtime/#checking-if-device-time-is-ntp-synchronized)

---

_[View the full topic](https://forums.balena.io/t/verifying-that-ntp-is-working-and-device-has-the-correct-time/48726)._
