server_status_variables.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Displays a list of server status variables
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. require_once 'libraries/common.inc.php';
  9. require_once 'libraries/server_common.inc.php';
  10. require_once 'libraries/ServerStatusData.class.php';
  11. if (PMA_DRIZZLE) {
  12. $server_master_status = false;
  13. $server_slave_status = false;
  14. } else {
  15. include_once 'libraries/replication.inc.php';
  16. include_once 'libraries/replication_gui.lib.php';
  17. }
  18. /**
  19. * flush status variables if requested
  20. */
  21. if (isset($_REQUEST['flush'])) {
  22. $_flush_commands = array(
  23. 'STATUS',
  24. 'TABLES',
  25. 'QUERY CACHE',
  26. );
  27. if (in_array($_REQUEST['flush'], $_flush_commands)) {
  28. PMA_DBI_query('FLUSH ' . $_REQUEST['flush'] . ';');
  29. }
  30. unset($_flush_commands);
  31. }
  32. $ServerStatusData = new PMA_ServerStatusData();
  33. $response = PMA_Response::getInstance();
  34. $header = $response->getHeader();
  35. $scripts = $header->getScripts();
  36. $scripts->addFile('server_status_variables.js');
  37. $scripts->addFile('jquery/jquery.tablesorter.js');
  38. $scripts->addFile('server_status_sorter.js');
  39. $response->addHTML('<div>');
  40. $response->addHTML($ServerStatusData->getMenuHtml());
  41. $response->addHTML(getFilterHtml($ServerStatusData));
  42. $response->addHTML(getLinkSuggestionsHtml($ServerStatusData));
  43. $response->addHTML(getVariablesTableHtml($ServerStatusData));
  44. $response->addHTML('</div>');
  45. exit;
  46. /**
  47. * Returns the html for the list filter
  48. *
  49. * @param Object $ServerStatusData An instance of the PMA_ServerStatusData class
  50. *
  51. * @return string
  52. */
  53. function getFilterHtml($ServerStatusData)
  54. {
  55. $filterAlert = '';
  56. if (! empty($_REQUEST['filterAlert'])) {
  57. $filterAlert = ' checked="checked"';
  58. }
  59. $filterText = '';
  60. if (! empty($_REQUEST['filterText'])) {
  61. $filterText = htmlspecialchars($_REQUEST['filterText']);
  62. }
  63. $dontFormat = '';
  64. if (! empty($_REQUEST['dontFormat'])) {
  65. $dontFormat = ' checked="checked"';
  66. }
  67. $retval = '';
  68. $retval .= '<fieldset id="tableFilter">';
  69. $retval .= '<legend>' . __('Filters') . '</legend>';
  70. $retval .= '<form action="server_status_variables.php?' . PMA_generate_common_url() . '">';
  71. $retval .= '<input type="submit" value="' . __('Refresh') . '" />';
  72. $retval .= '<div class="formelement">';
  73. $retval .= '<label for="filterText">' . __('Containing the word:') . '</label>';
  74. $retval .= '<input name="filterText" type="text" id="filterText" '
  75. . 'style="vertical-align: baseline;" value="' . $filterText . '" />';
  76. $retval .= '</div>';
  77. $retval .= '<div class="formelement">';
  78. $retval .= '<input' . $filterAlert . ' type="checkbox" name="filterAlert" id="filterAlert" />';
  79. $retval .= '<label for="filterAlert">';
  80. $retval .= __('Show only alert values');
  81. $retval .= '</label>';
  82. $retval .= '</div>';
  83. $retval .= '<div class="formelement">';
  84. $retval .= '<select id="filterCategory" name="filterCategory">';
  85. $retval .= '<option value="">' . __('Filter by category…') . '</option>';
  86. foreach ($ServerStatusData->sections as $section_id => $section_name) {
  87. if (isset($ServerStatusData->categoryUsed[$section_id])) {
  88. if (! empty($_REQUEST['filterCategory'])
  89. && $_REQUEST['filterCategory'] == $section_id
  90. ) {
  91. $selected = ' selected="selected"';
  92. } else {
  93. $selected = '';
  94. }
  95. $retval .= '<option' . $selected . ' value="' . $section_id. '">';
  96. $retval .= htmlspecialchars($section_name) . '</option>';
  97. }
  98. }
  99. $retval .= '</select>';
  100. $retval .= '</div>';
  101. $retval .= '<div class="formelement">';
  102. $retval .= '<input' . $dontFormat . ' type="checkbox" name="dontFormat" id="dontFormat" />';
  103. $retval .= '<label for="dontFormat">';
  104. $retval .= __('Show unformatted values');
  105. $retval .= '</label>';
  106. $retval .= '</div>';
  107. $retval .= '</form>';
  108. $retval .= '</fieldset>';
  109. return $retval;
  110. }
  111. /**
  112. * Prints the suggestion links
  113. *
  114. * @param Object $ServerStatusData An instance of the PMA_ServerStatusData class
  115. *
  116. * @return string
  117. */
  118. function getLinkSuggestionsHtml($ServerStatusData)
  119. {
  120. $retval = '<div id="linkSuggestions" class="defaultLinks" style="display:none">';
  121. $retval .= '<p class="notice">' . __('Related links:');
  122. foreach ($ServerStatusData->links as $section_name => $section_links) {
  123. $retval .= '<span class="status_' . $section_name . '"> ';
  124. $i=0;
  125. foreach ($section_links as $link_name => $link_url) {
  126. if ($i > 0) {
  127. $retval .= ', ';
  128. }
  129. if ('doc' == $link_name) {
  130. $retval .= PMA_Util::showMySQLDocu($link_url, $link_url);
  131. } else {
  132. $retval .= '<a href="' . $link_url . '">' . $link_name . '</a>';
  133. }
  134. $i++;
  135. }
  136. $retval .= '</span>';
  137. }
  138. unset($link_url, $link_name, $i);
  139. $retval .= '</p>';
  140. $retval .= '</div>';
  141. return $retval;
  142. }
  143. /**
  144. * Returns a table with variables information
  145. *
  146. * @param Object $ServerStatusData An instance of the PMA_ServerStatusData class
  147. *
  148. * @return string
  149. */
  150. function getVariablesTableHtml($ServerStatusData)
  151. {
  152. $retval = '';
  153. $strShowStatus = getStatusVariablesDescriptions();
  154. /**
  155. * define some alerts
  156. */
  157. // name => max value before alert
  158. $alerts = array(
  159. // lower is better
  160. // variable => max value
  161. 'Aborted_clients' => 0,
  162. 'Aborted_connects' => 0,
  163. 'Binlog_cache_disk_use' => 0,
  164. 'Created_tmp_disk_tables' => 0,
  165. 'Handler_read_rnd' => 0,
  166. 'Handler_read_rnd_next' => 0,
  167. 'Innodb_buffer_pool_pages_dirty' => 0,
  168. 'Innodb_buffer_pool_reads' => 0,
  169. 'Innodb_buffer_pool_wait_free' => 0,
  170. 'Innodb_log_waits' => 0,
  171. 'Innodb_row_lock_time_avg' => 10, // ms
  172. 'Innodb_row_lock_time_max' => 50, // ms
  173. 'Innodb_row_lock_waits' => 0,
  174. 'Slow_queries' => 0,
  175. 'Delayed_errors' => 0,
  176. 'Select_full_join' => 0,
  177. 'Select_range_check' => 0,
  178. 'Sort_merge_passes' => 0,
  179. 'Opened_tables' => 0,
  180. 'Table_locks_waited' => 0,
  181. 'Qcache_lowmem_prunes' => 0,
  182. 'Qcache_free_blocks' => isset($ServerStatusData->server_status['Qcache_total_blocks'])
  183. ? $ServerStatusData->server_status['Qcache_total_blocks'] / 5 : 0,
  184. 'Slow_launch_threads' => 0,
  185. // depends on Key_read_requests
  186. // normaly lower then 1:0.01
  187. 'Key_reads' => isset($ServerStatusData->status['Key_read_requests'])
  188. ? (0.01 * $ServerStatusData->status['Key_read_requests']) : 0,
  189. // depends on Key_write_requests
  190. // normaly nearly 1:1
  191. 'Key_writes' => isset($ServerStatusData->status['Key_write_requests'])
  192. ? (0.9 * $ServerStatusData->status['Key_write_requests']) : 0,
  193. 'Key_buffer_fraction' => 0.5,
  194. // alert if more than 95% of thread cache is in use
  195. 'Threads_cached' => isset($ServerStatusData->variables['thread_cache_size'])
  196. ? 0.95 * $ServerStatusData->variables['thread_cache_size'] : 0
  197. // higher is better
  198. // variable => min value
  199. //'Handler read key' => '> ',
  200. );
  201. $retval .= '<table class="data sortable noclick" id="serverstatusvariables">';
  202. $retval .= '<col class="namecol" />';
  203. $retval .= '<col class="valuecol" />';
  204. $retval .= '<col class="descrcol" />';
  205. $retval .= '<thead>';
  206. $retval .= '<tr>';
  207. $retval .= '<th>' . __('Variable') . '</th>';
  208. $retval .= '<th>' . __('Value') . '</th>';
  209. $retval .= '<th>' . __('Description') . '</th>';
  210. $retval .= '</tr>';
  211. $retval .= '</thead>';
  212. $retval .= '<tbody>';
  213. $odd_row = false;
  214. foreach ($ServerStatusData->status as $name => $value) {
  215. $odd_row = !$odd_row;
  216. $retval .= '<tr class="' . ($odd_row ? 'odd' : 'even')
  217. . (isset($ServerStatusData->allocationMap[$name])?' s_' . $ServerStatusData->allocationMap[$name] : '')
  218. . '">';
  219. $retval .= '<th class="name">';
  220. $retval .= htmlspecialchars(str_replace('_', ' ', $name));
  221. /* Fields containing % are calculated, they can not be described in MySQL documentation */
  222. if (strpos($name, '%') === false) {
  223. $retval .= PMA_Util::showMySQLDocu(
  224. 'server-status-variables',
  225. 'server-status-variables',
  226. false,
  227. 'statvar_' . $name
  228. );
  229. }
  230. $retval .= '</th>';
  231. $retval .= '<td class="value"><span class="formatted">';
  232. if (isset($alerts[$name])) {
  233. if ($value > $alerts[$name]) {
  234. $retval .= '<span class="attention">';
  235. } else {
  236. $retval .= '<span class="allfine">';
  237. }
  238. }
  239. if ('%' === substr($name, -1, 1)) {
  240. $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 0, 2)) . ' %';
  241. } elseif (strpos($name, 'Uptime') !== false) {
  242. $retval .= htmlspecialchars(
  243. PMA_Util::timespanFormat($value)
  244. );
  245. } elseif (is_numeric($value) && $value == (int) $value && $value > 1000) {
  246. $retval .= '<abbr title="'
  247. // makes available the raw value as a title
  248. . htmlspecialchars(PMA_Util::formatNumber($value, 0))
  249. . '">'
  250. . htmlspecialchars(PMA_Util::formatNumber($value, 3, 1));
  251. } elseif (is_numeric($value) && $value == (int) $value) {
  252. $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 3, 0));
  253. } elseif (is_numeric($value)) {
  254. $retval .= htmlspecialchars(PMA_Util::formatNumber($value, 3, 1));
  255. } else {
  256. $retval .= htmlspecialchars($value);
  257. }
  258. if (isset($alerts[$name])) {
  259. $retval .= '</span>';
  260. }
  261. $retval .= '</span>';
  262. $retval .= '<span style="display:none;" class="original">';
  263. $retval .= htmlspecialchars($value);
  264. $retval .= '</span>';
  265. $retval .= '</td>';
  266. $retval .= '<td class="descr">';
  267. if (isset($strShowStatus[$name])) {
  268. $retval .= $strShowStatus[$name];
  269. }
  270. if (isset($ServerStatusData->links[$name])) {
  271. foreach ($ServerStatusData->links[$name] as $link_name => $link_url) {
  272. if ('doc' == $link_name) {
  273. $retval .= PMA_Util::showMySQLDocu($link_url, $link_url);
  274. } else {
  275. $retval .= ' <a href="' . $link_url . '">' . $link_name . '</a>';
  276. }
  277. }
  278. unset($link_url, $link_name);
  279. }
  280. $retval .= '</td>';
  281. $retval .= '</tr>';
  282. }
  283. $retval .= '</tbody>';
  284. $retval .= '</table>';
  285. return $retval;
  286. }
  287. /**
  288. * Returns a list of variable descriptions
  289. *
  290. * @return array
  291. */
  292. function getStatusVariablesDescriptions()
  293. {
  294. /**
  295. * Messages are built using the message name
  296. */
  297. return array(
  298. 'Aborted_clients' => __(
  299. 'The number of connections that were aborted because the client died'
  300. . ' without closing the connection properly.'
  301. ),
  302. 'Aborted_connects' => __(
  303. 'The number of failed attempts to connect to the MySQL server.'
  304. ),
  305. 'Binlog_cache_disk_use' => __(
  306. 'The number of transactions that used the temporary binary log cache'
  307. . ' but that exceeded the value of binlog_cache_size and used a'
  308. . ' temporary file to store statements from the transaction.'
  309. ),
  310. 'Binlog_cache_use' => __(
  311. 'The number of transactions that used the temporary binary log cache.'
  312. ),
  313. 'Connections' => __(
  314. 'The number of connection attempts (successful or not)'
  315. . ' to the MySQL server.'
  316. ),
  317. 'Created_tmp_disk_tables' => __(
  318. 'The number of temporary tables on disk created automatically by'
  319. . ' the server while executing statements. If'
  320. . ' Created_tmp_disk_tables is big, you may want to increase the'
  321. . ' tmp_table_size value to cause temporary tables to be'
  322. . ' memory-based instead of disk-based.'
  323. ),
  324. 'Created_tmp_files' => __(
  325. 'How many temporary files mysqld has created.'
  326. ),
  327. 'Created_tmp_tables' => __(
  328. 'The number of in-memory temporary tables created automatically'
  329. . ' by the server while executing statements.'
  330. ),
  331. 'Delayed_errors' => __(
  332. 'The number of rows written with INSERT DELAYED for which some'
  333. . ' error occurred (probably duplicate key).'
  334. ),
  335. 'Delayed_insert_threads' => __(
  336. 'The number of INSERT DELAYED handler threads in use. Every'
  337. . ' different table on which one uses INSERT DELAYED gets'
  338. . ' its own thread.'
  339. ),
  340. 'Delayed_writes' => __(
  341. 'The number of INSERT DELAYED rows written.'
  342. ),
  343. 'Flush_commands' => __(
  344. 'The number of executed FLUSH statements.'
  345. ),
  346. 'Handler_commit' => __(
  347. 'The number of internal COMMIT statements.'
  348. ),
  349. 'Handler_delete' => __(
  350. 'The number of times a row was deleted from a table.'
  351. ),
  352. 'Handler_discover' => __(
  353. 'The MySQL server can ask the NDB Cluster storage engine if it'
  354. . ' knows about a table with a given name. This is called discovery.'
  355. . ' Handler_discover indicates the number of time tables have been'
  356. . ' discovered.'
  357. ),
  358. 'Handler_read_first' => __(
  359. 'The number of times the first entry was read from an index. If this'
  360. . ' is high, it suggests that the server is doing a lot of full'
  361. . ' index scans; for example, SELECT col1 FROM foo, assuming that'
  362. . ' col1 is indexed.'
  363. ),
  364. 'Handler_read_key' => __(
  365. 'The number of requests to read a row based on a key. If this is'
  366. . ' high, it is a good indication that your queries and tables'
  367. . ' are properly indexed.'
  368. ),
  369. 'Handler_read_next' => __(
  370. 'The number of requests to read the next row in key order. This is'
  371. . ' incremented if you are querying an index column with a range'
  372. . ' constraint or if you are doing an index scan.'
  373. ),
  374. 'Handler_read_prev' => __(
  375. 'The number of requests to read the previous row in key order.'
  376. . ' This read method is mainly used to optimize ORDER BY … DESC.'
  377. ),
  378. 'Handler_read_rnd' => __(
  379. 'The number of requests to read a row based on a fixed position.'
  380. . ' This is high if you are doing a lot of queries that require'
  381. . ' sorting of the result. You probably have a lot of queries that'
  382. . ' require MySQL to scan whole tables or you have joins that'
  383. . ' don\'t use keys properly.'
  384. ),
  385. 'Handler_read_rnd_next' => __(
  386. 'The number of requests to read the next row in the data file.'
  387. . ' This is high if you are doing a lot of table scans. Generally'
  388. . ' this suggests that your tables are not properly indexed or that'
  389. . ' your queries are not written to take advantage of the indexes'
  390. . ' you have.'
  391. ),
  392. 'Handler_rollback' => __(
  393. 'The number of internal ROLLBACK statements.'
  394. ),
  395. 'Handler_update' => __(
  396. 'The number of requests to update a row in a table.'
  397. ),
  398. 'Handler_write' => __(
  399. 'The number of requests to insert a row in a table.'
  400. ),
  401. 'Innodb_buffer_pool_pages_data' => __(
  402. 'The number of pages containing data (dirty or clean).'
  403. ),
  404. 'Innodb_buffer_pool_pages_dirty' => __(
  405. 'The number of pages currently dirty.'
  406. ),
  407. 'Innodb_buffer_pool_pages_flushed' => __(
  408. 'The number of buffer pool pages that have been requested'
  409. . ' to be flushed.'
  410. ),
  411. 'Innodb_buffer_pool_pages_free' => __(
  412. 'The number of free pages.'
  413. ),
  414. 'Innodb_buffer_pool_pages_latched' => __(
  415. 'The number of latched pages in InnoDB buffer pool. These are pages'
  416. . ' currently being read or written or that can\'t be flushed or'
  417. . ' removed for some other reason.'
  418. ),
  419. 'Innodb_buffer_pool_pages_misc' => __(
  420. 'The number of pages busy because they have been allocated for'
  421. . ' administrative overhead such as row locks or the adaptive'
  422. . ' hash index. This value can also be calculated as'
  423. . ' Innodb_buffer_pool_pages_total - Innodb_buffer_pool_pages_free'
  424. . ' - Innodb_buffer_pool_pages_data.'
  425. ),
  426. 'Innodb_buffer_pool_pages_total' => __(
  427. 'Total size of buffer pool, in pages.'
  428. ),
  429. 'Innodb_buffer_pool_read_ahead_rnd' => __(
  430. 'The number of "random" read-aheads InnoDB initiated. This happens'
  431. . ' when a query is to scan a large portion of a table but in'
  432. . ' random order.'
  433. ),
  434. 'Innodb_buffer_pool_read_ahead_seq' => __(
  435. 'The number of sequential read-aheads InnoDB initiated. This'
  436. . ' happens when InnoDB does a sequential full table scan.'
  437. ),
  438. 'Innodb_buffer_pool_read_requests' => __(
  439. 'The number of logical read requests InnoDB has done.'
  440. ),
  441. 'Innodb_buffer_pool_reads' => __(
  442. 'The number of logical reads that InnoDB could not satisfy'
  443. . ' from buffer pool and had to do a single-page read.'
  444. ),
  445. 'Innodb_buffer_pool_wait_free' => __(
  446. 'Normally, writes to the InnoDB buffer pool happen in the'
  447. . ' background. However, if it\'s necessary to read or create a page'
  448. . ' and no clean pages are available, it\'s necessary to wait for'
  449. . ' pages to be flushed first. This counter counts instances of'
  450. . ' these waits. If the buffer pool size was set properly, this'
  451. . ' value should be small.'
  452. ),
  453. 'Innodb_buffer_pool_write_requests' => __(
  454. 'The number writes done to the InnoDB buffer pool.'
  455. ),
  456. 'Innodb_data_fsyncs' => __(
  457. 'The number of fsync() operations so far.'
  458. ),
  459. 'Innodb_data_pending_fsyncs' => __(
  460. 'The current number of pending fsync() operations.'
  461. ),
  462. 'Innodb_data_pending_reads' => __(
  463. 'The current number of pending reads.'
  464. ),
  465. 'Innodb_data_pending_writes' => __(
  466. 'The current number of pending writes.'
  467. ),
  468. 'Innodb_data_read' => __(
  469. 'The amount of data read so far, in bytes.'
  470. ),
  471. 'Innodb_data_reads' => __(
  472. 'The total number of data reads.'
  473. ),
  474. 'Innodb_data_writes' => __(
  475. 'The total number of data writes.'
  476. ),
  477. 'Innodb_data_written' => __(
  478. 'The amount of data written so far, in bytes.'
  479. ),
  480. 'Innodb_dblwr_pages_written' => __(
  481. 'The number of pages that have been written for'
  482. . ' doublewrite operations.'
  483. ),
  484. 'Innodb_dblwr_writes' => __(
  485. 'The number of doublewrite operations that have been performed.'
  486. ),
  487. 'Innodb_log_waits' => __(
  488. 'The number of waits we had because log buffer was too small and'
  489. . ' we had to wait for it to be flushed before continuing.'
  490. ),
  491. 'Innodb_log_write_requests' => __(
  492. 'The number of log write requests.'
  493. ),
  494. 'Innodb_log_writes' => __(
  495. 'The number of physical writes to the log file.'
  496. ),
  497. 'Innodb_os_log_fsyncs' => __(
  498. 'The number of fsync() writes done to the log file.'
  499. ),
  500. 'Innodb_os_log_pending_fsyncs' => __(
  501. 'The number of pending log file fsyncs.'
  502. ),
  503. 'Innodb_os_log_pending_writes' => __(
  504. 'Pending log file writes.'
  505. ),
  506. 'Innodb_os_log_written' => __(
  507. 'The number of bytes written to the log file.'
  508. ),
  509. 'Innodb_pages_created' => __(
  510. 'The number of pages created.'
  511. ),
  512. 'Innodb_page_size' => __(
  513. 'The compiled-in InnoDB page size (default 16KB). Many values are'
  514. . ' counted in pages; the page size allows them to be easily'
  515. . ' converted to bytes.'
  516. ),
  517. 'Innodb_pages_read' => __(
  518. 'The number of pages read.'
  519. ),
  520. 'Innodb_pages_written' => __(
  521. 'The number of pages written.'
  522. ),
  523. 'Innodb_row_lock_current_waits' => __(
  524. 'The number of row locks currently being waited for.'
  525. ),
  526. 'Innodb_row_lock_time_avg' => __(
  527. 'The average time to acquire a row lock, in milliseconds.'
  528. ),
  529. 'Innodb_row_lock_time' => __(
  530. 'The total time spent in acquiring row locks, in milliseconds.'
  531. ),
  532. 'Innodb_row_lock_time_max' => __(
  533. 'The maximum time to acquire a row lock, in milliseconds.'
  534. ),
  535. 'Innodb_row_lock_waits' => __(
  536. 'The number of times a row lock had to be waited for.'
  537. ),
  538. 'Innodb_rows_deleted' => __(
  539. 'The number of rows deleted from InnoDB tables.'
  540. ),
  541. 'Innodb_rows_inserted' => __(
  542. 'The number of rows inserted in InnoDB tables.'
  543. ),
  544. 'Innodb_rows_read' => __(
  545. 'The number of rows read from InnoDB tables.'
  546. ),
  547. 'Innodb_rows_updated' => __(
  548. 'The number of rows updated in InnoDB tables.'
  549. ),
  550. 'Key_blocks_not_flushed' => __(
  551. 'The number of key blocks in the key cache that have changed but'
  552. . ' haven\'t yet been flushed to disk. It used to be known as'
  553. . ' Not_flushed_key_blocks.'
  554. ),
  555. 'Key_blocks_unused' => __(
  556. 'The number of unused blocks in the key cache. You can use this'
  557. . ' value to determine how much of the key cache is in use.'
  558. ),
  559. 'Key_blocks_used' => __(
  560. 'The number of used blocks in the key cache. This value is a'
  561. . ' high-water mark that indicates the maximum number of blocks'
  562. . ' that have ever been in use at one time.'
  563. ),
  564. 'Key_buffer_fraction_%' => __(
  565. 'Percentage of used key cache (calculated value)'
  566. ),
  567. 'Key_read_requests' => __(
  568. 'The number of requests to read a key block from the cache.'
  569. ),
  570. 'Key_reads' => __(
  571. 'The number of physical reads of a key block from disk. If Key_reads'
  572. . ' is big, then your key_buffer_size value is probably too small.'
  573. . ' The cache miss rate can be calculated as'
  574. . ' Key_reads/Key_read_requests.'
  575. ),
  576. 'Key_read_ratio_%' => __(
  577. 'Key cache miss calculated as rate of physical reads compared'
  578. . ' to read requests (calculated value)'
  579. ),
  580. 'Key_write_requests' => __(
  581. 'The number of requests to write a key block to the cache.'
  582. ),
  583. 'Key_writes' => __(
  584. 'The number of physical writes of a key block to disk.'
  585. ),
  586. 'Key_write_ratio_%' => __(
  587. 'Percentage of physical writes compared'
  588. . ' to write requests (calculated value)'
  589. ),
  590. 'Last_query_cost' => __(
  591. 'The total cost of the last compiled query as computed by the query'
  592. . ' optimizer. Useful for comparing the cost of different query'
  593. . ' plans for the same query. The default value of 0 means that'
  594. . ' no query has been compiled yet.'
  595. ),
  596. 'Max_used_connections' => __(
  597. 'The maximum number of connections that have been in use'
  598. . ' simultaneously since the server started.'
  599. ),
  600. 'Not_flushed_delayed_rows' => __(
  601. 'The number of rows waiting to be written in INSERT DELAYED queues.'
  602. ),
  603. 'Opened_tables' => __(
  604. 'The number of tables that have been opened. If opened tables is'
  605. . ' big, your table cache value is probably too small.'
  606. ),
  607. 'Open_files' => __(
  608. 'The number of files that are open.'
  609. ),
  610. 'Open_streams' => __(
  611. 'The number of streams that are open (used mainly for logging).'
  612. ),
  613. 'Open_tables' => __(
  614. 'The number of tables that are open.'
  615. ),
  616. 'Qcache_free_blocks' => __(
  617. 'The number of free memory blocks in query cache. High numbers can'
  618. . ' indicate fragmentation issues, which may be solved by issuing'
  619. . ' a FLUSH QUERY CACHE statement.'
  620. ),
  621. 'Qcache_free_memory' => __(
  622. 'The amount of free memory for query cache.'
  623. ),
  624. 'Qcache_hits' => __(
  625. 'The number of cache hits.'
  626. ),
  627. 'Qcache_inserts' => __(
  628. 'The number of queries added to the cache.'
  629. ),
  630. 'Qcache_lowmem_prunes' => __(
  631. 'The number of queries that have been removed from the cache to'
  632. . ' free up memory for caching new queries. This information can'
  633. . ' help you tune the query cache size. The query cache uses a'
  634. . ' least recently used (LRU) strategy to decide which queries'
  635. . ' to remove from the cache.'
  636. ),
  637. 'Qcache_not_cached' => __(
  638. 'The number of non-cached queries (not cachable, or not cached'
  639. . ' due to the query_cache_type setting).'
  640. ),
  641. 'Qcache_queries_in_cache' => __(
  642. 'The number of queries registered in the cache.'
  643. ),
  644. 'Qcache_total_blocks' => __(
  645. 'The total number of blocks in the query cache.'
  646. ),
  647. 'Rpl_status' => __(
  648. 'The status of failsafe replication (not yet implemented).'
  649. ),
  650. 'Select_full_join' => __(
  651. 'The number of joins that do not use indexes. If this value is'
  652. . ' not 0, you should carefully check the indexes of your tables.'
  653. ),
  654. 'Select_full_range_join' => __(
  655. 'The number of joins that used a range search on a reference table.'
  656. ),
  657. 'Select_range_check' => __(
  658. 'The number of joins without keys that check for key usage after'
  659. . ' each row. (If this is not 0, you should carefully check the'
  660. . ' indexes of your tables.)'
  661. ),
  662. 'Select_range' => __(
  663. 'The number of joins that used ranges on the first table. (It\'s'
  664. . ' normally not critical even if this is big.)'
  665. ),
  666. 'Select_scan' => __(
  667. 'The number of joins that did a full scan of the first table.'
  668. ),
  669. 'Slave_open_temp_tables' => __(
  670. 'The number of temporary tables currently'
  671. . ' open by the slave SQL thread.'
  672. ),
  673. 'Slave_retried_transactions' => __(
  674. 'Total (since startup) number of times the replication slave SQL'
  675. . ' thread has retried transactions.'
  676. ),
  677. 'Slave_running' => __(
  678. 'This is ON if this server is a slave that is connected to a master.'
  679. ),
  680. 'Slow_launch_threads' => __(
  681. 'The number of threads that have taken more than slow_launch_time'
  682. . ' seconds to create.'
  683. ),
  684. 'Slow_queries' => __(
  685. 'The number of queries that have taken more than long_query_time'
  686. . ' seconds.'
  687. ),
  688. 'Sort_merge_passes' => __(
  689. 'The number of merge passes the sort algorithm has had to do.'
  690. . ' If this value is large, you should consider increasing the'
  691. . ' value of the sort_buffer_size system variable.'
  692. ),
  693. 'Sort_range' => __(
  694. 'The number of sorts that were done with ranges.'
  695. ),
  696. 'Sort_rows' => __(
  697. 'The number of sorted rows.'
  698. ),
  699. 'Sort_scan' => __(
  700. 'The number of sorts that were done by scanning the table.'
  701. ),
  702. 'Table_locks_immediate' => __(
  703. 'The number of times that a table lock was acquired immediately.'
  704. ),
  705. 'Table_locks_waited' => __(
  706. 'The number of times that a table lock could not be acquired'
  707. . ' immediately and a wait was needed. If this is high, and you have'
  708. . ' performance problems, you should first optimize your queries,'
  709. . ' and then either split your table or tables or use replication.'
  710. ),
  711. 'Threads_cached' => __(
  712. 'The number of threads in the thread cache. The cache hit rate can'
  713. . ' be calculated as Threads_created/Connections. If this value is'
  714. . ' red you should raise your thread_cache_size.'
  715. ),
  716. 'Threads_connected' => __(
  717. 'The number of currently open connections.'
  718. ),
  719. 'Threads_created' => __(
  720. 'The number of threads created to handle connections. If'
  721. . ' Threads_created is big, you may want to increase the'
  722. . ' thread_cache_size value. (Normally this doesn\'t give a notable'
  723. . ' performance improvement if you have a good thread'
  724. . ' implementation.)'
  725. ),
  726. 'Threads_cache_hitrate_%' => __(
  727. 'Thread cache hit rate (calculated value)'
  728. ),
  729. 'Threads_running' => __(
  730. 'The number of threads that are not sleeping.'
  731. )
  732. );
  733. }
  734. ?>