diff --git a/load.sh b/load.sh index 9f7c9b2..646225f 100755 --- a/load.sh +++ b/load.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2019-2021 Mischa Peters +# Copyright (c) 2019-2024 Mischa Peters # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,8 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # -OUT=$(ps -uU _vmd | awk '$3 > 45.0 {print $12, $3"%"}') +LOAD=45 +OUT=$(ps -uU _vmd | awk -v var="${LOAD}" '$12 !~ /\// && $3 > var {print $12}') if [ "$OUT" ]; then echo $(hostname) echo ${OUT}