updated variable names
This commit is contained in:
parent
cc2cc608b3
commit
69e93c220c
@ -8,8 +8,10 @@ cpu1_temps=$(echo "$sensors_output" | awk '/coretemp-isa-0000/ {p=1} /coretemp-i
|
||||
cpu2_temps=$(echo "$sensors_output" | awk '/coretemp-isa-0001/ {p=1} /i350bb-pci-0103/ {p=0} p' | awk '/Core/ {print $3}' | sort -n | tail -n 1)
|
||||
|
||||
# Strip out the + and degree symbol from temperatures
|
||||
cpu1_temp_value=$(echo "$cpu1_temps" | tr -d '+°' | awk -F '.' '{print $1}')
|
||||
cpu2_temp_value=$(echo "$cpu2_temps" | tr -d '+°' | awk -F '.' '{print $1}')
|
||||
cpu1_temps_clean=$(echo "$cpu1_temps" | tr -d '+°' | awk -F '.' '{print $1}')
|
||||
cpu2_temps_clean=$(echo "$cpu2_temps" | tr -d '+°' | awk -F '.' '{print $1}')
|
||||
|
||||
|
||||
|
||||
# Determine the status code based on temperature thresholds
|
||||
if [ "$cpu1_temp_value" -ge 95 ] || [ "$cpu2_temp_value" -ge 95 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user