- PHP 手册
- 函数参考
- 搜索引擎扩展
- Sphinx
- SphinxClient
SphinxClient::status
(PECL sphinx >= 1.0.3)
SphinxClient::status — Queries searchd status
说明
public SphinxClient::status ( void ) : arrayQueries searchd status, and returns an array of status variable name and value pairs.
参数
此函数没有参数。
更新日志
PECL/sphinx 版本 | 说明 |
---|---|
1.0.3 | Added SphinxClient::status(), available only if compiled with libsphinxclient >= 0.9.9. |
返回值
Returns an associative array of search server statistics 或者在失败时返回 FALSE
.
User Contributed Notes 1 note
up down 0 orlov0562 at gmail dot com ¶2 years ago
Returned array contains next fields (Sphinx 2.2.11)
-------------------------
print_r(array_map(function($in){return $in[0].' = '.$in[1];}, $sphinx->status()));
-------------------------
Array
(
[0] => uptime = 10540
[1] => connections = 35
[2] => maxed_out = 0
[3] => command_search = 21
[4] => command_excerpt = 10
[5] => command_update = 0
[6] => command_delete = 0
[7] => command_keywords = 0
[8] => command_persist = 0
[9] => command_status = 4
[10] => command_flushattrs = 0
[11] => agent_connect = 0
[12] => agent_retry = 0
[13] => queries = 21
[14] => dist_queries = 0
[15] => query_wall = 0.009
[16] => query_cpu = OFF
[17] => dist_wall = 0.000
[18] => dist_local = 0.000
[19] => dist_wait = 0.000
[20] => query_reads = OFF
[21] => query_readkb = OFF
[22] => query_readtime = OFF
[23] => avg_query_wall = 0.000
[24] => avg_query_cpu = OFF
[25] => avg_dist_wall = 0.000
[26] => avg_dist_local = 0.000
[27] => avg_dist_wait = 0.000
[28] => avg_query_reads = OFF
[29] => avg_query_readkb = OFF
[30] => avg_query_readtime = OFF
)
-------------------------
add a note
官方地址:https://www.php.net/manual/en/sphinxclient.status.php