I am writing a program where I need to know about the machine configuration. Code will run on Linux. I want to find the following:
- Number of CPU Cores
- Number of CPU Sockets
- Number of Disks
- If it's a 4 socket processor then which 2 sockets are adjacent to each other
Does Linux expose this information in some file that I can read in to get this information?
What are some good resources to read about such linux internals?
dmidecode
,lshw
,lscpu
,lsblk
,inxi
...