hardware info in linux code example
Example 1: linux command to show memory hardware
$ cat /proc/partitions
major minor #blocks name
8 0 488386584 sda
8 1 73400953 sda1
8 2 1 sda2
8 5 102406311 sda5
8 6 102406311 sda6
8 7 1998848 sda7
8 8 208171008 sda8
11 0 1048575 sr0
Example 2: linux command to show memory hardware
# free - Check RAM
$ free -m
total used free shared buffers cached
Mem: 7975 5865 2110 0 24 622
-/+ buffers/cache: 5218 2757
Swap: 1951 921 1030