1
00:00:00,000 --> 00:00:05,002
(upbeat music)

2
00:00:05,002 --> 00:00:06,009
- [Instructor] Let's look at

3
00:00:06,009 --> 00:00:09,006
my solutions for those challenges.

4
00:00:09,006 --> 00:00:12,008
So, hopefully you found in proc

5
00:00:12,008 --> 00:00:15,006
a file called command line

6
00:00:15,006 --> 00:00:20,004
with a little bit abbreviated spelling.

7
00:00:20,004 --> 00:00:23,004
If we cat that out, that's what was passed

8
00:00:23,004 --> 00:00:27,002
by the boot loader to the kernel at boot time.

9
00:00:27,002 --> 00:00:30,007
Alright, now let's use demesg

10
00:00:30,007 --> 00:00:32,006
and see if we can find that,

11
00:00:32,006 --> 00:00:35,000
and we'll grep for BOOT_IMAGE,

12
00:00:35,000 --> 00:00:38,008
since that's what it started with.

13
00:00:38,008 --> 00:00:40,008
And there we see it.

14
00:00:40,008 --> 00:00:44,008
Also, notice we've got this message here.

15
00:00:44,008 --> 00:00:48,005
"Unknown kernel command line parameters,"

16
00:00:48,005 --> 00:00:51,000
"will be passed to user space."

17
00:00:51,000 --> 00:00:52,008
This is kind of good to know.

18
00:00:52,008 --> 00:00:54,003
You can put almost anything you want

19
00:00:54,003 --> 00:00:55,006
on the kernel command line.

20
00:00:55,006 --> 00:00:59,009
If the kernel doesn't know what it is, then it's ignored.

21
00:00:59,009 --> 00:01:01,004
But it's still there,

22
00:01:01,004 --> 00:01:04,004
and utilities can look at like,

23
00:01:04,004 --> 00:01:08,000
proc command line for extra options.

24
00:01:08,000 --> 00:01:13,002
Like here, it's documenting which kernel was booted.

25
00:01:13,002 --> 00:01:17,007
Might be helpful to know about the command line.

26
00:01:17,007 --> 00:01:19,002
And we also said,

27
00:01:19,002 --> 00:01:21,004
hey, is the kernel command line

28
00:01:21,004 --> 00:01:24,003
stored in a log file somewhere?

29
00:01:24,003 --> 00:01:26,003
So let's do a recursive grep

30
00:01:26,003 --> 00:01:34,008
for BOOT_IMAGE= underneath /var/log,

31
00:01:34,008 --> 00:01:36,005
and you get lots of hits.

32
00:01:36,005 --> 00:01:40,000
So there's a syslog, there's a dmesg log, and so forth.

33
00:01:40,000 --> 00:01:42,002
So that's a place to look.

34
00:01:42,002 --> 00:01:45,004
What about with journalctl?

35
00:01:45,004 --> 00:01:54,003
Journalctl -k |grep BOOT_IMAGE=.

36
00:01:54,003 --> 00:01:55,008
It's there, too.

37
00:01:55,008 --> 00:02:00,009
Okay, I notice we get the warning there, and so forth.

38
00:02:00,009 --> 00:02:03,006
And then we had another challenge question.

39
00:02:03,006 --> 00:02:07,008
How much memory, how much RAM do you have on your system?

40
00:02:07,008 --> 00:02:12,002
Well if you look at /proc/meminfo,

41
00:02:12,002 --> 00:02:15,003
at the top there, MemTotal.

42
00:02:15,003 --> 00:02:19,000
So, looks like 16 gig on this system.

