diff options
author | Vladimir Kobal <vlad@prokk.net> | 2018-12-17 13:20:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 13:20:51 +0200 |
commit | 989604bada2a5d075d3025fe8a85b77cede9c586 (patch) | |
tree | 561b478e6efc6291574f88aa81c11c928fd90f20 /collectors | |
parent | 928d4c50f6174a170318625ec69bcbfe968797c0 (diff) |
Make units compliant with IEC standard (#4985)
* Change GB to GiB
* Change MB to MiB in apps.plugin
* Change MB to MiB in cgroups.plugin
* Change MB to MiB in freebsd.plugin and macos.plugin
* Change MB to MiB in proc.plugin
* Change KB to KiB
* Change kB to KiB for divisor 1024
* Fix units for memory.failcnt
* Fix other units
* Change CPU time percentage
* Change kilobytes to KiB in apps.plugin
* Small fixes
Diffstat (limited to 'collectors')
23 files changed, 161 insertions, 161 deletions
diff --git a/collectors/apps.plugin/apps_plugin.c b/collectors/apps.plugin/apps_plugin.c index f592e9fc80..83b3048e23 100644 --- a/collectors/apps.plugin/apps_plugin.c +++ b/collectors/apps.plugin/apps_plugin.c @@ -1038,8 +1038,8 @@ static inline int read_proc_pid_status(struct pid_stat *p, void *ptr) { p->uid = proc_info->ki_uid; p->gid = proc_info->ki_groups[0]; - p->status_vmsize = proc_info->ki_size / 1024; // in kB - p->status_vmrss = proc_info->ki_rssize * pagesize / 1024; // in kB + p->status_vmsize = proc_info->ki_size / 1024; // in KiB + p->status_vmrss = proc_info->ki_rssize * pagesize / 1024; // in KiB // TODO: what about shared and swap memory on FreeBSD? return 1; #else @@ -3196,7 +3196,7 @@ static void send_collected_data_to_netdata(struct target *root, const char *type } send_END(); #endif - + send_BEGIN(type, "minor_faults", dt); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) @@ -3290,19 +3290,19 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type // we have something new to show // update the charts - fprintf(stdout, "CHART %s.cpu '' '%s CPU Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu stacked 20001 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); + fprintf(stdout, "CHART %s.cpu '' '%s CPU Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu stacked 20001 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu %s\n", w->name, system_hz * RATES_DETAIL / 100, w->hidden ? "hidden" : ""); } - fprintf(stdout, "CHART %s.mem '' '%s Real Memory (w/o shared)' 'MB' mem %s.mem stacked 20003 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.mem '' '%s Real Memory (w/o shared)' 'MiB' mem %s.mem stacked 20003 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute %ld %ld\n", w->name, 1L, 1024L); } - fprintf(stdout, "CHART %s.vmem '' '%s Virtual Memory Size' 'MB' mem %s.vmem stacked 20005 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.vmem '' '%s Virtual Memory Size' 'MiB' mem %s.vmem stacked 20005 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute %ld %ld\n", w->name, 1L, 1024L); @@ -3320,20 +3320,20 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type fprintf(stdout, "DIMENSION %s '' absolute 1 1\n", w->name); } - fprintf(stdout, "CHART %s.cpu_user '' '%s CPU User Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_user stacked 20020 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); + fprintf(stdout, "CHART %s.cpu_user '' '%s CPU User Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_user stacked 20020 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU); } - fprintf(stdout, "CHART %s.cpu_system '' '%s CPU System Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_system stacked 20021 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); + fprintf(stdout, "CHART %s.cpu_system '' '%s CPU System Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_system stacked 20021 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU); } if(show_guest_time) { - fprintf(stdout, "CHART %s.cpu_guest '' '%s CPU Guest Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_system stacked 20022 %d\n", type, title, (processors * 100), processors, (processors > 1) ? "s" : "", type, update_every); + fprintf(stdout, "CHART %s.cpu_guest '' '%s CPU Guest Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_system stacked 20022 %d\n", type, title, (processors * 100), processors, (processors > 1) ? "s" : "", type, update_every); for (w = root; w; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU); @@ -3341,7 +3341,7 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type } #ifndef __FreeBSD__ - fprintf(stdout, "CHART %s.swap '' '%s Swap Memory' 'MB' swap %s.swap stacked 20011 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.swap '' '%s Swap Memory' 'MiB' swap %s.swap stacked 20011 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute %ld %ld\n", w->name, 1L, 1024L); @@ -3373,25 +3373,25 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, RATES_DETAIL); } #else - fprintf(stdout, "CHART %s.preads '' '%s Disk Reads' 'kilobytes/s' disk %s.preads stacked 20002 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.preads '' '%s Disk Reads' 'KiB/s' disk %s.preads stacked 20002 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, 1024LLU * RATES_DETAIL); } - fprintf(stdout, "CHART %s.pwrites '' '%s Disk Writes' 'kilobytes/s' disk %s.pwrites stacked 20002 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.pwrites '' '%s Disk Writes' 'KiB/s' disk %s.pwrites stacked 20002 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, 1024LLU * RATES_DETAIL); } - fprintf(stdout, "CHART %s.lreads '' '%s Disk Logical Reads' 'kilobytes/s' disk %s.lreads stacked 20042 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.lreads '' '%s Disk Logical Reads' 'KiB/s' disk %s.lreads stacked 20042 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, 1024LLU * RATES_DETAIL); } - fprintf(stdout, "CHART %s.lwrites '' '%s I/O Logical Writes' 'kilobytes/s' disk %s.lwrites stacked 20042 %d\n", type, title, type, update_every); + fprintf(stdout, "CHART %s.lwrites '' '%s I/O Logical Writes' 'KiB/s' disk %s.lwrites stacked 20042 %d\n", type, title, type, update_every); for (w = root; w ; w = w->next) { if(unlikely(w->exposed)) fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, 1024LLU * RATES_DETAIL); diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c index 9c0fd7f43f..f8e5167ff3 100644 --- a/collectors/cgroups.plugin/sys_fs_cgroup.c +++ b/collectors/cgroups.plugin/sys_fs_cgroup.c @@ -1489,7 +1489,7 @@ void update_systemd_services_charts( , "services.mem_usage" , (cgroup_used_memory_without_cache) ? "Systemd Services Used Memory without Cache" : "Systemd Services Used Memory" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 10 @@ -1512,7 +1512,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_rss" , "Systemd Services RSS Memory" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 20 @@ -1533,7 +1533,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_mapped" , "Systemd Services Mapped Memory" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 30 @@ -1554,7 +1554,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_cache" , "Systemd Services Cache Memory" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 40 @@ -1575,7 +1575,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_writeback" , "Systemd Services Writeback Memory" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 50 @@ -1596,7 +1596,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_pgfault" , "Systemd Services Memory Minor Page Faults" - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 60 @@ -1616,7 +1616,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_pgmajfault" , "Systemd Services Memory Major Page Faults" - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 70 @@ -1637,7 +1637,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_pgpgin" , "Systemd Services Memory Charging Activity" - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 80 @@ -1658,7 +1658,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_pgpgout" , "Systemd Services Memory Uncharging Activity" - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 90 @@ -1681,7 +1681,7 @@ void update_systemd_services_charts( , "mem" , "services.mem_failcnt" , "Systemd Services Memory Limit Failures" - , "MB" + , "failures" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 110 @@ -1704,7 +1704,7 @@ void update_systemd_services_charts( , "swap" , "services.swap_usage" , "Systemd Services Swap Memory Used" - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 100 @@ -1727,7 +1727,7 @@ void update_systemd_services_charts( , "disk" , "services.io_read" , "Systemd Services Disk Read Bandwidth" - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 120 @@ -1748,7 +1748,7 @@ void update_systemd_services_charts( , "disk" , "services.io_write" , "Systemd Services Disk Write Bandwidth" - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 130 @@ -1815,7 +1815,7 @@ void update_systemd_services_charts( , "disk" , "services.throttle_io_read" , "Systemd Services Throttle Disk Read Bandwidth" - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 160 @@ -1836,7 +1836,7 @@ void update_systemd_services_charts( , "disk" , "services.throttle_io_write" , "Systemd Services Throttle Disk Write Bandwidth" - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_SYSTEMD_NAME , NETDATA_CHART_PRIO_CGROUPS_SYSTEMD + 170 @@ -2317,7 +2317,7 @@ void update_cgroup_charts(int update_every) { , "mem" , "cgroup.mem" , title - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 210 @@ -2357,7 +2357,7 @@ void update_cgroup_charts(int update_every) { , "mem" , "cgroup.writeback" , title - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 300 @@ -2389,7 +2389,7 @@ void update_cgroup_charts(int update_every) { , "mem" , "cgroup.mem_activity" , title - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 400 @@ -2417,7 +2417,7 @@ void update_cgroup_charts(int update_every) { , "mem" , "cgroup.pgfaults" , title - , "MB/s" + , "MiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 500 @@ -2447,7 +2447,7 @@ void update_cgroup_charts(int update_every) { , "mem" , "cgroup.mem_usage" , title - , "MB" + , "MiB" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 200 @@ -2505,7 +2505,7 @@ void update_cgroup_charts(int update_every) { , "disk" , "cgroup.io" , title - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 1200 @@ -2565,7 +2565,7 @@ void update_cgroup_charts(int update_every) { , "disk" , "cgroup.throttle_io" , title - , "KB/s" + , "KiB/s" , PLUGIN_CGROUPS_NAME , PLUGIN_CGROUPS_MODULE_CGROUPS_NAME , NETDATA_CHART_PRIO_CGROUPS_CONTAINERS + 1200 diff --git a/collectors/diskspace.plugin/plugin_diskspace.c b/collectors/diskspace.plugin/plugin_diskspace.c index dca7c90769..ab3b7508eb 100644 --- a/collectors/diskspace.plugin/plugin_diskspace.c +++ b/collectors/diskspace.plugin/plugin_diskspace.c @@ -263,7 +263,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) { , family , "disk.space" , title - , "GB" + , "GiB" , PLUGIN_DISKSPACE_NAME , NULL , NETDATA_CHART_PRIO_DISKSPACE_SPACE @@ -303,7 +303,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) { , family , "disk.inodes" , title - , "Inodes" + , "inodes" , PLUGIN_DISKSPACE_NAME , NULL , NETDATA_CHART_PRIO_DISKSPACE_INODES diff --git a/collectors/freebsd.plugin/freebsd_devstat.c b/collectors/freebsd.plugin/freebsd_devstat.c index 10279aabc8..6c613c2a06 100644 --- a/collectors/freebsd.plugin/freebsd_devstat.c +++ b/collectors/freebsd.plugin/freebsd_devstat.c @@ -360,10 +360,10 @@ int do_kern_devstat(int update_every, usec_t dt) { disk, "disk.io", "Disk I/O Bandwidth", - "kilobytes/s", - "freebsd.plugin", + "KiB/s", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_IO, + NETDATA_CHART_PRIO_DISK_IO, update_every, RRDSET_TYPE_AREA ); @@ -398,9 +398,9 @@ int do_kern_devstat(int update_every, usec_t dt) { "disk.ops", "Disk Completed I/O Operations", "operations/s", - "freebsd.plugin", - "devstat", - NETDATA_CHART_PRIO_DISK_OPS, + "freebsd.plugin", + "devstat", + NETDATA_CHART_PRIO_DISK_OPS, update_every, RRDSET_TYPE_LINE ); @@ -437,9 +437,9 @@ int do_kern_devstat(int update_every, usec_t dt) { "disk.qops", "Disk Current I/O Operations", "operations", - "freebsd.plugin", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_QOPS, + NETDATA_CHART_PRIO_DISK_QOPS, update_every, RRDSET_TYPE_LINE ); @@ -466,9 +466,9 @@ int do_kern_devstat(int update_every, usec_t dt) { "disk.util", "Disk Utilization Time", "% of time working", - "freebsd.plugin", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_UTIL, + NETDATA_CHART_PRIO_DISK_UTIL, update_every, RRDSET_TYPE_AREA ); @@ -499,9 +499,9 @@ int do_kern_devstat(int update_every, usec_t dt) { "disk.iotime", "Disk Total I/O Time", "milliseconds/s", - "freebsd.plugin", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_IOTIME, + NETDATA_CHART_PRIO_DISK_IOTIME, update_every, RRDSET_TYPE_LINE ); @@ -546,10 +546,10 @@ int do_kern_devstat(int update_every, usec_t dt) { disk, "disk.await", "Average Completed I/O Operation Time", - "ms per operation", - "freebsd.plugin", + "milliseconds/operation", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_AWAIT, + NETDATA_CHART_PRIO_DISK_AWAIT, update_every, RRDSET_TYPE_LINE ); @@ -611,10 +611,10 @@ int do_kern_devstat(int update_every, usec_t dt) { disk, "disk.avgsz", "Average Completed I/O Operation Bandwidth", - "kilobytes per operation", - "freebsd.plugin", + "KiB/operation", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_AVGSZ, + NETDATA_CHART_PRIO_DISK_AVGSZ, update_every, RRDSET_TYPE_AREA ); @@ -668,10 +668,10 @@ int do_kern_devstat(int update_every, usec_t dt) { disk, "disk.svctm", "Average Service Time", - "ms per operation", - "freebsd.plugin", + "milliseconds/operation", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_DISK_SVCTM, + NETDATA_CHART_PRIO_DISK_SVCTM, update_every, RRDSET_TYPE_LINE ); @@ -728,10 +728,10 @@ int do_kern_devstat(int update_every, usec_t dt) { "disk", NULL, "Disk I/O", - "kilobytes/s", - "freebsd.plugin", + "KiB/s", + "freebsd.plugin", "devstat", - NETDATA_CHART_PRIO_SYSTEM_IO, + NETDATA_CHART_PRIO_SYSTEM_IO, update_every, RRDSET_TYPE_AREA ); diff --git a/collectors/freebsd.plugin/freebsd_getifaddrs.c b/collectors/freebsd.plugin/freebsd_getifaddrs.c index e158458570..8a1ec229e5 100644 --- a/collectors/freebsd.plugin/freebsd_getifaddrs.c +++ b/collectors/freebsd.plugin/freebsd_getifaddrs.c @@ -156,7 +156,7 @@ int do_getifaddrs(int update_every, usec_t dt) { enable_new_interfaces = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS, "enable new interfaces detected at runtime", CONFIG_BOOLEAN_AUTO); - + do_bandwidth_net = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS, "total bandwidth for physical interfaces", CONFIG_BOOLEAN_AUTO); do_packets_net = config_get_boolean_ondemand(CONFIG_SECTION_GETIFADDRS, "total packets for physical interfaces", @@ -229,7 +229,7 @@ int do_getifaddrs(int update_every, usec_t dt) { // -------------------------------------------------------------------- if (likely(do_bandwidth_net)) { - + iftot.ift_ibytes = iftot.ift_obytes = 0; for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family != AF_LINK) @@ -239,10 +239,10 @@ int do_getifaddrs(int update_every, usec_t dt) { iftot.ift_ibytes += IFA_DATA(ibytes); iftot.ift_obytes += IFA_DATA(obytes); } - + static RRDSET *st = NULL; static RRDDIM *rd_in = NULL, *rd_out = NULL; - + if (unlikely(!st)) { st = rrdset_create_localhost("system", "net", @@ -251,23 +251,23 @@ int do_getifaddrs(int update_every, usec_t dt) { NULL, "Network Traffic", "kilobits/s", - "freebsd.plugin", + "freebsd.plugin", "getifaddrs", - NETDATA_CHART_PRIO_SYSTEM_NET, + NETDATA_CHART_PRIO_SYSTEM_NET, update_every, RRDSET_TYPE_AREA ); - + rd_in = rrddim_add(st, "InOctets", "received", 8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL); rd_out = rrddim_add(st, "OutOctets", "sent", -8, BITS_IN_A_KILOBIT, RRD_ALGORITHM_INCREMENTAL); } else rrdset_next(st); - + rrddim_set_by_pointer(st, rd_in, iftot.ift_ibytes); rrddim_set_by_pointer(st, rd_out, iftot.ift_obytes); rrdset_done(st); } - + // -------------------------------------------------------------------- if (likely(do_packets_net)) { @@ -295,9 +295,9 @@ int do_getifaddrs(int update_every, usec_t dt) { NULL, "Network Packets", "packets/s", - "freebsd.plugin", + "freebsd.plugin", "getifaddrs", - NETDATA_CHART_PRIO_SYSTEM_PACKETS, + NETDATA_CHART_PRIO_SYSTEM_PACKETS, update_every, RRDSET_TYPE_LINE ); @@ -340,9 +340,9 @@ int do_getifaddrs(int update_every, usec_t dt) { NULL, "IPv4 Bandwidth", "kilobits/s", - "freebsd.plugin", + "freebsd.plugin", "getifaddrs", - NETDATA_CHART_PRIO_SYSTEM_IPV4, + NETDATA_CHART_PRIO_SYSTEM_IPV4, update_every, RRDSET_TYPE_AREA ); @@ -379,9 +379,9 @@ int do_getifaddrs(int update_every, usec_t dt) { NULL, "IPv6 Bandwidth", |