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