From 25c9e116edf2e24ff5616839f693b3bbeb4d81a5 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Thu, 29 Oct 2020 10:42:56 +0100 Subject: [PATCH] added mpstat to healthcheck.sh Signed-off-by: Janos SUTO --- util/healthcheck.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/healthcheck.sh b/util/healthcheck.sh index 6b0e9122..113547e0 100755 --- a/util/healthcheck.sh +++ b/util/healthcheck.sh @@ -7,8 +7,15 @@ set -o nounset SPHINX_DIR=/var/piler/sphinx ERROR_FILE=/var/piler/stat/error -echo "host: $(hostname | sha256sum | awk '{ print $1 }')" -echo "cpus: $(grep -c ^processor /proc/cpuinfo)" +if command -v mpstat; then + mpstat + echo +else + echo "host: $(hostname)" + echo "cpus: $(grep -c ^processor /proc/cpuinfo)" +fi + +echo "load: $(cat /proc/loadavg)" echo "mem: $(grep MemTotal /proc/meminfo | sed 's/MemTotal\s*:\s*//' )" echo disks: while read -r p; do df -h "${p##* }" | tail -1; done < <(lsblk | grep part)