Skip to content

Commit 88f23dd

Browse files
Merge pull request #264323 from mabicca/patch-10
Update time-sync.md
2 parents 7f829f7 + dce4fdf commit 88f23dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/virtual-machines/linux/time-sync.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ There are some basic commands for checking your time synchronization configurati
7373
Check to see if the integration service (hv_utils) is loaded.
7474

7575
```bash
76-
lsmod | grep hv_utils
76+
$ sudo lsmod | grep hv_utils
7777
```
7878
You should see something similar to this:
7979

@@ -91,13 +91,13 @@ install the updated driver. When the PTP clock source is available, the Linux de
9191
See which PTP clock sources are available.
9292

9393
```bash
94-
ls /sys/class/ptp
94+
$ ls /sys/class/ptp
9595
```
9696

9797
In this example, the value returned is *ptp0*, so we use that to check the clock name. To verify the device, check the clock name.
9898

9999
```bash
100-
cat /sys/class/ptp/ptp0/clock_name
100+
$ sudo cat /sys/class/ptp/ptp0/clock_name
101101
```
102102

103103
This should return `hyperv`, meaning the Azure host.
@@ -143,7 +143,7 @@ makestep 1.0 -1
143143
Here, chrony will force a time update if the drift is greater than 1 second. To apply the changes restart the chronyd service:
144144

145145
```bash
146-
systemctl restart chronyd && systemctl restart chrony
146+
$ sudo systemctl restart chronyd && sudo systemctl restart chrony
147147
```
148148

149149
### Time sync messages related to systemd-timesyncd
@@ -162,7 +162,7 @@ Aug 1 12:59:45 vm-name systemd-timesyncd[945]: Synchronized to time server 185.
162162
You can disable it by using:
163163
164164
```bash
165-
systemctl disable systemd-timesyncd
165+
$ sudo systemctl disable systemd-timesyncd
166166
````
167167
In most cases, systemd-timesyncd will try during boot but once chrony starts up it will overwrite and become the default time sync source.
168168

@@ -195,7 +195,7 @@ ntp:
195195
driftfile /var/lib/chrony/chrony.drift
196196
logdir /var/log/chrony
197197
maxupdateskew 100.0
198-
refclock PHC /dev/ptp_hyperv poll 3 dpoll -2
198+
refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0 stratum 2
199199
makestep 1.0 -1
200200
```
201201

0 commit comments

Comments
 (0)