X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netdata.git;a=blobdiff_plain;f=src%2Fglobal_statistics.c;h=8575061ac1fd31222a3100bec09bd78294b890b8;hp=2ccdf6801480d2064390513bf0616be47c71a7f7;hb=8af280907530e1bcfffd4c8ed38fb311de64f0ab;hpb=0711ceaacadf4b435b11377ce9f0e65392675d2a diff --git a/src/global_statistics.c b/src/global_statistics.c index 2ccdf680..8575061a 100644 --- a/src/global_statistics.c +++ b/src/global_statistics.c @@ -129,11 +129,19 @@ void global_statistics_charts(void) { getrusage(RUSAGE_THREAD, &thread); getrusage(RUSAGE_SELF, &me); +#ifdef __FreeBSD__ + if (!stcpu_thread) stcpu_thread = rrdset_find_localhost("netdata.plugin_freebsd_cpu"); + if (!stcpu_thread) { + stcpu_thread = rrdset_create_localhost("netdata", "plugin_freebsd_cpu", NULL, "freebsd", NULL + , "NetData FreeBSD Plugin CPU usage", "milliseconds/s", 132000 + , localhost->rrd_update_every, RRDSET_TYPE_STACKED); +#else if (!stcpu_thread) stcpu_thread = rrdset_find_localhost("netdata.plugin_proc_cpu"); if (!stcpu_thread) { stcpu_thread = rrdset_create_localhost("netdata", "plugin_proc_cpu", NULL, "proc", NULL , "NetData Proc Plugin CPU usage", "milliseconds/s", 132000 , localhost->rrd_update_every, RRDSET_TYPE_STACKED); +#endif rrddim_add(stcpu_thread, "user", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL); rrddim_add(stcpu_thread, "system", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL);