projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to point OSX at where java is
[collectd.git]
/
src
/
interface.c
diff --git
a/src/interface.c
b/src/interface.c
index
0e13970
..
b0d9eeb
100644
(file)
--- a/
src/interface.c
+++ b/
src/interface.c
@@
-82,7
+82,9
@@
static int pnif;
* (Module-)Global variables
*/
static const char *config_keys[] = {
* (Module-)Global variables
*/
static const char *config_keys[] = {
- "Interface", "IgnoreSelected", "ReportInactive",
+ "Interface",
+ "IgnoreSelected",
+ "ReportInactive",
};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
@@
-160,7
+162,8
@@
static void if_submit(const char *dev, const char *type, derive_t rx,
derive_t tx) {
value_list_t vl = VALUE_LIST_INIT;
value_t values[] = {
derive_t tx) {
value_list_t vl = VALUE_LIST_INIT;
value_t values[] = {
- {.derive = rx}, {.derive = tx},
+ {.derive = rx},
+ {.derive = tx},
};
if (ignorelist_match(ignorelist, dev) != 0)
};
if (ignorelist_match(ignorelist, dev) != 0)
@@
-188,7
+191,7
@@
static int interface_read(void) {
#define IFA_TX_PACKT ifi_opackets
#define IFA_RX_ERROR ifi_ierrors
#define IFA_TX_ERROR ifi_oerrors
#define IFA_TX_PACKT ifi_opackets
#define IFA_RX_ERROR ifi_ierrors
#define IFA_TX_ERROR ifi_oerrors
-/* #endif HAVE_STRUCT_IF_DATA */
+
/* #endif HAVE_STRUCT_IF_DATA */
#elif HAVE_STRUCT_NET_DEVICE_STATS
#define IFA_DATA net_device_stats
#elif HAVE_STRUCT_NET_DEVICE_STATS
#define IFA_DATA net_device_stats
@@
-226,7
+229,7
@@
static int interface_read(void) {
}
freeifaddrs(if_list);
}
freeifaddrs(if_list);
-/* #endif HAVE_GETIFADDRS */
+
/* #endif HAVE_GETIFADDRS */
#elif KERNEL_LINUX
FILE *fh;
#elif KERNEL_LINUX
FILE *fh;
@@
-282,7
+285,7
@@
static int interface_read(void) {
}
fclose(fh);
}
fclose(fh);
-/* #endif KERNEL_LINUX */
+
/* #endif KERNEL_LINUX */
#elif HAVE_LIBKSTAT
derive_t rx;
#elif HAVE_LIBKSTAT
derive_t rx;
@@
-297,8
+300,8
@@
static int interface_read(void) {
continue;
if (unique_name)
continue;
if (unique_name)
- snprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
- ksp[i]->ks_instance, ksp[i]->ks_name);
+ s
s
nprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
+
ksp[i]->ks_instance, ksp[i]->ks_name);
else
sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));
else
sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));
@@
-332,7
+335,7
@@
static int interface_read(void) {
if ((rx != -1LL) || (tx != -1LL))
if_submit(iname, "if_errors", rx, tx);
}
if ((rx != -1LL) || (tx != -1LL))
if_submit(iname, "if_errors", rx, tx);
}
-/* #endif HAVE_LIBKSTAT */
+
/* #endif HAVE_LIBKSTAT */
#elif defined(HAVE_LIBSTATGRAB)
sg_network_io_stats *ios;
#elif defined(HAVE_LIBSTATGRAB)
sg_network_io_stats *ios;
@@
-345,7
+348,7
@@
static int interface_read(void) {
continue;
if_submit(ios[i].interface_name, "if_octets", ios[i].rx, ios[i].tx);
}
continue;
if_submit(ios[i].interface_name, "if_octets", ios[i].rx, ios[i].tx);
}
-/* #endif HAVE_LIBSTATGRAB */
+
/* #endif HAVE_LIBSTATGRAB */
#elif defined(HAVE_PERFSTAT)
perfstat_id_t id;
#elif defined(HAVE_PERFSTAT)
perfstat_id_t id;