fetchValue( 'SELECT UNIX_TIMESTAMP() - ' . $ServerStatusData->status['Uptime'] ); $retval = '
'; $retval .= sprintf( __('This MySQL server has been running for %1$s. It started up on %2$s.'), PMA_Util::timespanFormat($ServerStatusData->status['Uptime']), PMA_Util::localisedDate($start_time) ) . "\n"; $retval .= '
'; if ($GLOBALS['server_master_status'] || $GLOBALS['server_slave_status']) { $retval .= ''; if ($GLOBALS['server_master_status'] && $GLOBALS['server_slave_status']) { $retval .= __( 'This MySQL server works as master and ' . 'slave in replication process.' ); } elseif ($GLOBALS['server_master_status']) { $retval .= __( 'This MySQL server works as master ' . 'in replication process.' ); } elseif ($GLOBALS['server_slave_status']) { $retval .= __( 'This MySQL server works as slave ' . 'in replication process.' ); } $retval .= '
'; } /* * if the server works as master or slave in replication process, * display useful information */ if ($GLOBALS['server_master_status'] || $GLOBALS['server_slave_status']) { $retval .= ''; $retval .= __('Traffic') . ' '; $retval .= PMA_Util::showHint( __( 'On a busy server, the byte counters may overrun, so those statistics ' . 'as reported by the MySQL server may be incorrect.' ) ); $retval .= ' | '; $retval .= 'ø ' . __('per hour') . ' | '; $retval .= '|
---|---|---|
' . __('Received') . ' | '; $retval .= ''; $retval .= implode( ' ', PMA_Util::formatByteDown( $ServerStatusData->status['Bytes_received'], 3, 1 ) ); $retval .= ' | '; $retval .= ''; $retval .= implode( ' ', PMA_Util::formatByteDown( $ServerStatusData->status['Bytes_received'] * $hour_factor, 3, 1 ) ); $retval .= ' | '; $retval .= '
' . __('Sent') . ' | '; $retval .= ''; $retval .= implode( ' ', PMA_Util::formatByteDown( $ServerStatusData->status['Bytes_sent'], 3, 1 ) ); $retval .= ' | '; $retval .= ''; $retval .= implode( ' ', PMA_Util::formatByteDown( $ServerStatusData->status['Bytes_sent'] * $hour_factor, 3, 1 ) ); $retval .= ' | '; $retval .= '
' . __('Total') . ' | '; $retval .= ''; $bytes_received = $ServerStatusData->status['Bytes_received']; $bytes_sent = $ServerStatusData->status['Bytes_sent']; $retval .= implode( ' ', PMA_Util::formatByteDown( $bytes_received + $bytes_sent, 3, 1 ) ); $retval .= ' | '; $retval .= ''; $bytes_received = $ServerStatusData->status['Bytes_received']; $bytes_sent = $ServerStatusData->status['Bytes_sent']; $retval .= implode( ' ', PMA_Util::formatByteDown( ($bytes_received + $bytes_sent) * $hour_factor, 3, 1 ) ); $retval .= ' | '; $retval .= '
' . __('Connections') . ' | '; $retval .= 'ø ' . __('per hour') . ' | '; $retval .= '% | '; $retval .= '|
---|---|---|---|
' . __('max. concurrent connections') . ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Max_used_connections'], 0 ); $retval .= ' | '; $retval .= '--- | '; $retval .= '--- | '; $retval .= '
' . __('Failed attempts') . ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Aborted_connects'], 4, 1, true ); $retval .= ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Aborted_connects'] * $hour_factor, 4, 2, true ); $retval .= ' | '; $retval .= ''; if ($ServerStatusData->status['Connections'] > 0) { $abortNum = $ServerStatusData->status['Aborted_connects']; $connectNum = $ServerStatusData->status['Connections']; $retval .= PMA_Util::formatNumber( $abortNum * 100 / $connectNum, 0, 2, true ); $retval .= '%'; } else { $retval .= '--- '; } $retval .= ' | '; $retval .= '
' . __('Aborted') . ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Aborted_clients'], 4, 1, true ); $retval .= ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Aborted_clients'] * $hour_factor, 4, 2, true ); $retval .= ' | '; $retval .= ''; if ($ServerStatusData->status['Connections'] > 0) { $abortNum = $ServerStatusData->status['Aborted_clients']; $connectNum = $ServerStatusData->status['Connections']; $retval .= PMA_Util::formatNumber( $abortNum * 100 / $connectNum, 0, 2, true ); $retval .= '%'; } else { $retval .= '--- '; } $retval .= ' | '; $retval .= '
' . __('Total') . ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Connections'], 4, 0 ); $retval .= ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber( $ServerStatusData->status['Connections'] * $hour_factor, 4, 2 ); $retval .= ' | '; $retval .= ''; $retval .= PMA_Util::formatNumber(100, 0, 2); $retval .= '% | '; $retval .= '
' . __('Processes') . ' | '; foreach ($sortable_columns as $column) { $is_sorted = ! empty($_REQUEST['order_by_field']) && ! empty($_REQUEST['sort_order']) && ($_REQUEST['order_by_field'] == $column['order_by_field']); $column['sort_order'] = 'ASC'; if ($is_sorted && $_REQUEST['sort_order'] === 'ASC') { $column['sort_order'] = 'DESC'; } if ($is_sorted) { if ($_REQUEST['sort_order'] == 'ASC') { $asc_display_style = 'inline'; $desc_display_style = 'none'; } elseif ($_REQUEST['sort_order'] == 'DESC') { $desc_display_style = 'inline'; $asc_display_style = 'none'; } } $retval .= ''; $columnUrl = PMA_URL_getCommon($column); $retval .= ''; $retval .= ''; } $retval .= ''; if (! PMA_DRIZZLE && (0 === --$sortable_columns_count)) { $retval .= ''; if ($show_full_sql) { $retval .= PMA_Util::getImage( 's_partialtext.png', __('Truncate Shown Queries') ); } else { $retval .= PMA_Util::getImage( 's_fulltext.png', __('Show Full Queries') ); } $retval .= ''; } $retval .= ' | '; } $retval .= '
---|