So sometimes as part of
our system administrator.
You'll need to track devices on the computers
on the network.
And then we're going to maintain a list
of hardware resources that we use
because a lot of times it's going to be important when it comes
to updating systems or keeping track
because sometimes there's different recalls
or different vulnerabilities associated
with different hardware levels.
Now typically it's associated with software levels,
but sometimes it's with hardware or maybe defects.
So we're going to have a list of tools
that we're going to use to actually
identify this information.
So the first thing we want to do is list out
and monitor some things that are
on the PCI bus or just the PCI,
which stands for peripheral component interconnect.
Next, we're going to list PCI items.
Now the way the PCI is set up
is pretty much the first field is the bus,
the second field is the device
and then there's going to be the function.
So you see before the colon,
we're going to go with the slot number.
The second is going to be the class.
So like a host bridge
that's describing what it is.
And then the last set it's going to be the vendor
and the product itself.
So we can see a few of these items here.
Now, if we want to get more in depth,
we're going to do the sudo version of list PCI.
We're going to use the verbose option.
And now it's going to give us more detailed information
about these items.
So we can see input, output, port capabilities,
kernel drivers that each one of these
devices use, et cetera.
Cause we also remember we can use this
for our troubleshooting because
different kernel modules are started
at different sequences and orders.
And now we can associate these kernel modules
with specific functions to help us more
throughout the troubleshooting process if need be.
Now next we're going to do the same thing,
but we're going to do it
with the USB bus, the universal serial bus.
Everyone's very familiar with this bus.
Thumb drives, cameras, pretty much everything uses a
USB attachment at this point.
The first section is going to be the bus number, the device ID
and then the last section's going to be the vendor and product.
Okay. And again, we can do the same thing.
We're going to do sudo, lsusb, going to do verbose.
And again, we can see more information,
more specific information about these items.
And again, if you want to see all of it,
you can just pipe it into the less command.
And again, it gets us more detailed information.
Vendor, product, ID, manufacturer, serial number,
just a lot of different information that can be very useful.
Now, honestly typically, most administrators won't have to
go this far, but it's good to know these tools
in the event that you would need to.
So what we're going to do now is we're going to just
use an example of how to monitor a print job,
but we're going to create a large enough file and print it.
So it gives us time to actually see it in the queue.
We're going to use this command
to encode the data to readable text.
And we're going to create this file to make sure
it's long enough
to actually take a while to print.
So we're going to do the first.
You remember the head command starts from the top
and the count is going to be
the first 10 million lines.
So it's going to make it pretty large file.
Okay. So we sent the output to the print file
and now we're going to actually go ahead and print this.
The print command print file.
And now we're going to actually view the queue,
lpq.
Now again, we can just look at this
and it just shows quickly the status of it.
Who sent the job, what job number it is,
the file or files and the size of the file that's printed.
And again, this is what's meant to be complex.
Linux gives us a lot of tools to help us just go through
and monitor these activities, monitor the devices
and et cetera.
And I'll see you in the next lesson.