From 5a4d780cbd092d7a7328d290c7ba09af590f1104 Mon Sep 17 00:00:00 2001 From: Gal Szkolnik Date: Sun, 19 Jun 2022 22:53:49 -0400 Subject: [PATCH] sz-doctor: Added MTM (Machine Type and Model) code --- _home/private_dot_local/bin/executable_sz-doctor | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/_home/private_dot_local/bin/executable_sz-doctor b/_home/private_dot_local/bin/executable_sz-doctor index 8cb0c09..cbe55ae 100644 --- a/_home/private_dot_local/bin/executable_sz-doctor +++ b/_home/private_dot_local/bin/executable_sz-doctor @@ -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" "$( - sudo dmidecode -s system-product-name - )" "$(sudo dmidecode -s system-serial-number)" +printf " Model ID (or MTM): %-44s S/N: %s\n" "${PROD_NAME:-$( + sudo dmidecode -s system-product-name + )}" "$(sudo dmidecode -s system-serial-number)" echo '' echo "Shell: $SHELL"