commit - 12ad4a615d002eee9812ecd696487d240f2fda9d
commit + fdd9b9db6dc67854569c8be478f4c656e412271d
blob - 9f7c9b234c54d96f8753053719b4f11147390abb
blob + 646225f5dd3d3ba7718f1bc8f9fff634aefbefe5
--- load.sh
+++ load.sh
#!/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
# 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}