1
00:00:00,004 --> 00:00:05,005
(lively music)

2
00:00:05,005 --> 00:00:06,007
- [Instructor] A couple of short challenges

3
00:00:06,007 --> 00:00:10,001
having to do with the sys file system.

4
00:00:10,001 --> 00:00:12,003
Let's just look at a little bit

5
00:00:12,003 --> 00:00:14,003
of hardware sort of information

6
00:00:14,003 --> 00:00:17,007
from the sys file system and utilities.

7
00:00:17,007 --> 00:00:22,000
From which files does lspci get its info?

8
00:00:22,000 --> 00:00:25,008
Well, we can see all the files it opens by S tracing

9
00:00:25,008 --> 00:00:28,009
and the -e and then a system call

10
00:00:28,009 --> 00:00:30,006
just shows you those system calls,

11
00:00:30,006 --> 00:00:33,000
so you don't have to wade through all the output.

12
00:00:33,000 --> 00:00:37,008
So we'll use S trace -e open at lspci,

13
00:00:37,008 --> 00:00:40,000
see which files it opens.

14
00:00:40,000 --> 00:00:46,007
Similarly, let's look in sys block for disk information.

15
00:00:46,007 --> 00:00:51,000
So you change that directory and you do an ls.

16
00:00:51,000 --> 00:00:53,006
Do you see an SDA?

17
00:00:53,006 --> 00:00:55,005
Do you see anything underneath there,

18
00:00:55,005 --> 00:00:59,005
maybe in a subdirectory about device files

19
00:00:59,005 --> 00:01:02,006
for partitions of SDA?

20
00:01:02,006 --> 00:01:06,005
And then finally using S trace with fdisk -l

21
00:01:06,005 --> 00:01:08,009
and run that as root.

22
00:01:08,009 --> 00:01:12,003
Does that open any files underneath sys block

23
00:01:12,003 --> 00:01:15,004
or underneath sys dev block?

24
00:01:15,004 --> 00:01:17,000
Give 'em a try.

