fix #131: add build time option: CLIENT_PREFIX
[awesomized/libmemcached] / docs / source / libmemcached / memcached_analyze.rst
1 Analyzing servers
2 =================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
9
10 .. type:: struct memcached_analysis_st memcached_analysis_st
11
12 .. function:: memcached_analysis_st *memcached_analyze(memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error)
13
14 :param ptr: pointer to initialized `memcached_st` struct
15 :param stat: pointer to a `memcached_stat_st` struct to fill
16 :param error: pointer to `memcached_return_t` indicating success
17 :returns: pointer to an allocated and filled out `memcached_analysis_t` struct
18
19 DESCRIPTION
20 -----------
21
22 `libmemcached` has the ability to query a memcached server (or collection of
23 servers) for their current state. Queries to find state return a
24 `memcached_analysis_st` structure. You are responsible for freeing this
25 structure.
26
27 `memcached_analyze` analyzes useful information based on the provided servers
28 and sets the result to the `memcached_analysis_st` structure. The return value
29 must be freed by the calling application.
30
31 .. seealso:: :option:`memstat -a|--analyze [<arg>]`
32 A command line tool to analyze a memcached server.
33
34
35 RETURN VALUE
36 ------------
37
38 A pointer to the allocated `memcached_analysis_st` structure on success and a
39 NULL pointer on failure. You may inspect the error detail by checking the
40 `memcached_return_t` value.
41
42 Any method returning a `memcached_analysis_st` expects you to free the memory
43 allocated for it.
44
45 SEE ALSO
46 --------
47
48 .. only:: man
49
50 :manpage:`memcached(1)`
51 :manpage:`libmemcached(3)`
52 :manpage:`memcached_strerror(3)`
53
54 .. only:: html
55
56 * :manpage:`memcached(1)`
57 * :doc:`../libmemcached`
58 * :doc:`memcached_strerror`