do not show swap chart on freebsd
Costa Tsaousis (ktsaou) committed
Feb 17, 2018 at 17:32 UTC
bf52c3d2e35301703cd2419c8f2eb859fffd1777
1 file changed
+5
-1
src/apps_plugin.c
+5
-1
@@ -3055,13 +3055,15 @@ static void send_collected_data_to_netdata(struct target *root, const char *type
3055
}
3056
send_END();
3057
3058
+#ifndef __FreeBSD__
3059
send_BEGIN(type, "swap", dt);
3060
for (w = root; w ; w = w->next) {
3061
if(unlikely(w->exposed))
3062
send_SET(w->name, w->status_vmswap);
3063
}
3064
send_END();
3064
-
3065
+#endif
3066
+
3067
send_BEGIN(type, "minor_faults", dt);
3068
for (w = root; w ; w = w->next) {
3069
if(unlikely(w->exposed))
@@ -3204,11 +3206,13 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3206
}
3207
}
3208
3209
+#ifndef __FreeBSD__
3210
fprintf(stdout, "CHART %s.swap '' '%s Swap Memory' 'MB' swap %s.swap stacked 20011 %d\n", type, title, type, update_every);
3211
for (w = root; w ; w = w->next) {
3212
if(unlikely(w->exposed))
3213
fprintf(stdout, "DIMENSION %s '' absolute %ld %ld\n", w->name, 1L, 1024L);
3214
}
3215
+#endif
3216
3217
fprintf(stdout, "CHART %s.major_faults '' '%s Major Page Faults (swap read)' 'page faults/s' swap %s.major_faults stacked 20012 %d\n", type, title, type, update_every);
3218
for (w = root; w ; w = w->next) {