summaryrefslogtreecommitdiffstats
path: root/collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:31:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:31:03 +0000
commit50485bedfd9818165aa1d039d0abe95a559134b7 (patch)
tree79c7b08f67edcfb0c936e7a22931653b91189b9f /collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh
parentReleasing debian version 1.11.1+dfsg-7. (diff)
downloadnetdata-50485bedfd9818165aa1d039d0abe95a559134b7.tar.xz
netdata-50485bedfd9818165aa1d039d0abe95a559134b7.zip
Merging upstream version 1.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh')
-rw-r--r--collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh13
1 files changed, 6 insertions, 7 deletions
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"