fixed #133: add "compile failures" in XCache admin stats
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@456 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
71adde3e60
commit
c3035478ef
|
@ -33,6 +33,8 @@ $strings = array(
|
|||
=> '阻塞',
|
||||
'OOMs'
|
||||
=> '内存不足',
|
||||
'Errors'
|
||||
=> '错误',
|
||||
'Protected'
|
||||
=> '保护',
|
||||
'Cached'
|
||||
|
|
|
@ -33,6 +33,8 @@ $strings = array(
|
|||
=> '阻塞',
|
||||
'OOMs'
|
||||
=> '記憶體不足',
|
||||
'Errors'
|
||||
=> '错误',
|
||||
'Protected'
|
||||
=> '保護',
|
||||
'Cached'
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<dt><?php echo _T('Misses'); ?>: </dt><dd>Cache Misses, miss=a var/php is requested but not in the cache</dd>
|
||||
<dt><?php echo _T('Clogs'); ?>: </dt><dd>Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked) when the cache is busy compiling already</dd>
|
||||
<dt><?php echo _T('OOMs'); ?>: </dt><dd>Out Of Memory, how many times a new item should be stored but there isn't enough memory in the cache, think of increasing the xcache.size or xcache.var_size</dd>
|
||||
<dt><?php echo _T('Errors'); ?>: </dt><dd>Compiler errors, how many times your script is compiled but failed. You should really check what is happening if you see this value increase. See <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
|
||||
<dt><?php echo _T('Protected'); ?>: </dt><dd>Whether <a href="http://trac.lighttpd.net/xcache/wiki/ReadonlyProtection">readonly_protection</a> is available and enable on this cache</dd>
|
||||
<dt><?php echo _T('Cached'); ?>: </dt><dd>Number of entries stored in this cache</dd>
|
||||
<dt><?php echo _T('Deleted'); ?>: </dt><dd>Number of entries is pending in delete list (expired but referenced)</dd>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<dt><?php echo _T('Misses'); ?>: </dt><dd>共享内存错过次数, 错过=请求的php或者变量并不在该共享内存内</dd>
|
||||
<dt><?php echo _T('Clogs'); ?>: </dt><dd>编译阻塞跳过, 阻塞=当需该共享内存区负责编译时, 其他进程/现成无法访问此共享内存. 跳过=XCache 自动判断阻塞的共享内存区自动跳过阻塞等待, 直接使用非共享内存方式继续处理请求</dd>
|
||||
<dt><?php echo _T('OOMs'); ?>: </dt><dd>内存不足次数, 显示需要存储新数据但是共享内存区内存不足的次数. 如果出现太频繁请考虑加大配置中的 xcache.size 或者 xcache.var_size</dd>
|
||||
<dt><?php echo _T('Errors'); ?>: </dt><dd>编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
|
||||
<dt><?php echo _T('Protected'); ?>: </dt><dd>显示该 Cache 是否支持并启用 <a href="http://trac.lighttpd.net/xcache/wiki/ReadonlyProtection">readonly_protection</a></dd>
|
||||
<dt><?php echo _T('Cached'); ?>: </dt><dd>共享内存于该共享内存区的项目条数</dd>
|
||||
<dt><?php echo _T('Deleted'); ?>: </dt><dd>共享内存区内将要删除的项目 (已经删除但是还被某些进程占用)</dd>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<dt><?php echo _T('Misses'); ?>: </dt><dd>共享記憶體錯過次數,錯過=請求的php或者變數並不在該共享記憶體內</dd>
|
||||
<dt><?php echo _T('Clogs'); ?>: </dt><dd>編譯阻塞跳過,阻塞=當需該共享記憶體區負責編譯時,其他程序/現成無法存取此共享記憶體. 跳過=XCache 自動判斷阻塞的共享記憶體區自動跳過阻塞等待,直接使用非共享記憶體方式繼續處理請求</dd>
|
||||
<dt><?php echo _T('OOMs'); ?>: </dt><dd>記憶體不足次數,顯示需要儲存新資料但是共享記憶體區記憶體不足的次數. 如果出現太頻繁請考慮加大配置中的 xcache.size 或者 xcache.var_size</dd>
|
||||
<dt><?php echo _T('Errors'); ?>: </dt><dd>编译错误, 显示您的脚本被编译时出错的次数. 如果您发现这个数字不断增长, 您应该检查什么脚本产生错误. 参考 <a href="http://www.php.net/manual/en/ref.errorfunc.php#ini.error-log">ini.error-log</a> and <a href="http://cn2.php.net/manual/en/ref.errorfunc.php#ini.display-errors">ini.display-errors</a></dd>
|
||||
<dt><?php echo _T('Protected'); ?>: </dt><dd>顯示該 Cache 是否支援並啟用 <a href="http://trac.lighttpd.net/xcache/wiki/ReadonlyProtection">readonly_protection</a></dd>
|
||||
<dt><?php echo _T('Cached'); ?>: </dt><dd>共享記憶體於該共享記憶體區的項目個數</dd>
|
||||
<dt><?php echo _T('Deleted'); ?>: </dt><dd>共享記憶體區內將要刪除的項目 (已經刪除但是還被某些程序佔用)</dd>
|
||||
|
|
|
@ -34,13 +34,14 @@ $b = new Cycle('class="col1"', 'class="col2"');
|
|||
<th><?php echo _T('Misses'); ?></th>
|
||||
<th><?php echo _T('Clogs'); ?></th>
|
||||
<th><?php echo _T('OOMs'); ?></th>
|
||||
<th><?php echo _T('Errors'); ?></th>
|
||||
<th><?php echo _T('Protected'); ?></th>
|
||||
<th><?php echo _T('Cached'); ?></th>
|
||||
<th><?php echo _T('Deleted'); ?></th>
|
||||
<th><?php echo _T('GC'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$numkeys = explode(',', 'slots,size,avail,hits,misses,clogs,ooms,cached,deleted');
|
||||
$numkeys = explode(',', 'slots,size,avail,hits,misses,clogs,ooms,errors,cached,deleted');
|
||||
$l_clear = _T('Clear');
|
||||
$l_clear_confirm = _T('Sure to clear?');
|
||||
foreach ($cacheinfos as $i => $ci) {
|
||||
|
@ -75,6 +76,7 @@ $b = new Cycle('class="col1"', 'class="col2"');
|
|||
<td>{$ci['misses']}</td>
|
||||
<td>{$ci['clogs']}</td>
|
||||
<td>{$ci['ooms']}</td>
|
||||
<td>{$ci['errors']}</td>
|
||||
<td>{$ci['can_readonly']}</td>
|
||||
<td>{$ci['cached']}</td>
|
||||
<td>{$ci['deleted']}</td>
|
||||
|
|
2
xcache.c
2
xcache.c
|
@ -471,6 +471,7 @@ static void xc_fillinfo_dmz(int cachetype, xc_cache_t *cache, zval *return_value
|
|||
add_assoc_long_ex(return_value, ZEND_STRS("hits"), cache->hits);
|
||||
add_assoc_long_ex(return_value, ZEND_STRS("clogs"), cache->clogs);
|
||||
add_assoc_long_ex(return_value, ZEND_STRS("ooms"), cache->ooms);
|
||||
add_assoc_long_ex(return_value, ZEND_STRS("errors"), cache->errors);
|
||||
|
||||
add_assoc_long_ex(return_value, ZEND_STRS("cached"), cache->entries_count);
|
||||
add_assoc_long_ex(return_value, ZEND_STRS("deleted"), cache->deletes_count);
|
||||
|
@ -1401,6 +1402,7 @@ err_aftersandbox:
|
|||
|
||||
if (catched) {
|
||||
cache->compiling = 0;
|
||||
cache->errors ++;
|
||||
zend_bailout();
|
||||
}
|
||||
return op_array;
|
||||
|
|
Loading…
Reference in New Issue