#!/bin/sh -e

##########################################################################
#   Title:
#       Optional, defaults to the name of the script sans extention
#
#   Section:
#       8
#
#   Synopsis:
#       
#   Description:
#       
#   Arguments:
#       
#   Returns:
#
#   Examples:
#
#   Files:
#
#   Environment:
#
#   See also:
#       
#   History:
#   Date        Name        Modification
#   2024-11-12  Jason Bacon Add man page template and usage
##########################################################################

usage()
{
    printf "Usage: $0\n"
    exit 1
}


##########################################################################
#   Main
##########################################################################

if [ $# != 0 ]; then
    usage
fi

if ! which dmidecode > /dev/null 2>&1; then
    printf "You must install dmidecode to use $0.\n"
    exit 1
fi

printf "BIOS:\n"
dmidecode -t bios | egrep 'Vendor|Version'

printf "\nSystem:\n"
dmidecode -t system | egrep 'Manufacturer|Product|Serial|UUID'

printf "\nBase board:\n"
dmidecode -t baseboard | egrep 'Manufacturer|Product|Version|Serial'

printf "\nCPUs:\n"
dmidecode -t processor | egrep 'Socket|Version|Speed|Core|Thread'

printf "\nMemory:\n"
dmidecode -t memory | egrep 'Capacity|Size|Locator|Type|Speed.*MT'

cat << EOM

Run dmidecode directly for more detailed information.

EOM
