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