1
00:00:00,120 --> 00:00:00,960
So sometimes as part of

2
00:00:00,960 --> 00:00:02,100
our system administrator.

3
00:00:02,100 --> 00:00:04,200
You'll need to track devices on the computers

4
00:00:04,200 --> 00:00:05,280
on the network.

5
00:00:05,280 --> 00:00:07,380
And then we're going to maintain a list

6
00:00:07,380 --> 00:00:09,420
of hardware resources that we use

7
00:00:09,420 --> 00:00:10,980
because a lot of times it's going to be important when it comes

8
00:00:10,980 --> 00:00:13,440
to updating systems or keeping track

9
00:00:13,440 --> 00:00:15,720
because sometimes there's different recalls

10
00:00:15,720 --> 00:00:17,130
or different vulnerabilities associated

11
00:00:17,130 --> 00:00:18,150
with different hardware levels.

12
00:00:18,150 --> 00:00:20,070
Now typically it's associated with software levels,

13
00:00:20,070 --> 00:00:23,010
but sometimes it's with hardware or maybe defects.

14
00:00:23,010 --> 00:00:24,480
So we're going to have a list of tools

15
00:00:24,480 --> 00:00:25,830
that we're going to use to actually

16
00:00:25,830 --> 00:00:27,630
identify this information.

17
00:00:27,630 --> 00:00:29,280
So the first thing we want to do is list out

18
00:00:29,280 --> 00:00:30,630
and monitor some things that are

19
00:00:30,630 --> 00:00:33,840
on the PCI bus or just the PCI,

20
00:00:33,840 --> 00:00:36,630
which stands for peripheral component interconnect.

21
00:00:36,630 --> 00:00:38,493
Next, we're going to list PCI items.

22
00:00:41,940 --> 00:00:44,250
Now the way the PCI is set up

23
00:00:44,250 --> 00:00:47,070
is pretty much the first field is the bus,

24
00:00:47,070 --> 00:00:48,660
the second field is the device

25
00:00:48,660 --> 00:00:51,060
and then there's going to be the function.

26
00:00:51,060 --> 00:00:52,410
So you see before the colon,

27
00:00:52,410 --> 00:00:54,900
we're going to go with the slot number.

28
00:00:54,900 --> 00:00:56,400
The second is going to be the class.

29
00:00:56,400 --> 00:00:57,930
So like a host bridge

30
00:00:57,930 --> 00:00:59,700
that's describing what it is.

31
00:00:59,700 --> 00:01:01,440
And then the last set it's going to be the vendor

32
00:01:01,440 --> 00:01:03,510
and the product itself.

33
00:01:03,510 --> 00:01:06,450
So we can see a few of these items here.

34
00:01:06,450 --> 00:01:07,650
Now, if we want to get more in depth,

35
00:01:07,650 --> 00:01:10,680
we're going to do the sudo version of list PCI.

36
00:01:10,680 --> 00:01:12,430
We're going to use the verbose option.

37
00:01:15,270 --> 00:01:18,000
And now it's going to give us more detailed information

38
00:01:18,000 --> 00:01:19,860
about these items.

39
00:01:19,860 --> 00:01:23,040
So we can see input, output, port capabilities,

40
00:01:23,040 --> 00:01:25,680
kernel drivers that each one of these

41
00:01:25,680 --> 00:01:27,543
devices use, et cetera.

42
00:01:28,410 --> 00:01:29,790
Cause we also remember we can use this

43
00:01:29,790 --> 00:01:31,590
for our troubleshooting because

44
00:01:31,590 --> 00:01:33,210
different kernel modules are started

45
00:01:33,210 --> 00:01:35,220
at different sequences and orders.

46
00:01:35,220 --> 00:01:37,710
And now we can associate these kernel modules

47
00:01:37,710 --> 00:01:40,260
with specific functions to help us more

48
00:01:40,260 --> 00:01:43,080
throughout the troubleshooting process if need be.

49
00:01:43,080 --> 00:01:44,400
Now next we're going to do the same thing,

50
00:01:44,400 --> 00:01:45,233
but we're going to do it

51
00:01:45,233 --> 00:01:47,940
with the USB bus, the universal serial bus.

52
00:01:47,940 --> 00:01:50,130
Everyone's very familiar with this bus.

53
00:01:50,130 --> 00:01:52,860
Thumb drives, cameras, pretty much everything uses a

54
00:01:52,860 --> 00:01:55,410
USB attachment at this point.

55
00:01:55,410 --> 00:02:00,410
The first section is going to be the bus number, the device ID

56
00:02:00,660 --> 00:02:04,020
and then the last section's going to be the vendor and product.

57
00:02:04,020 --> 00:02:05,700
Okay. And again, we can do the same thing.

58
00:02:05,700 --> 00:02:10,699
We're going to do sudo, lsusb, going to do verbose.

59
00:02:13,200 --> 00:02:15,210
And again, we can see more information,

60
00:02:15,210 --> 00:02:17,790
more specific information about these items.

61
00:02:17,790 --> 00:02:19,860
And again, if you want to see all of it,

62
00:02:19,860 --> 00:02:22,010
you can just pipe it into the less command.

63
00:02:23,610 --> 00:02:26,400
And again, it gets us more detailed information.

64
00:02:26,400 --> 00:02:31,400
Vendor, product, ID, manufacturer, serial number,

65
00:02:32,100 --> 00:02:35,340
just a lot of different information that can be very useful.

66
00:02:35,340 --> 00:02:38,880
Now, honestly typically, most administrators won't have to

67
00:02:38,880 --> 00:02:42,630
go this far, but it's good to know these tools

68
00:02:42,630 --> 00:02:44,490
in the event that you would need to.

69
00:02:44,490 --> 00:02:46,650
So what we're going to do now is we're going to just

70
00:02:46,650 --> 00:02:49,200
use an example of how to monitor a print job,

71
00:02:49,200 --> 00:02:53,580
but we're going to create a large enough file and print it.

72
00:02:53,580 --> 00:02:56,280
So it gives us time to actually see it in the queue.

73
00:02:56,280 --> 00:02:57,870
We're going to use this command

74
00:02:57,870 --> 00:03:00,633
to encode the data to readable text.

75
00:03:01,470 --> 00:03:03,210
And we're going to create this file to make sure

76
00:03:03,210 --> 00:03:04,043
it's long enough

77
00:03:05,190 --> 00:03:08,133
to actually take a while to print.

78
00:03:09,090 --> 00:03:10,490
So we're going to do the first.

79
00:03:11,340 --> 00:03:13,590
You remember the head command starts from the top

80
00:03:13,590 --> 00:03:16,110
and the count is going to be

81
00:03:16,110 --> 00:03:19,410
the first 10 million lines.

82
00:03:19,410 --> 00:03:21,410
So it's going to make it pretty large file.

83
00:03:25,320 --> 00:03:29,070
Okay. So we sent the output to the print file

84
00:03:29,070 --> 00:03:31,560
and now we're going to actually go ahead and print this.

85
00:03:31,560 --> 00:03:33,033
The print command print file.

86
00:03:34,980 --> 00:03:37,800
And now we're going to actually view the queue,

87
00:03:37,800 --> 00:03:38,883
lpq.

88
00:03:40,290 --> 00:03:41,850
Now again, we can just look at this

89
00:03:41,850 --> 00:03:44,910
and it just shows quickly the status of it.

90
00:03:44,910 --> 00:03:48,930
Who sent the job, what job number it is,

91
00:03:48,930 --> 00:03:53,250
the file or files and the size of the file that's printed.

92
00:03:53,250 --> 00:03:55,380
And again, this is what's meant to be complex.

93
00:03:55,380 --> 00:03:58,950
Linux gives us a lot of tools to help us just go through

94
00:03:58,950 --> 00:04:02,850
and monitor these activities, monitor the devices

95
00:04:02,850 --> 00:04:04,500
and et cetera.

96
00:04:04,500 --> 00:04:06,300
And I'll see you in the next lesson.

