.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Memcached::libmemcached::memcached_stats 3pm" .TH Memcached::libmemcached::memcached_stats 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME memcached_stat, memcached_stat_servername, memcached_stat_get_value, memcached_stat_get_keys \- Get memcached statistics .SH LIBRARY .IX Header "LIBRARY" C Client Library for memcached (libmemcached, \-lmemcached) .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& memcached_stat_st *memcached_stat (memcached_st *ptr, \& char *args, \& memcached_return_t *error); \& \& memcached_return_t memcached_stat_servername (memcached_stat_st *stat, \& char *args, \& const char *hostname, \& unsigned int port); \& \& char * \& memcached_stat_get_value (memcached_st *ptr, \& memcached_stat_st *stat, \& const char *key, \& memcached_return_t *error); \& \& char ** \& memcached_stat_get_keys (memcached_st *ptr, \& memcached_stat_st *stat, \& memcached_return_t *error); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBlibmemcached\fR\|(3) has the ability to query a memcached server (or collection of servers) for their current state. Queries to find state return a \&\f(CW\*(C`memcached_stat_st\*(C'\fR structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. <\fBmemcached_stat_get_value()\fR has been provided to query the structure. .PP \&\fBmemcached_stat()\fR fetches an array of \f(CW\*(C`memcached_stat_st\*(C'\fR structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \f(CW\*(C`MEMCACHED_BEHAVIOR_USE_UDP\*(C'\fR behavior set, a NULL value is returned and the error parameter is set to \&\f(CW\*(C`MEMCACHED_NOT_SUPPORTED\*(C'\fR. .PP \&\fBmemcached_stat_servername()\fR can be used standalone without a \f(CW\*(C`memcached_st\*(C'\fR to obtain the state of a particular server. "args" is used to define a particular state object (a list of these are not provided for by either the \fBmemcached_stat_get_keys()\fR call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to obtain information on. .PP \&\fBmemcached_stat_get_value()\fR returns the value of a particular state key. You specify the key you wish to obtain. The key must be null terminated. .PP \&\fBmemcached_stat_get_keys()\fR returns a list of keys that the server has state objects on. You are responsible for freeing this list. .PP A command line tool, \fBmemstat\fR\|(1), is provided so that you do not have to write an application to do this. .SH RETURN .IX Header "RETURN" Varies, see particular functions. .PP Any method returning a \f(CW\*(C`memcached_stat_st\*(C'\fR expects you to free the memory allocated for it. .SH HOME .IX Header "HOME" To find out more information please check: .SH AUTHOR .IX Header "AUTHOR" Brian Aker, .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBmemcached\fR\|(1) \fBlibmemcached\fR\|(3) \fBmemcached_strerror\fR\|(3)