Skip to main content

Posts

Showing posts from September, 2017

checking host hardware using linux kernel

How to collect information about  host without trivial system command   I'm using a lot of hardware boxes with no limit on distro types and versions.  In this case using system command such as ifconfig has a limited usage.  Also,  system config files have a different path and best way for me is getting information from the kernel. Of course,  I'm using cat command for doing this. Next table has information about hardware. Let me know if something is interesting for you and you know something interesting hardware information in the linux kernel file path information /proc/cpuinfo CPU /proc/meminfo memory /sys/block List of block devices. HDD has sd or hd at the beginning /sys/class/block/{digit}/device/model HDD drive and vendor /sys/block/{digit}/size HDD size  /sys/block List of block devices. HDD has sd or hd at the beginning /sys/bus/pci/devices/0000:{digit}/net System name of the network card /sys/devices/virtual/dmi/id/board_*