server_stats


Description:

public StatusResponse server_stats (void* command_cookie = null, ServerStatsCommand*[] commands)

Request server statistics. Without a key specified the server will respond with a "default" set of statistics information. Each piece of statistical information is returned in its own packet (key contains the name of the statistical item and the body contains the value in ASCII format). The sequence of return packets is terminated with a packet that contains no key and no value.

The command will signal about transfer completion by passing NULL as the server endpoint and 0 for key length. Note that key length will be zero when some server responds with error. In latter case server endpoint argument will indicate the server address.

Example:

  ServerStatsCommand ssc = ServerStatsCommand() {
name = "my-key"
};
ServerStatsCommand*[] commands = { &ssc };
instance.server_stats( null, commands );

Parameters:

command_cookie

a cookie passed to all of the notifications from this command

commands

the array containing the statistic to get

Returns:

The status of the operation