This commit is contained in:
90
proxDoc.sh
90
proxDoc.sh
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION="1.1.0"
|
VERSION="1.1.0"
|
||||||
SPINNER="/-\|"
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Color Definitions
|
# Color Definitions
|
||||||
@@ -47,20 +46,6 @@ log_message() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
show_progress() {
|
|
||||||
local pid=$1
|
|
||||||
local delay=0.1
|
|
||||||
local spinstr='|/-\'
|
|
||||||
while ps -p $pid > /dev/null; do
|
|
||||||
local temp=${spinstr#?}
|
|
||||||
printf " [%c] " "$spinstr"
|
|
||||||
local spinstr=$temp${spinstr%"$temp"}
|
|
||||||
sleep $delay
|
|
||||||
printf "\b\b\b\b\b\b"
|
|
||||||
done
|
|
||||||
printf " \b\b\b\b"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_requirements() {
|
check_requirements() {
|
||||||
log_message info "Checking medical equipment..."
|
log_message info "Checking medical equipment..."
|
||||||
local tools=("dmidecode" "lscpu" "ip" "smartctl" "sensors" "lspci" "bc")
|
local tools=("dmidecode" "lscpu" "ip" "smartctl" "sensors" "lspci" "bc")
|
||||||
@@ -546,32 +531,59 @@ runDiags() {
|
|||||||
log_message warn "Not running on Proxmox VE - some checks will be skipped"
|
log_message warn "Not running on Proxmox VE - some checks will be skipped"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(
|
echo ""
|
||||||
get_system_info
|
|
||||||
get_cpu_info
|
|
||||||
get_ram_info
|
|
||||||
get_memory_details
|
|
||||||
get_storage_info
|
|
||||||
get_drive_atlas
|
|
||||||
get_network_info
|
|
||||||
get_detailed_network
|
|
||||||
get_nic_details
|
|
||||||
get_hardware_info
|
|
||||||
get_motherboard_info
|
|
||||||
get_hba_info
|
|
||||||
get_temp_info
|
|
||||||
get_system_status
|
|
||||||
get_node_exporter_status
|
|
||||||
get_hwmon_status
|
|
||||||
|
|
||||||
# Only run Proxmox-specific checks if on Proxmox
|
log_message info "Checking system information..."
|
||||||
if [[ "$is_proxmox" == true ]]; then
|
get_system_info
|
||||||
get_ceph_health
|
|
||||||
list_vms
|
|
||||||
list_containers
|
|
||||||
fi
|
|
||||||
) & show_progress $!
|
|
||||||
|
|
||||||
|
log_message info "Checking CPU..."
|
||||||
|
get_cpu_info
|
||||||
|
|
||||||
|
log_message info "Checking RAM..."
|
||||||
|
get_ram_info
|
||||||
|
|
||||||
|
log_message info "Checking memory details..."
|
||||||
|
get_memory_details
|
||||||
|
|
||||||
|
log_message info "Checking storage..."
|
||||||
|
get_storage_info
|
||||||
|
|
||||||
|
log_message info "Checking drive atlas..."
|
||||||
|
get_drive_atlas
|
||||||
|
|
||||||
|
log_message info "Checking network..."
|
||||||
|
get_network_info
|
||||||
|
get_detailed_network
|
||||||
|
get_nic_details
|
||||||
|
|
||||||
|
log_message info "Checking hardware..."
|
||||||
|
get_hardware_info
|
||||||
|
get_motherboard_info
|
||||||
|
get_hba_info
|
||||||
|
|
||||||
|
log_message info "Checking temperatures..."
|
||||||
|
get_temp_info
|
||||||
|
|
||||||
|
log_message info "Checking system status..."
|
||||||
|
get_system_status
|
||||||
|
|
||||||
|
log_message info "Checking monitoring services..."
|
||||||
|
get_node_exporter_status
|
||||||
|
get_hwmon_status
|
||||||
|
|
||||||
|
# Only run Proxmox-specific checks if on Proxmox
|
||||||
|
if [[ "$is_proxmox" == true ]]; then
|
||||||
|
log_message info "Checking Ceph cluster..."
|
||||||
|
get_ceph_health
|
||||||
|
|
||||||
|
log_message info "Checking VMs..."
|
||||||
|
list_vms
|
||||||
|
|
||||||
|
log_message info "Checking containers..."
|
||||||
|
list_containers
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
log_message info "Examination complete"
|
log_message info "Examination complete"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user