From 784b06fe75e3bb34e190d56956f3cc50b37e1da8 Mon Sep 17 00:00:00 2001 From: Marc SCHAEFER Date: Sun, 11 Aug 2019 18:50:00 +0200 Subject: [PATCH] Sections and small fix --- plugins/lxc/lxc-multigraph | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/lxc/lxc-multigraph b/plugins/lxc/lxc-multigraph index ee920004..4d79a3f4 100755 --- a/plugins/lxc/lxc-multigraph +++ b/plugins/lxc/lxc-multigraph @@ -82,6 +82,8 @@ or GPLv3 license or later, at your option lxcpath=${lxcpath:-/var/lib/lxc} +# --- FUNCTIONS + function active_guests { local g active i ok for g in $(lxc-ls | sort -u) @@ -161,8 +163,12 @@ lxc_count_processes () { return 0 } +# --- BASIC DEFINES + active_guests=$(active_guests $exclude) +# --- AUTOCONF + if [ "$1" = "autoconf" ]; then if [ ! -r /proc/net/dev ]; then echo "no (/proc/net/dev cannot be read)" @@ -357,7 +363,7 @@ done echo "multigraph lxc_proc" for n in $active_guests do - count_processes "$n" + lxc_count_processes "$n" tmp=$? if [ $tmp -eq 0 ]; then tmp=$(lxc_cgroup -n "$n" tasks | wc -l)