projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stats plugin: Link with libm (-lm).
[collectd.git]
/
src
/
serial.c
diff --git
a/src/serial.c
b/src/serial.c
index
4f08a34
..
9bd885d
100644
(file)
--- a/
src/serial.c
+++ b/
src/serial.c
@@
-30,23
+30,23
@@
#endif
static void serial_submit (const char *type_instance,
#endif
static void serial_submit (const char *type_instance,
-
counter_t rx, counter
_t tx)
+
derive_t rx, derive
_t tx)
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
- values[0].
counter
= rx;
- values[1].
counter
= tx;
+ values[0].
derive
= rx;
+ values[1].
derive
= tx;
vl.values = values;
vl.values_len = 2;
vl.values = values;
vl.values_len = 2;
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "serial", sizeof (vl.plugin));
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "serial", sizeof (vl.plugin));
- strncpy (vl.type_instance, type_instance,
+ sstrncpy (vl.type, "serial_octets", sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance,
sizeof (vl.type_instance));
sizeof (vl.type_instance));
- plugin_dispatch_values (
"serial_octets",
&vl);
+ plugin_dispatch_values (&vl);
}
static int serial_read (void)
}
static int serial_read (void)
@@
-54,8
+54,8
@@
static int serial_read (void)
FILE *fh;
char buffer[1024];
FILE *fh;
char buffer[1024];
-
counter
_t rx = 0;
-
counter
_t tx = 0;
+
derive
_t rx = 0;
+
derive
_t tx = 0;
char *fields[16];
int i, numfields;
char *fields[16];
int i, numfields;