Managing devices on linux 000 026 in this

Info icon This preview shows pages 31–33. Sign up to view the full content.

View Full Document Right Arrow Icon
Managing Devices on Linux 0:00-0:26 In this demonstration, we're going to talk about viewing hardware information on a Linux system.There are two different ways that you can do this, and we're going to look at both of these in this demo. First, you can view the content of files that store hardware information or you can run utilities from the shell prompt to view hardware information. Let's begin by reviewing several files that you can access to view information about the hardware in your Linux system. /proc Directory 0:27-2:32 First, I need to switch to my root user account. The first place we need to look is the /proc directory./proc is not a real directory. It's actually a virtual directory that's dynamically created whenever youaccess it, such as we just did here. I'm going to run the 'ls' command here so we can view all the information within this directory. There are two different types of information stored in /proc. The first is process-related information.Whenever you load a process on a Linux system, a corresponding subdirectory is created in /proc and it's named using the process ID number of that process. If you go into any of these subdirectories you'll see information about that running process. However, for our purposes today we want to focus on these files over here. These files contain hardware information. These files are just text files, so you can view them with any of the text utilities that we've talked about, such as cat, less, tail, and so on.
Image of page 31

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
For example, there's a file here called 'cpuinfo'. 'cpuinfo' contains information about the processor installed in this system. To view it we can just type 'less cpuinfo'. I will point out that most of these files are fairly long, so instead of using 'cat' it's usually a lot better to use 'less'. Or if you do use 'cat',type the output to 'more'. Here you can see information about the processor in the system. It's a genuine Intel processor. It's a Pentium D running at 2.8 gigahertz. Here's the size of its cache and so on. There's another file in here called 'devices'. It just contains a list of all the hardware devices that are configured in the system.There's another file called DMA which contains a list of DMA assignments. The DMA file contains a list of DMA channel assignments, and right now you can see there's just one: DMA channel 4. It's actually not really a channel assignment, because it's just being used for cascading. 'interrupts' File / iomem and ioports 2:33-3:53 A more useful file will probably be the 'interrupts' file. If we want to see what harbored devices are using which interrupts in the system, we can look at this file. For example, we can see that we have a parallel port here that's using interrupt 7. We have two ATA controllers. These are old ID controllers that are using interrupts 14 and 15. In addition to interrupts, you can also view information about the I/O port on the system. There's actually two files we need to look at for I/O port information. One is iomem and the other is ioports.
Image of page 32
Image of page 33
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern