1
00:00:06,540 --> 00:00:10,009
In this video you'll learn how
to configure time synchronization on Red Hat.

2
00:00:11,070 --> 00:00:14,609
So Red Hat uses a
crony service to manage time

3
00:00:14,609 --> 00:00:18,149
synchronization and this service is
managed by the timedatectl utility.

4
00:00:19,030 --> 00:00:23,716
Configuration of Chrony itself is
in the etccronie configuration file. That's

5
00:00:23,716 --> 00:00:28,403
where you set your time
sources to synchronize with. And next

6
00:00:28,403 --> 00:00:33,090
you use chrony C sources
to check current synchronization status.

7
00:00:33,630 --> 00:00:34,130
Let's
check.

8
00:00:35,149 --> 00:00:41,015
So I'm starting by using
sudo systemctl status of chronyd

9
00:00:41,015 --> 00:00:46,880
and there we can see
that chronyd is currently loaded.

10
00:00:47,500 --> 00:00:54,070
You can also see in the logs to the end that it's currently
synchronizing. It's having a good time and seems to be doing all right.

11
00:00:55,469 --> 00:01:00,423
Now I would like to edit
this configuration file. So sudo vim

12
00:01:00,423 --> 00:01:05,376
on etc chrony conf that's the
main configuration file. And as you

13
00:01:05,376 --> 00:01:10,329
can see, it has a pool.
And this pool is pretty reliable.

14
00:01:10,430 --> 00:01:12,379
It's a pool
of Internet time servers.

15
00:01:13,000 --> 00:01:19,193
Now if you want, you can add your
own server and I'm going to add a server

16
00:01:19,193 --> 00:01:25,386
dummy example and that should make a point.
This is a server that doesn't exist, but I

17
00:01:25,386 --> 00:01:31,579
want to show you what is happening in
case you have a server that doesn't exist.

18
00:01:32,340 --> 00:01:37,079
Now, I did just change the configuration
for Chrony, so I need to restart it.

19
00:01:39,099 --> 00:01:40,280
Let's do
that right now.

20
00:01:40,969 --> 00:01:46,459
And then I can check what is
going on first by checking on the status.

21
00:01:47,519 --> 00:01:53,430
And on the status we see what? Well, we don't
see any errors whatsoever. Seems to be doing all right.

22
00:01:53,950 --> 00:01:57,605
Now the ultimate command to
figure out if your time

23
00:01:57,605 --> 00:02:01,260
is synchronizing correctly is
by using chrony C sources.

24
00:02:02,079 --> 00:02:07,280
So here we can see the current time
sources that it is using and they are listed

25
00:02:07,280 --> 00:02:12,480
right here. And hey, there's no mention of
this dummy time server. And we don't need to

26
00:02:12,480 --> 00:02:17,680
because this dummy time server couldn't be contacted.
So you don't see it in the sources.

27
00:02:18,180 --> 00:02:19,419
We do
see a source.

28
00:02:19,979 --> 00:02:21,900
Oh, that's a
stratum one fancy.

29
00:02:22,430 --> 00:02:28,120
So 192192630 stratum one most reliable.
And you can also see that the

30
00:02:28,120 --> 00:02:33,810
difference between the local clock and
this remote clock is really minimal.

31
00:02:34,310 --> 00:02:40,310
It's also in touch with a couple of other time
servers, which is helpful in case you lose contact with the

32
00:02:40,310 --> 00:02:46,310
Stratum 1 server. Then it has a fallback for other
servers. That's how you use time synchronization on Red Hat.
