Exemplo n.º 1
0
p('<table>');
$print_header = 1;
while ($rec = oci_fetch_object($cur)) {
    #
    # Display column headers
    #
    if ($print_header) {
        p('<tr>');
        foreach ($rec as $key => $val) {
            td($key);
        }
        p('</tr>');
        $print_header = 0;
    }
    if (@$_GET['all_secs']) {
        u::fill_in_missing_snaps($last_snap_time, $rec->HOUR_MIN_SEC);
        $last_snap_time = $rec->HOUR_MIN_SEC;
    }
    #
    # Row data
    #
    p('<tr>');
    foreach ($rec as $key => $val) {
        if ($key === 'SQL_ID') {
            td(sql_details_link($val, $db));
        } else {
            if ($key === 'CURRENT_OBJ#' and $val > 0) {
                td("<a href=./obj_details.php?db={$db}&obj_id={$val}>{$val}</a>");
            } else {
                if ($key === 'BLOCKING_SESSION' and $val) {
                    td("<a href=./session_drilldown.php?db={$db}&sid={$val}&snaps_table={$snaps_table}>{$val}</a>");
Exemplo n.º 2
0
u::start_tag('div', "onscroll=\"toggle_button('Stop');\" class=\"graph\" style=\"top:{$chart_top};left:{$chart_left_pos}\" id=\"active_sessions_graph\"");
if ($display_max_cpu) {
    #
    # Max CPU info
    #
    u::tagged_item('div', 'Max CPU', 'class="max_cpu"', 1);
}
#
# Move pos for next chart
#
$chart_top = $chart_top + $chart_height + 10;
$graph_heights = array();
$max_height_cells = 0;
while ($rec = oci_fetch_object($cur)) {
    $col++;
    u::fill_in_missing_snaps($last_snap_time, $rec->S_TIME, $col);
    $times = explode(':', $rec->S_TIME);
    $secs = $times[0] * 60 * 60 + $times[1] * 60 + $times[2];
    #
    # Date time in the graph, if needed
    #
    u::time_marker($secs, $col);
    $last_snap_time = $rec->S_TIME;
    #
    # Time markers take up first row
    #
    $current_row = 2;
    cells($rec->SIDS_ON_CPU, $db, $col, $current_row, 'on_cpu', $snaps_table, $last_snap_time);
    cells($rec->SIDS_USER_IO, $db, $col, $current_row, 'userio', $snaps_table, $last_snap_time);
    cells($rec->SIDS_SYSTEM_IO, $db, $col, $current_row, 'sys_io', $snaps_table, $last_snap_time);
    cells($rec->SIDS_BLOCKED, $db, $col, $current_row, 'locked', $snaps_table, $last_snap_time);