From a1bb84ab0eb91d1a9c873da346a6e38aced9a2f9 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 21 May 2021 19:07:42 +0200 Subject: [PATCH] fixed active-sessions.sh --- node_exporter/active-sessions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node_exporter/active-sessions.sh b/node_exporter/active-sessions.sh index ce846e9..c3d9630 100644 --- a/node_exporter/active-sessions.sh +++ b/node_exporter/active-sessions.sh @@ -1,7 +1,7 @@ #!/bin/bash ALL_SESSIONS=$(netstat -tnp | grep sshd -c) -SU_SESSIONS=$(ps aux | grep ' [s]u' -c) +SU_SESSIONS=$(ps aux | grep ' [s][u] ' -c) ROOT_SESSIONS=$(netstat -tnp | grep sshd | grep root -c) echo "# HELP node_active_sessions active sessions by type."