From e91f7ecba76f4a83705434621d7fdebe590788b7 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Mon, 12 Aug 2019 00:12:11 +0200 Subject: [PATCH] Plugin lxc: remove ineffective usage of "bc" The command "wc -w" already outputs the final result. Thus we do not need this command (and do not have to depend on it). --- plugins/lxc/lxc-multigraph | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/lxc/lxc-multigraph b/plugins/lxc/lxc-multigraph index 83a0598d..ce759d04 100755 --- a/plugins/lxc/lxc-multigraph +++ b/plugins/lxc/lxc-multigraph @@ -52,8 +52,8 @@ it with: -- with 104 a valid lxc instance), if you get a warning, fix the config file. -For the logins graph, you need the bc command, and, -in each container, the users command. +For the logins graph, the "users" command is required in each +container. Tested on Debian buster and Debian jessie. @@ -358,7 +358,7 @@ done echo "multigraph lxc_logins" for n in $active_guests do - echo $(clean_fieldname "logins__${n}").value $(lxc-attach -n "$n" users | wc -w | bc) + echo $(clean_fieldname "logins__${n}").value $(lxc-attach -n "$n" users | wc -w) done echo "multigraph lxc_net"