0

Possible Duplicate:
Documenting server details

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

0

1 Answer 1

0

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

Not the answer you're looking for? Browse other questions tagged .