Join Chaim Krause for an in-depth discussion in this video Display hardware information, part of SUSE Linux Enterprise Server Essential Training.
- [Instructor] At some point, you're probably gonna have to dig deep into the system, and check the state of things when you're troubleshooting. I'm gonna show you a couple commands you can use to get detailed information. These are the kind of commands that you write down and you put them on an index card, and you probably will forget about them until the day you need them, at which point you're gonna be glad you had that index card sitting there with them written on it. First one is lscpu.
And this is gonna give you all kinds of information about the CPU, or CPUs that are installed on your box. I'm gonna page up here so we can see how it begins. And so we can see we got 32, 34 bit, we've got four CPUs, one thread per core. Xeon processor, you can get your megahertz. You can tell whether your virtualization is running, how big your caches are. Now your CPU's gonna connect to your bus, so let's clear our screen and then do lspci.
And see what is on our PCI bus. So, once again I'm gonna shift up so we can see. You can see you got your host bridge, PCI bridge, ISA bridge, IDE, et cetera, et cetera. Detailed information about that, would you say that is not detailed enough? Then I say no problem, do the same thing but add dash V for verbose. And you wouldn't normally pipe it through less, but I am going to do so here for demonstration purposes, so it doesn't scroll off the screen.
And you can see now we've got more detailed information for each item. This is the kind of information you need when drivers aren't working properly, or you're not sure if you've got a hardware mismatch. Another thing you can use is the dash K, which will give you information about the kernel. What kernel driver is being used, what kernel module is being used for each of those things on the bus.
Besides the PCI bus, we've got USB devices. So we can do lsusb and get info about that. Sometimes it makes more sense if you add a dash T for tree and you can see the dependencies. With the USB bus you can also get more information by using USB-devices and you'll get more detailed information than you will off the lsusb.
Now there's a good place to look for information about the state of the system at any given time, and that is the proc file system. So let's change to the proc directory, clear our screen, and take a look at what we've got there. These are all the processes that are running. But there's also information about hardware. I'll point out a couple of them to you. There's CPU info, so we can cat cpuinfo.
We can get information about the CPU in this file. If you're interested in memory there is a similar file called meminfo, where you can get detailed information about how the memory is being allocated. Probably if you're troubleshooting something, you're gonna worry about the exact version of the operating system that you're running. So we can cat version and we can get detailed information about which version of linux you are running at the time.
So these are some places you can look when you need more information about your hardware.
- What is SUSE Linux Enterprise?
- Installing SLES
- Linux file types
- Working at the command line
- Managing processes
- Working with background processes
- Managing users and groups
- Changing file permissions
- Configuring network interfaces
- Displaying hardware information
- Managing drivers