commit fdd9b9db6dc67854569c8be478f4c656e412271d from: mischa date: Mon May 27 11:13:06 2024 UTC load.sh inline with cpu.sh commit - 12ad4a615d002eee9812ecd696487d240f2fda9d commit + fdd9b9db6dc67854569c8be478f4c656e412271d blob - 9f7c9b234c54d96f8753053719b4f11147390abb blob + 646225f5dd3d3ba7718f1bc8f9fff634aefbefe5 --- load.sh +++ 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}