mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Improve check-swap-space.ps1
This commit is contained in:
@ -23,6 +23,10 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Total -eq "0") {
|
||||||
|
write-warning "No swap space configured!"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
if ($Free -lt $MinLevel) {
|
if ($Free -lt $MinLevel) {
|
||||||
write-warning "Swap space has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
|
write-warning "Swap space has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user