load.sh inline with cpu.sh

This commit is contained in:
mischa 2024-05-27 11:13:06 +00:00
parent 12ad4a615d
commit fdd9b9db6d
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2019-2021 Mischa Peters <mischa @ openbsd.amsterdam>
# Copyright (c) 2019-2024 Mischa Peters <mischa @ openbsd.amsterdam>
#
# 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}