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