Compare commits
1 Commits
76f7aaa64c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| daafb6c4fb |
@@ -32,6 +32,7 @@ The script requires the following tools to be installed:
|
|||||||
- smartctl
|
- smartctl
|
||||||
- sensors
|
- sensors
|
||||||
- lspci
|
- lspci
|
||||||
|
- bc
|
||||||
|
|
||||||
Optional tools for enhanced diagnostics:
|
Optional tools for enhanced diagnostics:
|
||||||
- ethtool (for detailed NIC information including link speed and firmware)
|
- ethtool (for detailed NIC information including link speed and firmware)
|
||||||
|
|||||||
12
proxDoc.sh
12
proxDoc.sh
@@ -331,7 +331,7 @@ get_memory_details() {
|
|||||||
|
|
||||||
# Parse fields - be very specific to avoid matching wrong lines
|
# Parse fields - be very specific to avoid matching wrong lines
|
||||||
# Locator (but not Bank Locator)
|
# Locator (but not Bank Locator)
|
||||||
if [[ "$line" =~ ^[[:space:]]*Locator:[[:space:]]*(.+)$ ]] && [[ ! "$line" =~ Bank[[:space:]]*Locator ]]; then
|
if [[ "$line" =~ ^[[:space:]]*Locator:[[:space:]]*(.+)$ ]] && [[ ! "$line" == *Bank*Locator* ]]; then
|
||||||
locator="${BASH_REMATCH[1]}"
|
locator="${BASH_REMATCH[1]}"
|
||||||
locator="${locator// /_}"
|
locator="${locator// /_}"
|
||||||
# Size
|
# Size
|
||||||
@@ -380,12 +380,9 @@ get_memory_details() {
|
|||||||
echo -e "\n${GREEN}Memory Summary:${NC}"
|
echo -e "\n${GREEN}Memory Summary:${NC}"
|
||||||
|
|
||||||
# Count slots and populated using simpler grep approach
|
# Count slots and populated using simpler grep approach
|
||||||
|
# Pattern ^[[:space:]]*Locator: already excludes "Bank Locator:" lines
|
||||||
local total_slots populated
|
local total_slots populated
|
||||||
total_slots=$(dmidecode -t memory 2>/dev/null | grep -c "^[[:space:]]*Locator:" | head -1)
|
total_slots=$(dmidecode -t memory 2>/dev/null | grep -c "^[[:space:]]*Locator:")
|
||||||
# Subtract Bank Locator lines
|
|
||||||
local bank_locators
|
|
||||||
bank_locators=$(dmidecode -t memory 2>/dev/null | grep -c "Bank Locator:")
|
|
||||||
total_slots=$((total_slots - bank_locators))
|
|
||||||
|
|
||||||
populated=$(dmidecode -t memory 2>/dev/null | grep "^[[:space:]]*Size:" | grep -cv "No Module\|Not Installed")
|
populated=$(dmidecode -t memory 2>/dev/null | grep "^[[:space:]]*Size:" | grep -cv "No Module\|Not Installed")
|
||||||
|
|
||||||
@@ -670,7 +667,8 @@ check_services() {
|
|||||||
local services=("pvedaemon" "pveproxy" "pvecluster" "pve-cluster" "corosync")
|
local services=("pvedaemon" "pveproxy" "pvecluster" "pve-cluster" "corosync")
|
||||||
for service in "${services[@]}"; do
|
for service in "${services[@]}"; do
|
||||||
local status
|
local status
|
||||||
status=$(systemctl is-active "$service" 2>/dev/null || echo "not-found")
|
status=$(systemctl is-active "$service" 2>/dev/null)
|
||||||
|
[[ -z "$status" ]] && status="not-found"
|
||||||
echo -e "${GREEN}$service:${NC} $status"
|
echo -e "${GREEN}$service:${NC} $status"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user