Every operating system has what’s called a kernel, the meat between the two slices of bread that are your software applications and computer hardware. Windows, Linux and Mac OS X all have kernels. You can access most of the features in Windows through the Windows API (Application Programming Interface). In Linux, you can find out much about your computer hardware (and what’s happening with the kernel itself) by using what’s known as the proc file system.
It’s a series of files that are updated with information coming from the kernel. Look inside the root folder of any Linux PC and you’ll find the /proc folder. Inside is a swag of subfolders that allow you to access up-to-the-minute information about your PC from its processor clock speed to battery life, power consumption, system memory, hard drive capacities and so on. One of the quickest ways to use the /proc folder is via the concatenate (cat) command in Terminal.
For example, to find out what the CPU is inside your Linux PC, start Terminal and type: cat /proc/cpuinfo. You’ll get everything from its nominal and actual clock speeds to its internal cache, along with other technologies it may have, such as Intel’s SSE multimedia extensions. You can use it more efficiently by adding in the grep (Global Regular Expression Print) command. It’s basically a search command originally built into Unix and later added to Linux. Using the pipe command | you can direct the output of one command into another and get it to display just the information you’re after. For example, if you wanted to know just the name of the CPU, type this in Terminal: cat /proc/cpuinfo | grep "model name" and you’d get back just the entries that show the CPU model name. The number of entries returned is equal to the number of threads your CPU supports, so if you’re using a quad-core CPU that supports Hyper-Threading, you’ll see eight model name entries.
You’ll find the commands needed for a range of PC component information below:
Linux cat commands
| PC component | Linux command |
|---|---|
| CPU – type | cat /proc/cpuinfo | grep “model name” |
| CPU – clock speed | cat /proc/cpuinfo | grep “cpu MHz” |
| CPU – power management | cat /proc/acpi/processor/CPU0/info |
| Memory – total | cat /proc/meminfo | grep “MemTotal” |
| Memory – free | cat /proc/meminfo | grep “MemFree” |
| Graphics card – Nvidia | cat /proc/drivers/nvidia/cards/0 | grep “Model” |
| Drives – hard disk drives & optical | cat /proc/scsi/scsi |
Just type the command into a Terminal window (Start —> Accessories —> Terminal), press Enter and the information you’re after will appear.
System monitor
Another useful tool to have on board is the GNOME System Monitor. It’s similar to the Windows Task Manager in that it enables you to see the CPU and memory usage, as well as shut down processes that may be hogging system resources, but won’t obey the ‘close window’ command. You can easily install it into any version of UserOS by typing the following in a Terminal window: sudo apt-get install gnome-system-monitor. Once it’s installed, you’ll find it at Start —> System —> ‘System Monitor’. It will give you basic component information, although the cat commands will give you more specific details.
However, the graphical nature of System Monitor will make it easier to see trends and issues as they arise. For example, to delete a process running in UserOS, start up System Monitor, click on the Process tab and find the process you stopped. Right-click it and select ‘Kill process’ from the context menu. You need to be exceptionally careful, since killing the wrong process could lock up your PC. If you know it’s an application that’s causing you grief, this is one way to stop it. Of course, you’ll probably lose any unsaved information, so as we said, use it carefully.
One of the things we often say is that it’s always important to know exactly what’s inside your computer and what’s going on. This is especially true if you’re thinking about upgrading because you need to know your starting point before you get going. Using system monitoring tools, and even the old cat and grep commands, can help you get a handle on what’s doing inside your Linux PC. Hopefully it’ll help you see that while Windows and Linux might have many ideological differences, they’re not all that different under the bonnet.






