What Hardware Do I Have?
First up is lshw. This utility LiSts HardWare (lshw). If you run it as a regular user, it actually warns you to run it as root. So go ahead and run sudo lshw. You should see screens of information for your system. The first section will be general information and should look something like this:
jbernard-eeepc description: Notebook product: 700 vendor: ASUSTeK Computer INC. version: 0129 serial: EeePC-1234567890 width: 32 bits capabilities: smbios-2.5 dmi-2.5 smp-1.4 smp configuration: boot=normal chassis=notebook ↪cpus=1 uuid=XXXXXX-XXXXX-XXXXX-XXXXX
This is what I get when I run it on my little ASUS EeePC. Right away you can find the manufacturer of this little beast (ASUSTeK), the BIOS version (0129), and the fact that it's a 32-bit machine with one CPU. More information is broken down into the following categories:
core firmware - motherboard and BIOS information cpu - CPU information cache - cache information memory - memory information bank - specific bank memory information pci - PCI bus information display - PCI display adapter multimedia - PCI audio adapter pci - other PCI devices network - PCI network adapter usb - USB devices ide - IDE information disk - individual disks volume - volumes on this disk
For an idea on how much information is available, the main memory section shows this about my EeePC:
*-memory description: System Memory physical id: 1f slot: System board or motherboard size: 512MiB *-bank description: DIMM DDR2 Synchronous 400 MHz (2.5 ns) product: PartNum0 vendor: Manufacturer0 physical id: 0 serial: SerNum0 slot: DIMM0 size: 512MiB width: 64 bits clock: 400MHz (2.5ns)
This utility is basically an all-in-one tool that spits out everything on your system in one go. But, what if you want information only about specific subsystems in your machine? An entire suite of utilities exists for this, and they might be more useful when you need some specific piece of information or want to do some system querying in a script.
You may want to look at the CPU. The lscpu utility provides output similar to the following:
Architecture: i686 CPU op-mode(s): 32-bit CPU(s): 1 Thread(s) per core: 1 Core(s) per socket: 1 CPU socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 13 Stepping: 8 CPU MHz: 571.427
From this, you can see the manufacturer, whether it's 32-bit or 64-bit, the exact version and model, as well as the current CPU frequency.
If you want to know whether your video card is supported by X11, or whether you need to find a third-party driver, you can use lspci. This utility gives a list of all the devices plugged in to your PCI bus. The output looks something like this:
00:02.0 VGA compatible controller: Intel Corporation ↪Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04) 00:02.1 Display controller: Intel Corporation ↪Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
This information shows that the video controller in my EeePC is an Intel controller. So, if you wanted, you now could search Google with this information to learn about your video card and how best to configure it. If you want to see what USB devices are on your system, use lsusb. On my EeePC, I have an SD card installed, and it shows up as this:
Bus 001 Device 002: ID 0951:1606 Kingston Technology
If you're interested in the disk subsystem, you can find out what your system has with the blkid utility. This utility prints out all the available filesystems, with the following output format:
/dev/sda1: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="ext2" /dev/sda2: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="swap" /dev/sda3: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="ext2" /dev/sdb1: UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" TYPE="ext2"
With this utility, you can learn what devices are available and what filesystems are being used on them. The associated UUIDs also are available if you want to use them in the entries in /etc/fstab.
Now that you know what kind of hardware you have on your system, the last thing to check is to see whether your kernel actually is using the available hardware. On most modern distributions, the kernel is compiled to use modules. You can check to see which modules are loaded by using the lsmod command. You will get a list that looks like this:
agpgart 31788 2 drm,intel_agp lp 7028 0 video 17375 1 i915 output 1871 1 video
You can see that the agpgart module has a size of 31788 bytes and is used by the drm and intel_agp modules.
Now, hopefully, you can configure and optimize your hardware so that you get the most out of it. If you find other utilities not covered here, I would love to hear about them.Photo Credit: © Nenov Brothers/Shutterstock
Joey Bernard has a background in both physics and computer science. This serves him well in his day job as a computational research consultant at the University of New Brunswick. He also teaches computational physics and parallel programming.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide