1MEMCACHED_STAT_GET_KEYS(3)       libmemcached       MEMCACHED_STAT_GET_KEYS(3)
2
3
4

NAME

6       memcached_stat_get_keys - libmemcached Documentation
7
8       Get memcached statistics
9

SYNOPSIS

11       #include <libmemcached/memcached.h>
12
13       memcached_stat_st
14
15       memcached_return_t                            (*memcached_stat_fn)(mem‐
16       cached_server_instance_st server, const  char *key,  size_t key_length,
17       const char *value, size_t value_length, void *context)
18
19       memcached_stat_st  *memcached_stat(memcached_st *ptr,  char *args, mem‐
20       cached_return_t *error)
21
22       memcached_return_t   memcached_stat_servername(memcached_stat_st *stat,
23       char *args, const char *hostname, in_port_t port)
24
25       char            *           memcached_stat_get_value(memcached_st *ptr,
26       memcached_stat_st *stat, const char *key, memcached_return_t *error)
27
28       char           **            memcached_stat_get_keys(memcached_st *ptr,
29       memcached_stat_st *stat, memcached_return_t *error)
30
31       memcached_return_t   memcached_stat_execute(memcached_st *memc,   const
32       char *args, memcached_stat_fn func, void *context)
33
34       Compile and link with -lmemcached
35

DESCRIPTION

37       libmemcached(3) has the ability to query a memcached server (or collec‐
38       tion  of servers) for their current state. Queries to find state return
39       a memcached_stat_st structure. You are  responsible  for  freeing  this
40       structure.  While it is possible to access the structure directly it is
41       not advisable. memcached_stat_get_value() has been  provided  to  query
42       the structure.
43
44       memcached_stat_execute()  uses  the  servers found in memcached_stat_st
45       and executes a "stat" command on each server. args is an optional argu‐
46       ment  that can be passed in to modify the behavior of "stats". You will
47       need to supply a callback function that will be supplied each  pair  of
48       values returned by the memcached server.
49
50       memcached_stat()  fetches an array of memcached_stat_st structures con‐
51       taining the state of all available memcached servers. The return  value
52       must  be  freed  by  the  calling  application. If called with the MEM‐
53       CACHED_BEHAVIOR_USE_UDP behavior set, a NULL value is returned and  the
54       error parameter is set to MEMCACHED_NOT_SUPPORTED.
55
56       memcached_stat_servername()  can  be  used  standalone  without  a mem‐
57       cached_st to obtain the state of a particular server.  "args"  is  used
58       to  define  a particular state object (a list of these are not provided
59       for by either the memcached_stat_get_keys() call nor are  they  defined
60       in  the  memcached protocol). You must specify the hostname and port of
61       the server you want to obtain information on.
62
63       memcached_stat_get_value() returns the value of a particular state key.
64       You  specify  the  key you wish to obtain.  The key must be null termi‐
65       nated.
66
67       memcached_stat_get_keys() returns a list of keys that  the  server  has
68       state objects on. You are responsible for freeing this list.
69
70       A command line tool, memstat(1), is provided so that you do not have to
71       write an application to do this.
72

RETURN

74       Varies, see particular functions.
75
76       Any method returning a memcached_stat_st expects you to free the memory
77       allocated for it.
78

HOME

80       To find out more information please check: http://libmemcached.org/
81

AUTHOR

83       Brian Aker, <brian@tangent.org>
84

SEE ALSO

86       memcached(1) libmemcached(3) memcached_strerror(3)
87

AUTHOR

89       Brian Aker
90
92       2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
93
94
95
96
971.0.16                         January 31, 2013     MEMCACHED_STAT_GET_KEYS(3)
Impressum