From 8a7b72f7cd1ccd547a03eb4243294e741d661d3f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 8 Feb 2019 08:30:37 +0100 Subject: Adding upstream version 1.12.0. Signed-off-by: Daniel Baumann --- collectors/charts.d.plugin/mem_apps/README.md | 6 +++++- collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh | 13 ++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'collectors/charts.d.plugin/mem_apps') diff --git a/collectors/charts.d.plugin/mem_apps/README.md b/collectors/charts.d.plugin/mem_apps/README.md index cd8adf0a2..a9513e9fe 100644 --- a/collectors/charts.d.plugin/mem_apps/README.md +++ b/collectors/charts.d.plugin/mem_apps/README.md @@ -1,2 +1,6 @@ +# mem_apps + > THIS MODULE IS OBSOLETE. -> USE APPS.PLUGIN. +> USE [APPS.PLUGIN](../../apps.plugin). + +[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fcharts.d.plugin%2Fmem_apps%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]() diff --git a/collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh b/collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh index a13dc71f1..b9b84a467 100644 --- a/collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh +++ b/collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh @@ -20,8 +20,7 @@ mem_apps_check() { # - 0 to enable the chart # - 1 to disable the chart - if [ -z "$mem_apps_apps" ] - then + if [ -z "$mem_apps_apps" ]; then error "manual configuration required: please set mem_apps_apps='command1 command2 ...' in $confd/mem_apps_apps.conf" return 1 fi @@ -35,8 +34,7 @@ mem_apps_create() { echo "CHART chartsd_apps.mem '' 'Apps Memory' MB apps apps.mem stacked 20000 $mem_apps_update_every" local x= - for x in $mem_apps_apps - do + for x in $mem_apps_apps; do echo "DIMENSION $x $x absolute 1 1024" # this string is needed later in the update() function @@ -52,9 +50,10 @@ mem_apps_update() { # remember: KEEP IT SIMPLE AND SHORT echo "BEGIN chartsd_apps.mem" - ps -o comm,rss -C "$mem_apps_apps" |\ - grep -v "^COMMAND" |\ - ( sed -e "s/ \+/ /g" -e "s/ /+=/g"; + ps -o comm,rss -C "$mem_apps_apps" | + grep -v "^COMMAND" | + ( + sed -e "s/ \+/ /g" -e "s/ /+=/g" echo "$mem_apps_bc_finalze" ) | bc echo "END" -- cgit v1.2.3