summaryrefslogtreecommitdiffstats
path: root/collectors/charts.d.plugin/mem_apps
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
commit8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /collectors/charts.d.plugin/mem_apps
parentNew upstream version 1.11.1+dfsg (diff)
downloadnetdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz
netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/charts.d.plugin/mem_apps')
-rw-r--r--collectors/charts.d.plugin/mem_apps/README.md6
-rw-r--r--collectors/charts.d.plugin/mem_apps/mem_apps.chart.sh13
2 files changed, 11 insertions, 8 deletions
diff --git a/collectors/charts.d.plugin/mem_apps/README.md b/collectors/charts.d.plugin/mem_apps/README.md
index cd8adf0a..a9513e9f 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 a13dc71f..b9b84a46 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"