evangipson / terminal-os

A terminal-based game using Godot and C#
1 stars 0 forks source link

Add a command for users to check their hardware #3

Closed evangipson closed 3 days ago

evangipson commented 1 week ago

This should have output similar to the hwinfo or lshw commands from a linux terminal.

hwinfo output example

$ hwinfo
============ start debug info ============
libhd version 21.82u (x86-64) [7688]
using /var/lib/hardware
kernel version is 6.8
----- /proc/cmdline -----
  BOOT_IMAGE=/boot/vmlinuz-6.8.0-31-generic root=UUID=bda8fef0-0c8a-47f6-9c2d-dadc6882d794 ro quiet splash vt.handoff=7
----- /proc/cmdline end -----
debug = 0xff7ffff7
probe = 0x15938fcdaa17fcf9fffe (+memory +pci +isapnp +net +floppy +misc +misc.serial +misc.par +misc.floppy +serial +cpu +bios +monitor +mouse +scsi +usb -usb.mods +modem +modem.usb +parallel +parallel.lp +parallel.zip -isa -isa.isdn +isdn +kbd +prom +sbus +int +braille +braille.alva +braille.fhp +braille.ht -ignx11 +sys -bios.vbe -isapnp.old -isapnp.new -isapnp.mod +braille.baum -manual +fb +pppoe -scan +pcmcia +fork -parallel.imm +s390 +cpuemu -sysfs -s390disks +udev +block +block.cdrom +block.part +edd +edd.mod -bios.ddc -bios.fb -bios.mode +input +block.mods +bios.vesa -cpuemu.debug -scsi.noserial +wlan -bios.crc -hal +bios.vram +bios.acpi -bios.ddc.ports=0 +modules.pata -net.eeprom +x86emu=dump -max -lxrc)
shm: attached segment 3 at 0x766f4388a000
>> hal.1: read hal data
>> floppy.1: get nvram
>> floppy.2: klog info
>> bios.1: cmdline
>> bios.1.1: apm
...

lshw output example

$ sudo lshw -short
[sudo] password for shs:
H/W path               Device      Class          Description
=============================================================
                                   system         Inspiron 530s
/0                                 bus            0RY007
/0/0                               memory         128KiB BIOS
/0/4                               processor      Intel(R) Core(TM)2 Duo CPU
/0/4/a                             memory         32KiB L1 cache
/0/4/b                             memory         6MiB L2 cache
/0/24                              memory         6GiB System Memory
/0/24/0                            memory         2GiB DIMM DDR2 Synchronous 667
/0/24/1                            memory         1GiB DIMM DDR2 Synchronous 667
/0/24/2                            memory         2GiB DIMM DDR2 Synchronous 667
/0/24/3                            memory         1GiB DIMM DDR2 Synchronous 667
/0/1                               generic
/0/10                              generic
/0/11                              generic
/0/12                              generic
/0/13                              generic
/0/14                              generic
/0/15                              generic
/0/17                              generic
/0/18                              generic
/0/19                              generic
/0/2                               generic
/0/20                              generic
/0/100                             bridge         82G33/G31/P35/P31 Express DRAM
/0/100/1                           bridge         82G33/G31/P35/P31 Express PCI
/0/100/1/0                         display        Caicos [Radeon HD 6450/7450/84
/0/100/1/0.1                       multimedia     Caicos HDMI Audio [Radeon HD 6
/0/100/19              enp0s25     network        82562V-2 10/100 Network Connec
/0/100/1a                          bus            82801I (ICH9 Family) USB UHCI
/0/100/1a/1            usb3        bus            UHCI Host Controller
/0/100/1a.1                        bus            82801I (ICH9 Family) USB UHCI
/0/100/1a.1/1          usb4        bus            UHCI Host Controller
/0/100/1a.1/1/2                    input          Rock Candy Wireless Keyboard
/0/100/1a.2                        bus            82801I (ICH9 Family) USB UHCI
/0/100/1a.2/1          usb5        bus            UHCI Host Controller
/0/100/1a.2/1/2                    input          USB OPTICAL MOUSE
/0/100/1a.7                        bus            82801I (ICH9 Family) USB2 EHCI
/0/100/1a.7/1          usb1        bus            EHCI Host Controller
/0/100/1b                          multimedia     82801I (ICH9 Family) HD Audio
/0/100/1d                          bus            82801I (ICH9 Family) USB UHCI
/0/100/1d/1            usb6        bus            UHCI Host Controller
/0/100/1d/1/1          scsi4       storage        CD04
/0/100/1d/1/1/0.0.0    /dev/sdc    disk           Card Reader-1
/0/100/1d/1/1/0.0.0/0  /dev/sdc    disk
/0/100/1d/1/1/0.0.1    /dev/sdd    disk           2
/0/100/1d/1/1/0.0.1/0  /dev/sdd    disk
/0/100/1d.1                        bus            82801I (ICH9 Family) USB UHCI
/0/100/1d.1/1          usb7        bus            UHCI Host Controller
/0/100/1d.2                        bus            82801I (ICH9 Family) USB UHCI
/0/100/1d.2/1          usb8        bus            UHCI Host Controller
/0/100/1d.7                        bus            82801I (ICH9 Family) USB2 EHCI
/0/100/1d.7/1          usb2        bus            EHCI Host Controller
/0/100/1d.7/1/2                    multimedia     USB  Live camera
/0/100/1e                          bridge         82801 PCI Bridge
/0/100/1e/1                        communication  HSF 56k Data/Fax Modem
/0/100/1f                          bridge         82801IR (ICH9R) LPC Interface
/0/100/1f.2            scsi0       storage        82801IR/IO/IH (ICH9R/DO/DH) 4
/0/100/1f.2/0          /dev/sda    disk           120GB SSD2SC120G1CS175
/0/100/1f.2/0/1        /dev/sda1   volume         111GiB EXT4 volume
/0/100/1f.2/1          /dev/cdrom  disk           DVD+-RW GSA-H73N
/0/100/1f.3                        bus            82801I (ICH9 Family) SMBus Con
/0/100/1f.5            scsi3       storage        82801I (ICH9 Family) 2 port SA
/0/100/1f.5/0.0.0      /dev/sdb    disk           500GB SAMSUNG HE502HJ
/0/100/1f.5/0.0.0/1    /dev/sdb1   volume         433GiB EXT4 volume
/0/3                               system         PnP device PNP0c02
/0/5                               system         PnP device PNP0b00
/0/6                               storage        PnP device PNP0700
/0/7                               system         PnP device PNP0c02
/0/8                               system         PnP device PNP0c02
/0/9                               system         PnP device PNP0c01
evangipson commented 3 days ago

This was completed in commit 7fcb64b.