apps: remove mem_private on FreeBSD (#16166)
Ilya Mashchenko committed
Oct 11, 2023 at 17:09 UTC
34faa0af46d33adf6381ad0ad5d8095cf00550b2
1 file changed
+10
-9
collectors/apps.plugin/apps_plugin.c
+10
-9
@@ -3777,14 +3777,15 @@ static void send_collected_data_to_netdata(struct target *root, const char *type
3777
send_SET("voluntary", w->status_voluntary_ctxt_switches);
3778
send_SET("involuntary", w->status_nonvoluntary_ctxt_switches);
3779
send_END();
3780
-#endif
3781
- send_BEGIN(type, w->clean_name, "mem_usage", dt);
3782
- send_SET("rss", w->status_vmrss);
3783
- send_END();
3780
3781
send_BEGIN(type, w->clean_name, "mem_private_usage", dt);
3782
send_SET("mem", (w->status_vmrss > w->status_vmshared)?(w->status_vmrss - w->status_vmshared) : 0ULL);
3783
send_END();
3784
+#endif
3785
+
3786
+ send_BEGIN(type, w->clean_name, "mem_usage", dt);
3787
+ send_SET("rss", w->status_vmrss);
3788
+ send_END();
3789
3790
send_BEGIN(type, w->clean_name, "vmem_usage", dt);
3791
send_SET("vmem", w->status_vmsize);
@@ -3892,17 +3893,17 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3893
fprintf(stdout, "CLABEL_COMMIT\n");
3894
fprintf(stdout, "DIMENSION voluntary '' absolute 1 %llu\n", RATES_DETAIL);
3895
fprintf(stdout, "DIMENSION involuntary '' absolute 1 %llu\n", RATES_DETAIL);
3895
-#endif
3896
3897
- 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);
3897
+ 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);
3898
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);
3899
fprintf(stdout, "CLABEL_COMMIT\n");
3900
- fprintf(stdout, "DIMENSION rss '' absolute %ld %ld\n", 1L, 1024L);
3900
+ fprintf(stdout, "DIMENSION mem '' absolute %ld %ld\n", 1L, 1024L);
3901
+#endif
3902
3902
- 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);
3903
+ 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);
3904
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);
3905
fprintf(stdout, "CLABEL_COMMIT\n");
3905
- fprintf(stdout, "DIMENSION mem '' absolute %ld %ld\n", 1L, 1024L);
3906
+ fprintf(stdout, "DIMENSION rss '' absolute %ld %ld\n", 1L, 1024L);
3907
3908
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);
3909
fprintf(stdout, "CLABEL '%s' '%s' 0\n", lbl_name, w->name);