Getting hardware information from Linux to help Forum Helpers

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,113
Reaction score
5,991
Credits
23,535
surprising buddha's link does not mention inxi, it is either installed or available across the Families (and no reflection on buddha :) )

we ask for its output all the time

a tip for the viewers -

inxi -Fxs will give YOU a lot you can use, store it in a text file. it show MAC addresses for connections

inxi -Fxz will filter out the MAC for showing to people such as us

enjoy your linux

wiz
 


Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
365
Reaction score
274
Credits
4,370
One other important tool: lsmod.
Knowing what modules are loaded (or not loaded) does very well in diagnosing hardware issues {and even software problems like sound loopback not working). Using grep on the output is very useful if you know what to look for.

And just a mention of more tools:

lsusb (-t option is useful) as some boards' usb ports are actually hubs of a single port.

Either dmesg with grep/head/tail (depending on what info you need). You'll see a lot about hardware failing, device status on startup, hotplugging, etc.

Yeah, but you can't Copy and Paste from there very easily..... :)
True in most cases, but some of the more modern firmwares can save screenshots to a FAT/FAT32 flashdrive. My X570 board does, for example. Things have come a long way in about 10 years.
However, I agree with you that its use is limited since the BIOS only has basic info that you can get from the system. Its only use is components it might "see" that the OS may not, or may "see" as a generic pnp device.
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
365
Reaction score
274
Credits
4,370
surprising buddha's link does not mention inxi, it is either installed or available across the Families (and no reflection on buddha :) )

we ask for its output all the time
Thumbs up! Most forums ask for this output in spoiler tags or as a text attachment.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,113
Reaction score
5,991
Credits
23,535
@Fanboi , reading your Posts here has prompted me to modify the original Thread Title, from ending with "forum staff" to "Forum Helpers". I know the OP, Ryan would not mind.

I am not sure of the situation back in 2014, but the last 4 years I have been here, we have seen a situation develop whereby we have maybe to 10 times as many regular, knowledgeable Members helping wherever they can, in addition to Staff, and I think the change in Title reflects that.

Cheers for the input, and consider swinging over to Member Introductions and telling us a little of the @Fanboi story. Also there is a survey run by @KGIII here on how long you have been using Linux

Cheers, and thanks for the input

Wizard
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
365
Reaction score
274
Credits
4,370
Thanks @wizardfromoz, I didn't know there was an introduction thread. I shall, briefly post my life, death, and resurrection story then XD.
 

kc1di

Well-Known Member
Joined
May 14, 2021
Messages
900
Reaction score
762
Credits
6,408
Inxi in most distros will give you a nice readout of hardware and conditions on machine.
In Ubuntu you'll have to install it. see here for details. inxi
 

Nik-Ken-Bah

Well-Known Member
Joined
Sep 9, 2019
Messages
708
Reaction score
673
Credits
2,477
@wizardfromoz

Quote

"hardinfo

Code:
sudo apt-get -y install hardinfo
... this one resembles Windows msinfo32 device summary,"

Thanks for that input line as it is now done and the application is very informative. :)
I already have the Psensor installed as it helps me monitor CPU temp especially though Summer.
 

Nik-Ken-Bah

Well-Known Member
Joined
Sep 9, 2019
Messages
708
Reaction score
673
Credits
2,477
Inxi in most distros will give you a nice readout of hardware and conditions on machine.
In Ubuntu you'll have to install it. see here for details. inxi
Thanks for that link :cool: and had a quick gander at it and it is something to just keep well back in me scone.
 

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
2,365
Reaction score
1,586
Credits
17,752
Mint and other Ubuntu based distros come with inxi
in a terminal put inxi -Fnx [for personal use] or inxi -Fnxz [for copy and paste to forums] adding z removes certain what could be called sensitive information
 

Nik-Ken-Bah

Well-Known Member
Joined
Sep 9, 2019
Messages
708
Reaction score
673
Credits
2,477
Mint and other Ubuntu based distros come with inxi
Thank you appreciated though I just brought up the terminal and entered inxi -Fnx and this is what it come up with
INXI -40.png

So what am I doing wrong Bro?
But I know now what I did wrong now:eek: I forgot to put a space between the i and the dash so some mothers do hav'em. :D
 
Last edited:

anneranch

Active Member
Joined
Mar 16, 2019
Messages
223
Reaction score
43
Credits
2,078
Hello everyone,

I don't think this should be in the forum assistance or forum announcements..so I put it here.

When seeking help on the forum, providing hardware specifications can be the key to solving problems. With this post I hope to show some basic commands and tools to help everyone do that.

My first program is a newcomer that I saw on LAS (Linux action show, jupiterbroadcasting.com)

  • I-Nex. This program is the GNU/Linux equivalent to CPU-Z from Windows. It provides an easy to use interface and can generate reports that users can upload to sites like postbin. I recommend using this tool to make hardware reports and attaching them to your posts here at linux.org home page: http://i-nex.linux.pl/ View attachment 1327The second Tool I want to mention is LSHW. LSHW (LiSt HardWare) is a commandline/graphical tool that gives just as much information as I-Nex. The difference being comandline support. View attachment 1328
  • Lastly I am going to mention good old lspci. List PCI is a program that will list all the pci devices on a computer. When using it in a general way, lspci will only name the PCI devices and the device ID. To get more detailed information on a PCI device, you can use the following:
    Code:
    lspci -v -s ID
    for AGP devices, you can use lsagp in the same fashion.
If anyone else knows of some good hardware information listing software, pleas post them. Remember, this post is to show how anyone can get basic hardware information with GNU/Linux. Please list your hardware when asking for help in the forums.
Troubleshooting hardware is seldom at fault when new OS software is installed, from ISO, and immediately has to be updated / upgraded and then user gets this :


rm: cannot remove '/var/tmp/mkinitramfs_BIbIhT/scripts': Read-only file system
rm: cannot remove '/boot/initrd.img-5.13.0-22-generic.dpkg-bak': Read-only file system
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Setting up python3-problem-report (2.20.11-0ubuntu71) ...
dpkg: cannot write to log file '/var/log/dpkg.log': Read-only file system
dpkg: cannot write to log file '/var/log/dpkg.log': Read-only file system
dpkg: unrecoverable fatal error, aborting:
unable to flush updated status of 'python3-problem-report': Read-only file system
touch: cannot touch '/var/lib/update-notifier/dpkg-run-stamp': Read-only file system
E: Sub-process /usr/bin/dpkg returned an error code (2)
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go (30: Read-only file system)
[email protected]:~$ sudo apt upgrade
[sudo] password for qa:
\W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
[email protected]:~$ \sudo dpkg --configure -a
dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system
[email protected]:~$ sudo dpkg --configure -a
dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system
[email protected]:~$

...and here is my NEW troubleshooting start point :

[email protected]:~$ uname -a
Linux qa-desktop 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[email protected]:~$
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,113
Reaction score
5,991
Credits
23,535
1. What was the command you issued before you got the line

rm: cannot remove '/var/tmp/mkinitramfs_BIbIhT/scripts': Read-only file system ?

Please always include the command in full, including options.

2. What partition are you on, and is this on a drive that you have not used before, or recently reformatted?

3. What Linux Distro are you trying to update?

Wizard
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,113
Reaction score
5,991
Credits
23,535
The above 2 Posts should really be in a separate Thread.

But before I do that, take a read here, it may have your answer.

https://www.linux.org/threads/unable-to-access-the-dpkg-database-directory-in-endless.38059/

Read Jas's response at 3. and see if it applies. Ubuntu have a process called Unattended Upgrades, which can tie up apt and other upgrade alternatives while it is running.

Run your distro for maybe 30 minutes, and then try again, if updating is what you were trying to do.

Wizard
 
OP
N

NorthWest

Guest
Hardware information from software:

dmidecode --- as root provides hardware and bios info from SMBIOS data structure. It doesn't directly access the hardware.
[Pkg: dmidecode]

lscpu --- cpu info, also obtainable from /proc/cpuinfo. [Pkg: util-linux]

lshw --- cpu, memory, disk, usb controllers, network adapters etc. Lshw extracts the information from different /proc files.
[Pkg: lshw]

lspci --- (e.g. -nnk) --- shows hardware and kernel modules. [Pkg: pciutils]

lsusb --- (e.g. -v) --- shows usb devices. [Pkg: usbutils]

inxi --- (e.g. -Fnx) a script that uses multiple sources to show hardware. [Pkg: inxi]

lsblk --- (e.g. --output NAME SIZE TYPE MOUNTPOINT UUID) ---shows block devices. [Pkg: util-linux]

hdparm --- (e.g. -i /dev/sda) --- hard disk info. [Pkg: hdparm]

smartctl --- (e.g. -i ) --- prints hard disk info including serial no. [Pkg: smartmontools]

hardinfo --- knows about PCI, ISA PnP, USB, IDE, SCSI, serial and parallel port devices. [Pkg: hardinfo]

cpu-x --- cpu, RAM, temperature, OS info. [Pkg: cpu-x]

hwinfo --- cdrom, zip, floppy, disks and partitions, network card, graphics card, monitor, camera, mouse, sound, pppoe, isdn,
modem, printer, scanner, bios, cpu, usb, memory and smp. [Pkg: hwinfo]

fdisk --- (e.g. -l) disks and partitions from root shell. [Pkg: fdisk]

ip --- (e.g. -a) networking device info. [Pkg: iproute2]

dmesg --- kernel messages on hardware. (For video card RAM e.g. | grep -i vram). [Pkg: util-linux]

lsmod --- lists modules. [Pkg: kmod]

modinfo --- info of named modules. [Pkg: kmod]

sensors --- temperatures of motherboard, cpu and video card. [Pkg: lm-sensors]

glxinfo --- OpenGL video info. (For video card RAM e.g. | grep -i video). [Pkg: mesa-utils]

xrandr --- screen capabilities and hardware video connections. [Pkg: x11-server-utils]

discover --- hardware detection utility
 
Last edited by a moderator:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top