From 73eab6c7154a90b887cab8bbdddf8f17b20a50d7 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Sun, 16 May 2021 03:12:23 +0200 Subject: [PATCH] fixed directory-size.sh --- node_exporter/active-sessions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_exporter/active-sessions.sh b/node_exporter/active-sessions.sh index d5f68c6..bfe02cd 100644 --- a/node_exporter/active-sessions.sh +++ b/node_exporter/active-sessions.sh @@ -1,7 +1,7 @@ #!/bin/bash -ALL_SESSIONS=$(who | wc -l) -ROOT_SESSIONS=$(who | grep root | wc -l) +ALL_SESSIONS=$(w -h | wc -l) +ROOT_SESSIONS=$(w -h | grep priv | wc -l) echo "# HELP node_active_sessions active sessions by type." echo "# TYPE node_active_sessions gauge"