summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19e5209)
raw | patch | inline | side by side (parent: 19e5209)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 15 Feb 2009 13:33:39 +0000 (14:33 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 15 Feb 2009 14:07:37 +0000 (15:07 +0100) |
src/cpu.c | patch | blob | history |
diff --git a/src/cpu.c b/src/cpu.c
index aab1739b3fbeb41de3339e30b4843e55fbd41504..6e8a62da593ca50d7d53383584a3f21a27580f01 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
/* #endif HAVE_SYSCTLBYNAME */
#elif defined(HAVE_LIBSTATGRAB)
- sg_cpu_stats *cs;
- cs = sg_get_cpu_stats ();
-
- if (cs == NULL)
- {
- ERROR ("cpu plugin: sg_get_cpu_stats failed.");
- return (-1);
- }
-
- submit (0, "idle", (counter_t) cs->idle);
- submit (0, "nice", (counter_t) cs->nice);
- submit (0, "swap", (counter_t) cs->swap);
- submit (0, "system", (counter_t) cs->kernel);
- submit (0, "user", (counter_t) cs->user);
- submit (0, "wait", (counter_t) cs->iowait);
+ sg_cpu_stats *cs;
+ cs = sg_get_cpu_stats ();
+
+ if (cs == NULL)
+ {
+ ERROR ("cpu plugin: sg_get_cpu_stats failed.");
+ return (-1);
+ }
+
+ submit (0, "idle", (counter_t) cs->idle);
+ submit (0, "nice", (counter_t) cs->nice);
+ submit (0, "swap", (counter_t) cs->swap);
+ submit (0, "system", (counter_t) cs->kernel);
+ submit (0, "user", (counter_t) cs->user);
+ submit (0, "wait", (counter_t) cs->iowait);
#endif /* HAVE_LIBSTATGRAB */
return (0);