sz-doctor: Added MTM (Machine Type and Model) code

This commit is contained in:
Gal Szkolnik 2022-06-19 22:53:49 -04:00 committed by Lockszmith
parent 48368fd383
commit 5a4d780cbd
1 changed files with 8 additions and 6 deletions

View File

@ -69,15 +69,17 @@ function check-exist() {
}
#### Output starts here
PROD_NAME=$( sudo dmidecode --type 200 2> /dev/null | tail +5 | tail -2 | head -1 | awk '{print $1}')
printf "%-20s %-44s %-20s\n" "Model" "CPU" "BIOS Firmware"
printf "%-20s %-44s %-20s\n" "$(
sudo dmidecode -s system-family
printf "%-15s %-20s %-44s %-20s\n" "Manufacturer" "Model family" "CPU" "BIOS Firmware"
printf "%-15s %-20s %-44s %-20s\n" "$(
sudo dmidecode -s system-manufacturer
)" "$(sudo dmidecode -s system-family
)" "$(sudo dmidecode -s processor-version
)" "$(sudo dmidecode -s bios-version)"
printf " Product Name: %-49s S/N: %s\n" "$(
printf " Model ID (or MTM): %-44s S/N: %s\n" "${PROD_NAME:-$(
sudo dmidecode -s system-product-name
)" "$(sudo dmidecode -s system-serial-number)"
)}" "$(sudo dmidecode -s system-serial-number)"
echo ''
echo "Shell: $SHELL"