Get DIMM and CPU Socket Information

I want to get the number of RAM slots (DIMMs) and the processor socket of a PC on Linux.

There is a command on Linux dmidecode, but this command must be run with sudo/ root permissions.

Anyone can tell me another solution for getting DIMM and CPU socket without using sudo/ root permissions.

+3
source share
1 answer

The only thing that has information is SMBIOS / DMI, and the only way to access this is through /dev/mem.

If you are interested in the fact that the user has too many privileges using sudo, you can add specific permission to run dmidecode by a specific user:

stub example from sudoers file:

# Cmnd alias specification
Cmnd_Alias  DMI_COMMANDS = /usr/sbin/dmidecode -t memory

dmiuser ALL= NOPASSWD: DMI_COMMANDS

dmiuser dmidecode -t memory ( ).

+3

All Articles