projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turbostat: adapt src/Makefile.am as per 4de560d2c
[collectd.git]
/
src
/
memcached.c
diff --git
a/src/memcached.c
b/src/memcached.c
index
535ea84
..
e2ccfee
100644
(file)
--- a/
src/memcached.c
+++ b/
src/memcached.c
@@
-84,6
+84,15
@@
static int memcached_connect_unix (memcached_t *st)
return (-1);
}
return (-1);
}
+ /* connect to the memcached daemon */
+ int status = connect (fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
+ if (status != 0)
+ {
+ shutdown (fd, SHUT_RDWR);
+ close (fd);
+ fd = -1;
+ }
+
return (fd);
} /* int memcached_connect_unix */
return (fd);
} /* int memcached_connect_unix */
@@
-378,7
+387,7
@@
static int memcached_read (user_data_t *user_data)
/*
* For an explanation on these fields please refer to
/*
* For an explanation on these fields please refer to
- * <http
://code.sixapart.com/svn/memcached/trunk/serv
er/doc/protocol.txt>
+ * <http
s://github.com/memcached/memcached/blob/mast
er/doc/protocol.txt>
*/
/*
*/
/*
@@
-428,6
+437,10
@@
static int memcached_read (user_data_t *user_data)
{
submit_gauge ("memcached_connections", "current", atof (fields[2]), st);
}
{
submit_gauge ("memcached_connections", "current", atof (fields[2]), st);
}
+ else if (FIELD_IS ("listen_disabled_num"))
+ {
+ submit_derive ("memcached_connections", "listen_disabled", atof (fields[2]), st);
+ }
/*
* Commands
/*
* Commands