mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-30 03:43:50 +01:00
Update check-swap-space.ps1
This commit is contained in:
parent
c2ece8db12
commit
5d11391dc7
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user