Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Documenting server details

How do I check server configuruation such as Ram, processor, disks etc I'm using CentOS?

share|improve this question

marked as duplicate by Iain Mar 7 '12 at 13:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

Generically, you'd use dmidecode. There's quite a bit of output, so a more specific output can come from the script documented here:

#!/bin/bash
# hwcollect.sh - Collect general system information

# Hostname
echo -e "$HOSTNAME \n"

# Display system manufacturer, model, serial and other attributes
dmidecode -t 1 | egrep '(Manufacturer|Product|Serial)'
dmidecode -t 3 | egrep '(Height)';
dmidecode  -t processor| egrep '(Socket|Version)'
# Calculate installed RAM
dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print "\t" "Installed Ram: " x "MB"}'

echo " "
echo "Disk Information"
# Filesystem mounts
df -h
# Display disk partition table    
fdisk -l

That will produce results that look like:

[root@xetra ~]# ./hwcollect.sh
Pseudo-terminal will not be allocated because stdin is not a terminal.
Test_Server 

        Manufacturer: HP
        Product Name: ProLiant DL380 G6
        Serial Number: 2UX12345KT      
        Height: 2 U
        Socket Designation: Proc 1
        Version: Intel(R) Xeon(R) CPU X5570 @ 2.93GHz            
        Upgrade: Socket LGA1366
        Socket Designation: Proc 2
        Version: Intel(R) Xeon(R) CPU X5570 @ 2.93GHz            
        Upgrade: Socket LGA1366
        Installed Ram: 32768MB
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.