1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Sections and small fix

This commit is contained in:
Marc SCHAEFER 2019-08-11 18:50:00 +02:00 committed by Lars Kruse
parent 4e321bbc07
commit 784b06fe75

View file

@ -82,6 +82,8 @@ or GPLv3 license or later, at your option
lxcpath=${lxcpath:-/var/lib/lxc} lxcpath=${lxcpath:-/var/lib/lxc}
# --- FUNCTIONS
function active_guests { function active_guests {
local g active i ok local g active i ok
for g in $(lxc-ls | sort -u) for g in $(lxc-ls | sort -u)
@ -161,8 +163,12 @@ lxc_count_processes () {
return 0 return 0
} }
# --- BASIC DEFINES
active_guests=$(active_guests $exclude) active_guests=$(active_guests $exclude)
# --- AUTOCONF
if [ "$1" = "autoconf" ]; then if [ "$1" = "autoconf" ]; then
if [ ! -r /proc/net/dev ]; then if [ ! -r /proc/net/dev ]; then
echo "no (/proc/net/dev cannot be read)" echo "no (/proc/net/dev cannot be read)"
@ -357,7 +363,7 @@ done
echo "multigraph lxc_proc" echo "multigraph lxc_proc"
for n in $active_guests for n in $active_guests
do do
count_processes "$n" lxc_count_processes "$n"
tmp=$? tmp=$?
if [ $tmp -eq 0 ]; then if [ $tmp -eq 0 ]; then
tmp=$(lxc_cgroup -n "$n" tasks | wc -l) tmp=$(lxc_cgroup -n "$n" tasks | wc -l)