ARSperl Manual - ars_GetServerStatistics

## `ars_GetServerStatistics(ctrl, statisticNumber)`

Returns a HASH consisting of server statistics. `statisticNumber` is the enumerated statistic value as listed in the `ar.h` header file. In addition, you can use the `ARServerStats` hash to convert from a statistic name to a statistic number.

Here is an example:

    	%stats = ars_GetServerStatistics($ctrl, $ARServerStats{'START_TIME'},
    						$ARServerStats{'API_REQUESTS'});

This will return a HASH where the key is the enumerated value of the requested statistic and the value of the hash is the actual statistic value. To reference a statistic in the above HASH you can do this:

    	print $stats{$ARServerStats{'START_TIME'}}."\n";

On success
  returns a HASH
On failure
  returns undef

ars_GetServerStatistics was introduced in version 1.3 of ARSperl.

Table of Contents