scache_srvstats

Description

array scache_srvstats(resource session)
array $SCacheConnection->srvstats()

scache_srvstats returns statistics from scached backend if allowed by backends config.

Parameters

session
Session resource returned from scache_open, scache_reset or scache_connect

Return values

Array containing returned data or FALSE on failure.

In case of failure, error codes resolvable by scache_lasterr is one of below :

Notes

Scached backend's counters are internally 64bit counters. To express them somehow also with 32bit php they are returned as floats, which may lead on funny numbers after they become large enough.

Examples

<?php

/* get connection */
$session = scache_reset('MyEasilyGuessableSecret');

print_r(scache_srvstats($session));

/* ..will print */
Array
(
    [SERVER] => Array
        (
            [sessiontable_max] => 20007
            [mallocs_allocated] => 0
            [mallocs_freed] => 0
            [mallocs_total] => 0
            [req_count_success] => 1613883
            [req_count_invalid] => 300002
            [req_count_unknown] => 0
            [session_creates] => 20033
            [session_reuses] => 22
            [session_destroys] => 3
            [session_expires] => 0
            [session_clears] => 20025
            [session_hit_by_idx] => 1863288
            [session_miss_by_idx] => 0
            [session_miss_by_search] => 20011
            [session_secret_mismatches] => 2
            [all_cache_hits] => 20002
            [all_cache_misses] => 9999
            [all_cache_adds] => 10001
            [all_cache_dels] => 9999
            [all_cache_expires] => 0
            [io_requests] => 2878553
            [io_bytes_read] => 212626648
            [io_bytes_written] => 50601295
            [io_socks_accepted] => 571
            [io_socks_accept_fails] => 0
            [io_socks_closed] => 0
            [io_polls] => 1925025
            [req_t_getopts] => 0
            [req_t_setopts] => 1
            [req_t_srvstats] => 1
            [req_t_adds] => 2
            [req_t_sets] => 1323915
            [req_t_replaces] => 2
            [req_t_unsets] => 66155
            [req_t_stats] => 200002
            [req_t_gets] => 897916
            [req_t_shadds] => 0
            [req_t_shsets] => 0
            [req_t_shreplaces] => 0
            [req_t_shunsets] => 0
            [req_t_shstats] => 0
            [req_t_shgets] => 0
            [req_t_chgets] => 30001
            [req_t_chputs] => 10001
            [req_t_chclears] => 9999
            [req_t_vadds] => 50000
            [req_t_vsubs] => 50000
            [req_t_vgets] => 100000
            [req_t_vsets] => 100001
            [req_t_vunsets] => 0
            [req_t_shdlrgets] => 0
            [req_t_shdlrputs] => 0
            [req_t_shdlrdrops] => 0
            [req_t_creates] => 20554
            [req_t_drops] => 20001
            [req_t_nones] => 0
            [req_t_unknowns] => 0
            [wblock_allocs] => 5720358
            [trees_created] => 821964
            [trees_freed] => 821950
            [trees_out] => 14
            [tree_nodes_created] => 1303965
            [tree_nodes_freed] => 1233950
            [tree_nodes_out] => 70015
            [memq16_out] => 150027
            [memq16_total] => 14391862
            [memq16_allocs] => 14391862
            [memq32_out] => 8
            [memq32_total] => 24367
            [memq32_allocs] => 24367
            [memq64_out] => 40014
            [memq64_total] => 46111
            [memq64_allocs] => 46111
            [memq128_out] => 2
            [memq128_total] => 5181
            [memq128_allocs] => 5181
            [memq256_out] => 0
            [memq256_total] => 29494
            [memq256_allocs] => 29494
            [memq512_out] => 0
            [memq512_total] => 38250
            [memq512_allocs] => 38250
            [memq1024_out] => 0
            [memq1024_total] => 0
            [memq1024_allocs] => 0
        )

    [PARTITION] => Array
        (
            [allow_lvals] => 1
            [allow_stats] => 1
            [allow_cache] => 1
            [allow_shared] => 1
            [allow_session] => 1
            [cache_hits] => 20002
            [cache_misses] => 9999
            [cache_adds] => 10001
            [cache_dels] => 9999
            [cache_expires] => 0
            [cache_max] => 16777216
            [memory_allocated] => 0
            [memory_limit] => 1099511627776
            [nodes_allocated] => 8
            [nodes_limit] => 1099511627776
        )

    [SESSION] => Array
        (
            [index] => 2
            [expires] => 1314947998
            [maxidle] => 1800
            [nodes_allocated] => 1
            [memory_allocated] => 0
        )

)
?>