Update check-swap-space.ps1

This commit is contained in:
Markus Fleschutz 2024-02-23 16:43:17 +01:00
parent c2ece8db12
commit 5d11391dc7

View File

@ -50,9 +50,9 @@ try {
} elseif ($free -eq 0) { } elseif ($free -eq 0) {
Write-Output "⚠️ Swap space of $(MB2String $total) is full" Write-Output "⚠️ Swap space of $(MB2String $total) is full"
} elseif ($free -lt $minLevel) { } elseif ($free -lt $minLevel) {
Write-Output "⚠️ Swap space of $(MB2String $total) is nearly full, only $(MB2String $free) free" Write-Output "⚠️ Swap space of $(MB2String $total) is nearly full · only $(MB2String $free) free"
} elseif ($used -lt 5) { } elseif ($used -lt 5) {
Write-Output "✅ Swap space unused, $(MB2String $free) free" Write-Output "✅ Swap space unused · $(MB2String $free) free"
} else { } else {
[int]$Percent = ($used * 100) / $total [int]$Percent = ($used * 100) / $total
Write-Output "✅ Swap space uses $Percent% of $(MB2String $total) · $(MB2String $free) free" Write-Output "✅ Swap space uses $Percent% of $(MB2String $total) · $(MB2String $free) free"