Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wincache_fcache_fileinfo(3) [php man page]

WINCACHE_FCACHE_FILEINFO(3)						 1					       WINCACHE_FCACHE_FILEINFO(3)

wincache_fcache_fileinfo - Retrieves information about files cached in the file cache

SYNOPSIS
array wincache_fcache_fileinfo ([bool $summaryonly = false]) DESCRIPTION
Retrieves information about file cache content and its usage. PARAMETERS
o $summaryonly - Controls whether the returned array will contain information about individual cache entries along with the file cache summary. RETURN VALUES
Array of meta data about file cache or FALSE on failure The array returned by this function contains the following elements: o total_cache_uptime - total time in seconds that the file cache has been active o total_file_count - total number of files that are currently in the file cache o total_hit_count - number of times the files have been served from the file cache o total_miss_count - number of times the files have not been found in the file cache o file_entries - an array that contains the information about all the cached files: o file_name - absolute file name of the cached file o add_time - time in seconds since the file has been added to the file cache o use_time - time in seconds since the file has been accessed in the file cache o last_check - time in seconds since the file has been checked for modifications o hit_count - number of times the file has been served from the cache o file_size - size of the cached file in bytes EXAMPLES
Example #1 A wincache_fcache_fileinfo(3) example <pre> <?php print_r(wincache_fcache_fileinfo()); ?> </pre> The above example will output: Array ( [total_cache_uptime] => 3234 [total_file_count] => 5 [total_hit_count] => 0 [total_miss_count] => 1 [file_entries] => Array ( [1] => Array ( [file_name] => c:inetpubwwwrootcheckcache.php [add_time] => 1 [use_time] => 0 [last_check] => 1 [hit_count] => 1 [file_size] => 2435 ) [2] => Array (...iterates for each cached file) ) ) SEE ALSO
wincache_fcache_meminfo(3), wincache_ocache_fileinfo(3), wincache_ocache_meminfo(3), wincache_rplist_fileinfo(3), wincache_rplist_mem- info(3), wincache_refresh_if_changed(3), wincache_ucache_meminfo(3), wincache_ucache_info(3), wincache_scache_info(3), wincache_scache_mem- info(3). PHP Documentation Group WINCACHE_FCACHE_FILEINFO(3)

Check Out this Related Man Page

MYSQLND_QC_GET_CORE_STATS(3)						 1					      MYSQLND_QC_GET_CORE_STATS(3)

mysqlnd_qc_get_core_stats - Statistics collected by the core of the query cache

SYNOPSIS
array mysqlnd_qc_get_core_stats (void ) DESCRIPTION
Returns an array of statistics collected by the core of the cache plugin. The same data fields will be reported for any storage handler because the data is collected by the core. The PHP configuration setting mysqlnd_qc.collect_statistics controls the collection of statistics. The collection of statistics is dis- abled by default for performance reasons. Disabling the collection of statistics will also disable the collection of time related statis- tics. The PHP configuration setting mysqlnd_qc.collect_time_statistics controls the collection of time related statistics. The scope of the core statistics is the PHP process. Depending on your deployment model a PHP process may handle one or multiple requests. Statistics are aggregated for all cache entries and all storage handler. It is not possible to tell how much queries originating from mysqli, PDO_MySQL or mysql API calls have contributed to the aggregated data values. PARAMETERS
This function has no parameters. RETURN VALUES
Array of core statistics +--------------------------------+-----------------------------------------+---+ | Statistic | | | | | | | | | Description | | | | | | | | Version | | | | | | +--------------------------------+-----------------------------------------+---+ | | | | | cache_hit | | | | | | | | | Statement is considered cacheable | | | | and cached data has been reused. | | | | Statement is considered cacheable | | | | and a cache miss happened but the | | | | statement got cached by someone else | | | | while we process it and thus we can | | | | fetch the result from the refreshed | | | | cache. | | | | | | | | Since 1.0.0. | | | | | | | | | | | cache_miss | | | | | | | | | Statement is considered | | | | cacheable... | | | | | | | | o ... and has been | | | | added to the cache | | | | | | | | o ... but the | | | | PHP configuration | | | | directive setting of | | | | mysqlnd_qc.cache_no_ta- | | | | ble = 1 has pre- | | | | vented caching. | | | | | | | | o ... but an | | | | unbuffered result set | | | | is requested. | | | | | | | | o ... but a buffered | | | | result set was empty. | | | | | | | | Since 1.0.0. | | | | | | | | | | | cache_put | | | | | | | | | Statement is considered cacheable and | | | | has been added to the cache. Take care | | | | when calculating derived statistics. | | | | Storage handler with a storage life | | | | time beyond process scope may report | | | | cache_put = 0 together with cache_hit > | | | | 0, if another process has filled the | | | | cache. You may want to use num_entries | | | | from mysqlnd_qc_get_cache_info(3) if | | | | the handler supports it ( default, | | | | APC). | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_should_cache | | | | | | | | | Statement is considered cacheable | | | | based on query string analysis. The | | | | statement may or may not be added to | | | | the cache. See also cache_put. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_should_not_cache | | | | | | | | | Statement is considered not cacheable | | | | based on query string analysis. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_not_cached | | | | | | | | | Statement is considered not cacheable | | | | or it is considered cachable but the | | | | storage handler has not returned a hash | | | | key for it. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_could_cache | | | | | | | | | Statement is considered cacheable... | | | | | | | | o ... and statement has | | | | been run without errors | | | | | | | | o ... and meta data shows | | | | at least one column in | | | | the result set | | | | | | | | The statement may or may not be | | | | in the cache already. It may or | | | | may not be added to the cache | | | | later on. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_found_in_cache | | | | | | | | | Statement is considered cacheable and | | | | we have found it in the cache but we | | | | have not replayed the cached data yet | | | | and we have not send the result set to | | | | the client yet. This is not considered | | | | a cache hit because the client might | | | | not fetch the result or the cached data | | | | may be faulty. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_uncached_other | | | | | | | | | Statement is considered cacheable and | | | | it may or may not be in the cache | | | | already but either replaying cached | | | | data has failed, no result set is | | | | available or some other error has hap- | | | | pened. | | | | | | | | | | | query_uncached_no_table | | | | | | | | | Statement has not been cached because | | | | the result set has at least one column | | | | which has no table name in its meta | | | | data. An example of such a query is | | | | SELECT SLEEP(1). To cache those state- | | | | ments you have to change default value | | | | of the PHP configuration directive | | | | mysqlnd_qc.cache_no_table and set | | | | mysqlnd_qc.cache_no_table = 1. Often, | | | | it is not desired to cache such state- | | | | ments. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_uncached_use_result | | | | | | | | | Statement would have been cached if a | | | | buffered result set had been used. The | | | | situation is also considered as a cache | | | | miss and cache_miss will be incremented | | | | as well. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_aggr_run_time_cache_hit | | | | | | | | | Aggregated run time (ms) of all cached | | | | queries. Cached queries are those which | | | | have incremented cache_hit. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_aggr_run_time_cache_put | | | | | | | | | Aggregated run time (ms) of all | | | | uncached queries that have been put | | | | into the cache. See also cache_put. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_aggr_run_time_total | | | | | | | | | Aggregated run time (ms) of all | | | | uncached and cached queries that have | | | | been inspected and executed by the | | | | query cache. | | | | | | | | Since 1.0.0. | | | | | | | | | | |query_aggr_store_time_cache_hit | | | | | | | | | Aggregated store time (ms) of all | | | | cached queries. Cached queries are | | | | those which have incremented cache_hit. | | | | | | | | Since 1.0.0. | | | | | | | | | | |query_aggr_store_time_cache_put | | | | | | | | | Aggregated store time ( ms) of all | | | | uncached queries that have been put | | | | into the cache. See also cache_put. | | | | | | | | Since 1.0.0. | | | | | | | | | | | query_aggr_store_time_total | | | | | | | | | Aggregated store time (ms) of all | | | | uncached and cached queries that have | | | | been inspected and executed by the | | | | query cache. | | | | | | | | Since 1.0.0. | | | | | | | | | | | receive_bytes_recorded | | | | | | | | | Recorded incoming network traffic ( | | | | bytes) send from MySQL to PHP. The | | | | traffic may or may not have been added | | | | to the cache. The traffic is the total | | | | for all queries regardless if cached or | | | | not. | | | | | | | | Since 1.0.0. | | | | | | | | | | | receive_bytes_replayed | | | | | | | | | Network traffic replayed during cache. | | | | This is the total amount of incoming | | | | traffic saved because of the usage of | | | | the query cache plugin. | | | | | | | | Since 1.0.0. | | | | | | | | | | | send_bytes_recorded | | | | | | | | | Recorded outgoing network traffic ( | | | | bytes) send from MySQL to PHP. The | | | | traffic may or may not have been added | | | | to the cache. The traffic is the total | | | | for all queries regardless if cached or | | | | not. | | | | | | | | Since 1.0.0. | | | | | | | | | | | send_bytes_replayed | | | | | | | | | Network traffic replayed during cache. | | | | This is the total amount of outgoing | | | | traffic saved because of the usage of | | | | the query cache plugin. | | | | | | | | Since 1.0.0. | | | | | | | | | | | slam_stale_refresh | | | | | | | | | Number of cache misses which triggered | | | | serving stale data until the client | | | | causing the cache miss has refreshed | | | | the cache entry. | | | | | | | | Since 1.0.0. | | | | | | | | | | | slam_stale_hit | | | | | | | | | Number of cache hits while a stale | | | | cache entry gets refreshed. | | | | | | | | Since 1.0.0. | | | | | | +--------------------------------+-----------------------------------------+---+ EXAMPLES
Example #1 mysqlnd_qc_get_core_stats(3) example <?php /* Enable collection of statistics - default: disabled */ ini_set("mysqlnd_qc.collect_statistics", 1); /* Enable collection of all timing related statistics - default: enabled but overruled by mysqlnd_qc.collect_statistics = 0 */ ini_set("mysqlnd_qc.collect_time_statistics", 1); /* Populate the cache, e.g. using mysqli */ $mysqli = new mysqli('host', 'user', 'password', 'schema'); /* Cache miss and cache put */ $mysqli->query("/*qc=on*/SELECT id FROM test"); /* Cache hit */ $mysqli->query("/*qc=on*/SELECT id FROM test"); /* Display core statistics */ var_dump(mysqlnd_qc_get_core_stats()); ?> The above examples will output: array(26) { ["cache_hit"]=> string(1) "1" ["cache_miss"]=> string(1) "1" ["cache_put"]=> string(1) "1" ["query_should_cache"]=> string(1) "2" ["query_should_not_cache"]=> string(1) "0" ["query_not_cached"]=> string(1) "0" ["query_could_cache"]=> string(1) "2" ["query_found_in_cache"]=> string(1) "1" ["query_uncached_other"]=> string(1) "0" ["query_uncached_no_table"]=> string(1) "0" ["query_uncached_no_result"]=> string(1) "0" ["query_uncached_use_result"]=> string(1) "0" ["query_aggr_run_time_cache_hit"]=> string(1) "4" ["query_aggr_run_time_cache_put"]=> string(3) "395" ["query_aggr_run_time_total"]=> string(3) "399" ["query_aggr_store_time_cache_hit"]=> string(1) "2" ["query_aggr_store_time_cache_put"]=> string(1) "8" ["query_aggr_store_time_total"]=> string(2) "10" ["receive_bytes_recorded"]=> string(2) "65" ["receive_bytes_replayed"]=> string(2) "65" ["send_bytes_recorded"]=> string(2) "29" ["send_bytes_replayed"]=> string(2) "29" ["slam_stale_refresh"]=> string(1) "0" ["slam_stale_hit"]=> string(1) "0" ["request_counter"]=> int(1) ["process_hash"]=> int(3547549858) } SEE ALSO
Runtime configuration, mysqlnd_qc.collect_statistics, mysqlnd_qc.time_statistics, mysqlnd_qc_get_cache_info(3). PHP Documentation Group MYSQLND_QC_GET_CORE_STATS(3)
Man Page