diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
commit | eb7cc2640201f168bbd9a05799fd2dbe823bb57c (patch) | |
tree | 1f88da02b7ee3c16ced7b5f7dc4aadb190766e7c /plugins.d/cgroup-network-helper.sh | |
parent | Release v. 1.9.0+dfsg-1 to Unstable (diff) | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.tar.xz netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.zip |
Update upstream source from tag 'upstream/1.10.0+dfsg'
Update to upstream version '1.10.0+dfsg'
with Debian dir fa5485f3d9aea3038a19eff06ba33374ac5c5d7c
Diffstat (limited to 'plugins.d/cgroup-network-helper.sh')
-rwxr-xr-x | plugins.d/cgroup-network-helper.sh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins.d/cgroup-network-helper.sh b/plugins.d/cgroup-network-helper.sh index d93fe356a..f07059986 100755 --- a/plugins.d/cgroup-network-helper.sh +++ b/plugins.d/cgroup-network-helper.sh @@ -22,7 +22,9 @@ # ----------------------------------------------------------------------------- -export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin" +# the system path is cleared by cgroup-network +[ -f /etc/profile ] && source /etc/profile + export LC_ALL=C PROGRAM_NAME="$(basename "${0}")" @@ -68,13 +70,6 @@ debug() { fatal "BASH version 4 or later is required (this is ${BASH_VERSION})." # ----------------------------------------------------------------------------- -# defaults to allow running this script by hand - -[ -z "${NETDATA_PLUGINS_DIR}" ] && NETDATA_PLUGINS_DIR="$(dirname "${0}")" -[ -z "${NETDATA_CONFIG_DIR}" ] && NETDATA_CONFIG_DIR="$(dirname "${0}")/../../../../etc/netdata" -[ -z "${NETDATA_CACHE_DIR}" ] && NETDATA_CACHE_DIR="$(dirname "${0}")/../../../../var/cache/netdata" - -# ----------------------------------------------------------------------------- # parse the arguments pid= @@ -172,7 +167,7 @@ virsh_find_all_interfaces_for_cgroup() { # match only 'network' interfaces from virsh output set_source "virsh" - "${virsh}" domiflist ${d} |\ + "${virsh}" -r domiflist ${d} |\ sed -n \ -e "s|^\([^[:space:]]\+\)[[:space:]]\+network[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+[^[:space:]]\+[[:space:]]\+[^[:space:]]\+$|\1 \1_\2|p" \ -e "s|^\([^[:space:]]\+\)[[:space:]]\+bridge[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+[^[:space:]]\+[[:space:]]\+[^[:space:]]\+$|\1 \1_\2|p" |