From fdd9b9db6dc67854569c8be478f4c656e412271d Mon Sep 17 00:00:00 2001 From: mischa Date: Mon, 27 May 2024 11:13:06 +0000 Subject: [PATCH] load.sh inline with cpu.sh --- load.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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}