docs: bin/
[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 DESCRIPTION
15 -----------
16
17 `libmemcached` has the ability to query a memcached server (or collection of
18 servers) for their current state. Queries to find state return a
19 `memcached_analysis_st` structure. You are responsible for freeing this
20 structure.
21
22 `memcached_analyze` analyzes useful information based on the provided servers
23 and sets the result to the `memcached_analysis_st` structure. The return value
24 must be freed by the calling application.
25
26 .. seealso:: :option:`memstat --analyze`
27 A command line tool to analyze a memcached server.
28
29
30 RETURN VALUE
31 ------------
32
33 A pointer to the allocated `memcached_analysis_st` structure on success and a
34 NULL pointer on failure. You may inspect the error detail by checking the
35 `memcached_return_t` value.
36
37 Any method returning a `memcached_analysis_st` expects you to free the memory
38 allocated for it.
39
40 SEE ALSO
41 --------
42
43 .. only:: man
44
45 :manpage:`memcached(1)`
46 :manpage:`libmemcached(3)`
47 :manpage:`memcached_strerror(3)`
48
49 .. only:: html
50
51 * :manpage:`memcached(1)`
52 * :doc:`../libmemcached`
53 * :doc:`memcached_strerror`