- Модуль: cluster
- Путь к файлу: ~/bitrix/modules/cluster/classes/general/memcache.php
- Класс: CClusterMemcache
- Вызов: CClusterMemcache::GetStatus
static function GetStatus($id)
{
$arStats = array();
$arServer = CClusterMemcache::GetByID($id);
if(is_array($arServer))
{
$ob = new Memcache;
if(@$ob->connect($arServer["HOST"], $arServer["PORT"]))
{
$arStats = array(
'uptime' => null,
'version' => null,
'cmd_get' => null,
'cmd_set' => null,
'get_misses' => null,
'get_hits' => null,
'evictions' => null,
'limit_maxbytes' => null,
'bytes' => null,
'curr_items' => null,
'listen_disabled_num' => null,
);
$ar = $ob->getstats();
foreach($arStats as $key => $value)
$arStats[$key] = $ar[$key];
}
}
return $arStats;
}