mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Update check-cpu-temp.ps1
This commit is contained in:
parent
7b898d7180
commit
bd616fd925
@ -5,7 +5,7 @@
|
|||||||
This script checks the CPU temperature.
|
This script checks the CPU temperature.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-cpu-temp
|
PS> ./check-cpu-temp
|
||||||
✔️ 30.3 °C CPU temperature - good
|
✔️ CPU has 30.3 °C: good
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -23,16 +23,16 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($Temp -gt 80) {
|
if ($Temp -gt 80) {
|
||||||
"⚠️ $Temp °C CPU temperature: too high!"
|
"⚠️ CPU has $Temp °C: too high!"
|
||||||
exit 1
|
exit 1
|
||||||
} elseif ($Temp -gt 50) {
|
} elseif ($Temp -gt 50) {
|
||||||
"✔️ $Temp °C CPU temperature: quite high"
|
"✔️ CPU has $Temp °C: quite high"
|
||||||
} elseif ($Temp -gt 0) {
|
} elseif ($Temp -gt 0) {
|
||||||
"✔️ $Temp °C CPU temperature: good"
|
"✔️ CPU has $Temp °C: good"
|
||||||
} elseif ($Temp -gt -20) {
|
} elseif ($Temp -gt -20) {
|
||||||
"✔️ $Temp °C CPU temperature: quite low"
|
"✔️ CPU has $Temp °C: quite low"
|
||||||
} else {
|
} else {
|
||||||
"⚠️ $Temp °C CPU temperature: too low!"
|
"⚠️ CPU has $Temp °C: too low!"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
Loading…
Reference in New Issue
Block a user