updated large1 ascii

This commit is contained in:
2025-02-21 20:41:24 -05:00
parent 97eb9b2b3b
commit 4be09875c4

View File

@ -3,9 +3,16 @@
# Define the ASCII art maps # Define the ASCII art maps
large1=''' large1='''
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │
│ large1 │ │ large1 │
│ │ │ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Motherboard │ │
│ │ │ │
│ │ ┌──┐┌──┐ │ │
│ │ │M1││M2│ │ │
│ │ └──┘└──┘ │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ 1 │ │ 2 │ │ 3 │ │ │ │ 1 │ │ 2 │ │ 3 │ │
@ -106,17 +113,30 @@ case "$HOSTNAME" in
;; ;;
esac esac
# Enhanced Drive Information Function map_drives_to_layout() {
get_drive_info() { local server_type=$1
local drive=$1 case $server_type in
echo "=== Detailed info for $drive ===" "large1")
if [[ $drive == *"nvme"* ]]; then for i in {1..9}; do
sudo nvme smart-log "$drive" local drive_info=$(get_drive_info_for_position $i)
else echo "Position $i: $drive_info"
sudo smartctl -A "$drive" | grep -E "Temperature|Power|Health" done
fi ;;
esac
} }
# Enhanced Drive Information Function
get_drives_info() {
local path="/dev/disk/by-path"
for drive in "$path"/*; do
if [ -L "$drive" ]; then
echo "$(basename "$drive") $(readlink -f "$drive")"
fi
done
}
DRIVE_PATHS=$(get_drives_info | awk '{print $1, $2}')
# Initialize array for "not found" messages # Initialize array for "not found" messages
not_found=() not_found=()
@ -141,7 +161,7 @@ if [ -n "$mmc_output" ]; then
fi fi
# Show SATA Drives only if present # Show SATA Drives only if present
sata_output=$(lsblk -o NAME,SIZE,TYPE,MOUNTPOINT | grep "disk" | grep -v "mmcblk" | grep -v "rbd" | sort) sata_output=$(lsblk -d -o NAME,SIZE,TYPE,MOUNTPOINT | grep "disk" | grep -v "nvme" | grep -v "rbd" | sort | column -t)s
if [ -n "$sata_output" ]; then if [ -n "$sata_output" ]; then
echo -e "\n=== SATA Drives ===\n" echo -e "\n=== SATA Drives ===\n"
printf "%-15s %-10s %-10s %-20s\n" "DEVICE" "SIZE" "TYPE" "MOUNTPOINT" printf "%-15s %-10s %-10s %-20s\n" "DEVICE" "SIZE" "TYPE" "MOUNTPOINT"