]> arthur.barton.de Git - netdata.git/commitdiff
Merge pull request #1854 from ktsaou/master
authorCosta Tsaousis <costa@tsaousis.gr>
Sun, 26 Feb 2017 16:52:48 +0000 (18:52 +0200)
committerGitHub <noreply@github.com>
Sun, 26 Feb 2017 16:52:48 +0000 (18:52 +0200)
minor fixes

src/Makefile.am
src/freebsd_sysctl.c

index fb9240b48d07bff14766c4cc9afed4dcc74633a5..a87cd7a8f4f949d2be8aa343791301d0ce7c5c6e 100644 (file)
@@ -158,19 +158,3 @@ apps_plugin_LDADD = \
        $(OPTIONAL_CAP_LIBS) \
        $(NULL)
 
-install-data-hook:
-       if [ `id -u` == 0 ]; then \
-               chown root '$(DESTDIR)$(pluginsdir)/apps.plugin' && \
-               chmod 0755 '$(DESTDIR)$(pluginsdir)/apps.plugin' && \
-               ( setcap cap_dac_read_search,cap_sys_ptrace+ep '$(DESTDIR)$(pluginsdir)/apps.plugin' || \
-                 chmod 4755 '$(DESTDIR)$(pluginsdir)/apps.plugin' ); \
-       else \
-               echo; \
-               echo "ATTENTION"; \
-               echo; \
-               echo "$(pluginsdir)/apps.plugin requires escalated capabilities:"; \
-               echo "sudo chown root '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \
-               echo "sudo chmod 0755 '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \
-               echo "sudo setcap cap_dac_read_search,cap_sys_ptrace+ep '$(DESTDIR)$(pluginsdir)/apps.plugin'"; \
-               echo; \
-       fi
index 83c3003c32fe1ed0009b2c91e65d543c057f4473..3fed51bb2ae160c061c0620a260bed3293e8600d 100644 (file)
@@ -382,18 +382,18 @@ int do_freebsd_sysctl(int update_every, usec_t dt) {
                 if (unlikely(!st)) {
                     st = rrdset_create_localhost("system", "cpu", NULL, "cpu", "system.cpu", "Total CPU utilization", "percentage", 100, update_every, RRDSET_TYPE_STACKED);
 
-                    rrddim_add(st, "user", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                     rrddim_add(st, "nice", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                     rrddim_add(st, "system", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
+                    rrddim_add(st, "user", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                     rrddim_add(st, "interrupt", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                     rrddim_add(st, "idle", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                     rrddim_hide(st, "idle");
                 }
                 else rrdset_next(st);
 
-                rrddim_set(st, "user", cp_time[0]);
                 rrddim_set(st, "nice", cp_time[1]);
                 rrddim_set(st, "system", cp_time[2]);
+                rrddim_set(st, "user", cp_time[0]);
                 rrddim_set(st, "interrupt", cp_time[3]);
                 rrddim_set(st, "idle", cp_time[4]);
                 rrdset_done(st);
@@ -425,18 +425,18 @@ int do_freebsd_sysctl(int update_every, usec_t dt) {
                             st = rrdset_create_localhost("cpu", cpuid, NULL, "utilization", "cpu.cpu", "Core utilization",
                                                "percentage", 1000, update_every, RRDSET_TYPE_STACKED);
 
-                            rrddim_add(st, "user", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                             rrddim_add(st, "nice", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                             rrddim_add(st, "system", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
+                            rrddim_add(st, "user", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                             rrddim_add(st, "interrupt", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                             rrddim_add(st, "idle", NULL, 1, 1, RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL);
                             rrddim_hide(st, "idle");
                         } else
                             rrdset_next(st);
 
-                        rrddim_set(st, "user", pcpu_cp_time[i * 5 + 0]);
                         rrddim_set(st, "nice", pcpu_cp_time[i * 5 + 1]);
                         rrddim_set(st, "system", pcpu_cp_time[i * 5 + 2]);
+                        rrddim_set(st, "user", pcpu_cp_time[i * 5 + 0]);
                         rrddim_set(st, "interrupt", pcpu_cp_time[i * 5 + 3]);
                         rrddim_set(st, "idle", pcpu_cp_time[i * 5 + 4]);
                         rrdset_done(st);