How to: Find the model and serial number of a Linux server
We all know how to get the cpu and memory details from our Linux servers. However, I recently found myself looking for the actual model as well as serial number of one of our remote Linux servers. Not wanting to travel to data center, I started looking for commands that would give me the type of info I was looking for (i.e HP DL360).
So I came across the command dmidecode. Simply type the following as root to get your system’s model type:
# dmidecode -t system SMBIOS 2.3 present. Handle 0x0100, DMI type 1, 25 bytes. System Information Manufacturer: HP Product Name: ProLiant DL380 G4 Version: Not Specified Serial Number: XXXXXXXXXXX UUID: XXXXXXX-XXXXX-XXXXXXX-XXXXXXXX-XXXXXXXX Wake-up Type: Power Switch Handle 0x2000, DMI type 32, 11 bytes. System Boot Information Status: No errors detected
As you can see above, I’ve X’d out the Serial # and UUID to protect the identify of the server. The rest simply states what you’re looking for…HP DL380 G4.
The following is what you can use with exchange for ‘system’ with a -t argument:
bios system baseboard chassis processor memory cache connector slot
So to find out, the memory allocation per slot just type dmidecode -t memory.