diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-16 07:50:20 +0000 |
commit | b26be28df9fd4db2106cc2a557966c9d2a7345d9 (patch) | |
tree | 437e6106c0aa2e73f2dd68d0551545ae503f60d7 /daemon/anonymous-statistics.sh.in | |
parent | Adding upstream version 1.12.2. (diff) | |
download | netdata-b26be28df9fd4db2106cc2a557966c9d2a7345d9.tar.xz netdata-b26be28df9fd4db2106cc2a557966c9d2a7345d9.zip |
Adding upstream version 1.13.0.upstream/1.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | daemon/anonymous-statistics.sh.in | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/anonymous-statistics.sh.in b/daemon/anonymous-statistics.sh.in index f4375b10..d4622c6d 100755 --- a/daemon/anonymous-statistics.sh.in +++ b/daemon/anonymous-statistics.sh.in @@ -85,13 +85,14 @@ fi # ------------------------------------------------------------------------------------------------- # detect containers with heuristics -if [ "${CONTAINER}" = "unknown" ] ; then - IFS='(, ' read -r process _ </proc/1/sched - if [ "${process}" = "netdata" ]; then - CONTAINER="container" - CONT_DETECTION="process" +if [ "${CONTAINER}" = "unknown" ]; then + if [ -f /proc/1/sched ] ; then + IFS='(, ' read -r process _ </proc/1/sched + if [ "${process}" = "netdata" ]; then + CONTAINER="container" + CONT_DETECTION="process" + fi fi - # ubuntu and debian supply /bin/running-in-container # https://www.apt-browse.org/browse/ubuntu/trusty/main/i386/upstart/1.12.1-0ubuntu4/file/bin/running-in-container if /bin/running-in-container >/dev/null 2>&1; then |