1
00:00:00,000 --> 00:00:09,080
So for this lab, let's go to Ubuntu,

2
00:00:09,080 --> 00:00:14,200
because the CentOS machine was already correctly installed.

3
00:00:14,200 --> 00:00:18,480
First, I need to check my journal d.conf.

4
00:00:18,480 --> 00:00:20,280
And there you can see that on Ubuntu,

5
00:00:20,280 --> 00:00:28,600
it lives in ETC system D. And the option I'm looking for

6
00:00:28,600 --> 00:00:30,240
is right here.

7
00:00:30,240 --> 00:00:31,520
Storage is auto.

8
00:00:31,520 --> 00:00:33,400
That's all we need.

9
00:00:33,400 --> 00:00:40,360
So I'm going to create a directory, var log journal.

10
00:00:40,360 --> 00:00:42,720
Oh, file already exists.

11
00:00:42,720 --> 00:00:43,840
Now, that's convenient.

12
00:00:43,840 --> 00:00:47,639
I'm using ls minus l on var log journal.

13
00:00:47,639 --> 00:00:50,320
And as you can see, we already have the consistent journal

14
00:00:50,320 --> 00:00:52,400
on this Ubuntu machine.

15
00:00:52,400 --> 00:00:53,560
Now, why do they do that?

16
00:00:53,560 --> 00:00:55,919
Because on Red Hat, the journal's consistency

17
00:00:55,919 --> 00:00:58,480
is guaranteed through rsyslog.

18
00:00:58,480 --> 00:01:01,959
So we should check if we have rsyslog on Ubuntu.

19
00:01:01,959 --> 00:01:04,440
And yeah, we also have rsyslog.

20
00:01:04,440 --> 00:01:07,800
So that is kind of double, but it's a gender choice.

21
00:01:07,800 --> 00:01:11,599
And that is how distributions can make their own choices

22
00:01:11,599 --> 00:01:13,480
to do specific stuff.

23
00:01:13,480 --> 00:01:14,559
Next, we need to do what?

24
00:01:14,559 --> 00:01:18,040
We need to use logger to write a message with the priority

25
00:01:18,040 --> 00:01:20,959
info in the text, hello world.

26
00:01:20,959 --> 00:01:30,120
So logger minus p, info, hello world.

27
00:01:30,120 --> 00:01:35,680
And journal CTL, uppercase G for the end.

28
00:01:35,680 --> 00:01:38,120
And oh, there we can see that I made a typo.

29
00:01:38,120 --> 00:01:43,519
Well, it made it to the journal, but not the right way.

30
00:01:43,519 --> 00:01:46,480
Minus p is not the same as equals p.

31
00:01:46,480 --> 00:01:47,919
So now it should be better.

32
00:01:47,919 --> 00:01:50,120
And let's be a little bit more precise

33
00:01:50,120 --> 00:01:51,400
while looking it up.

34
00:01:51,400 --> 00:01:56,879
So journal CTL minus p, info, is showing all messages

35
00:01:56,879 --> 00:01:59,239
with a state of info.

36
00:01:59,239 --> 00:02:01,839
And there you can see it's a lot of messages,

37
00:02:01,839 --> 00:02:05,440
including the message that I've just written to the logs.

