mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 00:54:04 +01:00
Updated check-swap-space.ps1
This commit is contained in:
parent
ffccb6175a
commit
9a8ae08b77
@ -48,11 +48,11 @@ try {
|
||||
if ($total -eq 0) {
|
||||
Write-Output "⚠️ No swap space configured"
|
||||
} elseif ($free -eq 0) {
|
||||
Write-Output "⚠️ Swap space of $(MB2String $total) is full"
|
||||
Write-Output "⚠️ Swap space is FULL ($(MB2String $total))"
|
||||
} elseif ($free -lt $minLevel) {
|
||||
Write-Output "⚠️ Swap space has only $(MB2String $free) of $(MB2String $total) free"
|
||||
} elseif ($used -lt 3) {
|
||||
Write-Output "✅ Swap space unused - full $(MB2String $free) free"
|
||||
Write-Output "✅ Swap space unused - $(MB2String $free) available"
|
||||
} else {
|
||||
[int64]$percent = ($used * 100) / $total
|
||||
Write-Output "✅ Swap space at $percent% of $(MB2String $total) - $(MB2String $free) free"
|
||||
|
Loading…
Reference in New Issue
Block a user