summaryrefslogtreecommitdiffstats
path: root/collectors/apps.plugin
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2023-10-11 17:09:53 +0300
committerGitHub <noreply@github.com>2023-10-11 17:09:53 +0300
commit34faa0af46d33adf6381ad0ad5d8095cf00550b2 (patch)
tree5490926584cca55f068db921c3d049ef8120d0ce /collectors/apps.plugin
parent2539cb7ee65f6c5a1e0ccd041aced7a9608b0369 (diff)
apps: remove mem_private on FreeBSD (#16166)
Diffstat (limited to 'collectors/apps.plugin')
-rw-r--r--collectors/apps.plugin/apps_plugin.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/collectors/apps.plugin/apps_plugin.c b/collectors/apps.plugin/apps_plugin.c
index 60dea9a835..7aa21a4ad1 100644
--- a/collectors/apps.plugin/apps_plugin.c
+++ b/collectors/apps.plugin/apps_plugin.c
@@ -3777,14 +3777,15 @@ static void send_collected_data_to_netdata(struct target *root, const char *type
send_SET("voluntary", w->status_voluntary_ctxt_switches);
send_SET("involuntary", w->status_nonvoluntary_ctxt_switches);
send_END();
-#endif
- send_BEGIN(type, w->clean_name, "mem_usage", dt);
- send_SET("rss", w->status_vmrss);
- send_END();
send_BEGIN(type, w->clean_name, "mem_private_usage", dt);
send_SET("mem", (w->status_vmrss > w->status_vmshared)?(w->status_vmrss - w->status_vmshared) : 0ULL);
send_END();
+#endif
+
+ send_BEGIN(type, w->clean_name, "mem_usage", dt);
+ send_SET("rss", w->status_vmrss);
+ send_END();
send_BEGIN(type, w->clean_name, "vmem_usage", dt);
send_SET("vmem", w->status_vmsize);
@@ -3892,17 +3893,17 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
fprintf(stdout, "CLABEL_COMMIT\n");
fprintf(stdout, "DIMENSION voluntary '' absolute 1 %llu\n", RATES_DETAIL);
fprintf(stdout, "DIMENSION involuntary '' absolute 1 %llu\n", RATES_DETAIL);
-#endif
- fprintf(stdout, "CHART %s.%s_mem_usage '' '%s memory RSS usage' 'MiB' mem %s.mem_usage area 20050 %d\n", type, w->clean_name, title, type, update_every);
+ fprintf(stdout, "CHART %s.%s_mem_private_usage '' '%s memory usage without shared' 'MiB' mem %s.mem_private_usage area 20050 %d\n", type, w->clean_name, title, type, update_every);
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);
fprintf(stdout, "CLABEL_COMMIT\n");
- fprintf(stdout, "DIMENSION rss '' absolute %ld %ld\n", 1L, 1024L);
+ fprintf(stdout, "DIMENSION mem '' absolute %ld %ld\n", 1L, 1024L);
+#endif
- fprintf(stdout, "CHART %s.%s_mem_private_usage '' '%s memory usage without shared' 'MiB' mem %s.mem_private_usage area 20055 %d\n", type, w->clean_name, title, type, update_every);
+ fprintf(stdout, "CHART %s.%s_mem_usage '' '%s memory RSS usage' 'MiB' mem %s.mem_usage area 20055 %d\n", type, w->clean_name, title, type, update_every);
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);
fprintf(stdout, "CLABEL_COMMIT\n");
- fprintf(stdout, "DIMENSION mem '' absolute %ld %ld\n", 1L, 1024L);
+ fprintf(stdout, "DIMENSION rss '' absolute %ld %ld\n", 1L, 1024L);
fprintf(stdout, "CHART %s.%s_mem_page_faults '' '%s memory page faults' 'pgfaults/s' mem %s.mem_page_faults stacked 20060 %d\n", type, w->clean_name, title, type, update_every);
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);