本文整理汇总了PHP中format_si函数的典型用法代码示例。如果您正苦于以下问题:PHP format_si函数的具体用法?PHP format_si怎么用?PHP format_si使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了format_si函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbFetchRow
$check = dbFetchRow("SELECT * FROM `bill_history` WHERE bill_id = ? AND bill_datefrom = ? AND bill_dateto = ? LIMIT 1", array($bill['bill_id'], $datefrom, $dateto));
$period = getPeriod($bill['bill_id'], $datefrom, $dateto);
$date_updated = str_replace("-", "", str_replace(":", "", str_replace(" ", "", $check['updated'])));
if ($period > 0 && $dateto > $date_updated) {
$rate_data = getRates($bill['bill_id'], $datefrom, $dateto);
#print_vars($rate_data);
# $rate_95th = $rate_data['rate_95th'];
# $dir_95th = $rate_data['dir_95th'];
# $total_data = $rate_data['total_data'];
# $rate_average = $rate_data['rate_average'];
if ($bill['bill_type'] == "cdr") {
$type = "CDR";
$allowed = $bill['bill_cdr'];
$used = $rate_data['rate_95th'];
$allowed_text = format_si($allowed) . "bps";
$used_text = format_si($used) . "bps";
$overuse = $used - $allowed;
$overuse = $overuse <= 0 ? "0" : $overuse;
$percent = round($rate_data['rate_95th'] / $bill['bill_cdr'] * 100, 2);
} elseif ($bill['bill_type'] == "quota") {
$type = "Quota";
$allowed = $bill['bill_quota'];
$used = $rate_data['total_data'];
$allowed_text = format_bytes_billing($allowed);
$used_text = format_bytes_billing($used);
$overuse = $used - $allowed;
$overuse = $overuse <= 0 ? "0" : $overuse;
$percent = round($rate_data['total_data'] / $bill['bill_quota'] * 100, 2);
}
echo strftime("%x @ %X", strtotime($datefrom)) . " to " . strftime("%x @ %X", strtotime($dateto)) . " " . str_pad($type, 8) . " " . str_pad($allowed_text, 10) . " " . str_pad($used_text, 10) . " " . $percent . "%";
if ($i == '0') {
示例2: overlib
$afi = $afisafi['afi'];
$safi = $afisafi['safi'];
$this_afisafi = $afi . $safi;
$peer['afi'] .= $sep . $afi . "." . $safi;
$sep = "<br />";
$peer['afisafi'][$this_afisafi] = 1;
// Build a list of valid AFI/SAFI for this peer
}
$graph_type = "bgp_updates";
$peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=" . $config['time']['day'] . "&to=" . $config['time']['now'] . "&width=500&height=150";
$peeraddresslink = "<span class=entity-title><a onmouseover=\"return overlib('<img src=\\'{$peer_daily_url}\\'>', LEFT" . $config['overlib_defaults'] . ");\" onmouseout=\"return nd();\">" . $peer['human_remoteip'] . "</a></span>";
echo '<tr class="' . $peer['html_row_class'] . '">';
echo '
<td style="width: 1px; background-color: ' . $peer['table_tab_colour'] . '; margin: 0px; padding: 0px"></td>
<td style="width: 1px;"></td>';
echo " <td>" . $peeraddresslink . "<br />" . $peername . "</td>\n <td><strong>" . $peer['peer_type'] . "</strong></td>\n <td style='font-size: 10px; font-weight: bold; line-height: 10px;'>" . (isset($peer['afi']) ? $peer['afi'] : '') . "</td>\n <td><strong>AS" . $peer['bgpPeerRemoteAs'] . "</strong><br />" . $peer['astext'] . "</td>\n <td><strong><span class='" . $peer['admin_class'] . "'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span class='" . $peer['state_class'] . "'>" . $peer['bgpPeerState'] . "</span></strong></td>\n <td>" . formatUptime($peer['bgpPeerFsmEstablishedTime']) . "<br />\n Updates <i class='oicon-arrow_down'></i> " . format_si($peer['bgpPeerInUpdates']) . "\n <i class='oicon-arrow_up'></i> " . format_si($peer['bgpPeerOutUpdates']) . "</td>\n </tr>";
unset($invalid);
switch ($vars['view']) {
case 'prefixes_ipv4unicast':
case 'prefixes_ipv4multicast':
case 'prefixes_vpnv4unicast':
case 'prefixes_ipv6unicast':
case 'prefixes_ipv6multicast':
list(, $afisafi) = explode("_", $vars['view']);
if (isset($peer['afisafi'][$afisafi])) {
$peer['graph'] = 1;
}
// FIXME no break??
// FIXME no break??
case 'updates':
$graph_array['type'] = "bgp_" . $vars['view'];
示例3: foreach
foreach (dbFetchRows('SELECT * FROM `bgpPeers_cbgp` WHERE `device_id` = ? AND bgpPeerIdentifier = ?', array($peer['device_id'], $peer['bgpPeerIdentifier'])) as $afisafi) {
$afi = $afisafi['afi'];
$safi = $afisafi['safi'];
$this_afisafi = $afi . $safi;
$peer['afi'] .= $sep . $afi . '.' . $safi;
$sep = '<br />';
$peer['afisafi'][$this_afisafi] = 1;
// Build a list of valid AFI/SAFI for this peer
}
unset($sep);
echo ' <td></td>
<td width=150>' . $localaddresslink . '<br />' . generate_device_link($peer, shorthost($peer['hostname']), array('tab' => 'routing', 'proto' => 'bgp')) . '</td>
<td width=30><b>»</b></td>
<td width=150>' . $peeraddresslink . "</td>\n <td width=50><b>{$peer_type}</b></td>\n <td width=50>" . $peer['afi'] . '</td>
<td><strong>AS' . $peer['bgpPeerRemoteAs'] . '</strong><br />' . $peer['astext'] . "</td>\n <td><strong><span style='color: {$admin_col};'>" . $peer['bgpPeerAdminStatus'] . "</span><br /><span style='color: {$col};'>" . $peer['bgpPeerState'] . '</span></strong></td>
<td>' . formatUptime($peer['bgpPeerFsmEstablishedTime']) . "<br />\n Updates <img src='images/16/arrow_down.png' align=absmiddle /> " . format_si($peer['bgpPeerInUpdates']) . "\n <img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . '</td></tr>';
unset($invalid);
switch ($vars['graph']) {
case 'prefixes_ipv4unicast':
case 'prefixes_ipv4multicast':
case 'prefixes_ipv4vpn':
case 'prefixes_ipv6unicast':
case 'prefixes_ipv6multicast':
list(, $afisafi) = explode('_', $vars['graph']);
if (isset($peer['afisafi'][$afisafi])) {
$peer['graph'] = 1;
}
case 'updates':
$graph_array['type'] = 'bgp_' . $vars['graph'];
$graph_array['id'] = $peer['bgpPeer_id'];
}
示例4: testFormatSi
/**
* @dataProvider providerFormatSi
*/
public function testFormatSi($value, $round, $sf, $result)
{
$this->assertSame($result, format_si($value, $round, $sf));
}
示例5: dbFetchRow
$dateto = $day_data['1'];
$check = dbFetchRow('SELECT * FROM `bill_history` WHERE bill_id = ? AND bill_datefrom = ? AND bill_dateto = ? LIMIT 1', array($bill['bill_id'], $datefrom, $dateto));
$period = getPeriod($bill['bill_id'], $datefrom, $dateto);
$date_updated = str_replace('-', '', str_replace(':', '', str_replace(' ', '', $check['updated'])));
if ($period > 0 && $dateto > $date_updated) {
$rate_data = getRates($bill['bill_id'], $datefrom, $dateto);
$rate_95th = $rate_data['rate_95th'];
$dir_95th = $rate_data['dir_95th'];
$total_data = $rate_data['total_data'];
$rate_average = $rate_data['rate_average'];
if ($bill['bill_type'] == 'cdr') {
$type = 'CDR';
$allowed = $bill['bill_cdr'];
$used = $rate_data['rate_95th'];
$allowed_text = format_si($allowed) . 'bps';
$used_text = format_si($used) . 'bps';
$overuse = $used - $allowed;
$overuse = $overuse <= 0 ? '0' : $overuse;
$percent = round($rate_data['rate_95th'] / $bill['bill_cdr'] * 100, 2);
} else {
if ($bill['bill_type'] == 'quota') {
$type = 'Quota';
$allowed = $bill['bill_quota'];
$used = $rate_data['total_data'];
$allowed_text = format_bytes_billing($allowed);
$used_text = format_bytes_billing($used);
$overuse = $used - $allowed;
$overuse = $overuse <= 0 ? '0' : $overuse;
$percent = round($rate_data['total_data'] / $bill['bill_quota'] * 100, 2);
}
}
示例6: generate_url
if (is_integer($i / 2)) {
$bg_colour = $list_colour_a;
} else {
$bg_colour = $list_colour_b;
}
if ($vsvr['vsvr_state'] == 'up') {
$vsvr_class = 'green';
} else {
$vsvr_class = 'red';
}
echo "<tr bgcolor='{$bg_colour}'>";
echo '<td width=320 class=list-large><a href="' . generate_url($vars, array('vsvr' => $vsvr['vsvr_id'], 'view' => null, 'graph' => null)) . '">' . $vsvr['vsvr_name'] . '</a></td>';
echo '<td width=320 class=list-small>' . $vsvr['vsvr_ip'] . ':' . $vsvr['vsvr_port'] . '</a></td>';
echo "<td width=100 class=list-small><span class='" . $vsvr_class . "'>" . $vsvr['vsvr_state'] . '</span></td>';
echo '<td width=320 class=list-small>' . format_si($vsvr['vsvr_bps_in'] * 8) . 'bps</a></td>';
echo '<td width=320 class=list-small>' . format_si($vsvr['vsvr_bps_out'] * 8) . 'bps</a></td>';
echo '</tr>';
if ($vars['view'] == 'graphs') {
echo '<tr class="list-bold" bgcolor="' . $bg_colour . '">';
echo '<td colspan="5">';
$graph_type = 'netscalervsvr_' . $vars['graph'];
$graph_array['height'] = '100';
$graph_array['width'] = '213';
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $vsvr['vsvr_id'];
$graph_array['type'] = $graph_type;
include 'includes/print-graphrow.inc.php';
echo '
</td>
</tr>';
}
示例7: file_put_contents
if ($config['debug_port'][$port['port_id']]) {
$port_debug = $port['port_id'] . '|' . $polled . '|' . $polled_period . '|' . $this_port['ifHCInOctets'] . '|' . $this_port['ifHCOutOctets'];
$port_debug .= '|' . $port['stats']['ifInOctets_rate'] . '|' . $port['stats']['ifOutOctets_rate'] . "\n";
file_put_contents('/tmp/port_debug.txt', $port_debug, FILE_APPEND);
echo 'Wrote port debugging data';
}
$port['stats']['ifInBits_rate'] = round($port['stats']['ifInOctets_rate'] * 8);
$port['stats']['ifOutBits_rate'] = round($port['stats']['ifOutOctets_rate'] * 8);
// If we have a valid ifSpeed we should populate the stats for checking.
if (is_numeric($this_port['ifSpeed'])) {
$port['stats']['ifInBits_perc'] = round($port['stats']['ifInBits_rate'] / $this_port['ifSpeed'] * 100);
$port['stats']['ifOutBits_perc'] = round($port['stats']['ifOutBits_rate'] / $this_port['ifSpeed'] * 100);
}
echo 'bps(' . formatRates($port['stats']['ifInBits_rate']) . '/' . formatRates($port['stats']['ifOutBits_rate']) . ')';
echo 'bytes(' . formatStorage($port['stats']['ifInOctets_diff']) . '/' . formatStorage($port['stats']['ifOutOctets_diff']) . ')';
echo 'pkts(' . format_si($port['stats']['ifInUcastPkts_rate']) . 'pps/' . format_si($port['stats']['ifOutUcastPkts_rate']) . 'pps)';
// Port utilisation % threshold alerting. // FIXME allow setting threshold per-port. probably 90% of ports we don't care about.
if ($config['alerts']['port_util_alert'] && $port['ignore'] == '0') {
// Check for port saturation of $config['alerts']['port_util_perc'] or higher. Alert if we see this.
// Check both inbound and outbound rates
$saturation_threshold = $this_port['ifSpeed'] * ($config['alerts']['port_util_perc'] / 100);
echo 'IN: ' . $port['stats']['ifInBits_rate'] . ' OUT: ' . $port['stats']['ifOutBits_rate'] . ' THRESH: ' . $saturation_threshold;
if (($port['stats']['ifInBits_rate'] >= $saturation_threshold || $port['stats']['ifOutBits_rate'] >= $saturation_threshold) && $saturation_threshold > 0) {
log_event('Port reached saturation threshold: ' . formatRates($port['stats']['ifInBits_rate']) . '/' . formatRates($port['stats']['ifOutBits_rate']) . ' - ifspeed: ' . formatRates($this_port['stats']['ifSpeed']), $device, 'interface', $port['port_id']);
}
}
// Update RRDs
$rrdfile = $host_rrd . '/port-' . safename($port['ifIndex'] . '.rrd');
if (!is_file($rrdfile)) {
rrdtool_create($rrdfile, ' --step 300
DS:INOCTETS:DERIVE:600:0:12500000000
示例8: foreach
<?php
echo '<table cellspacing="0" cellpadding="5" width="100%">';
$i = 0;
foreach (dbFetchRows('SELECT * FROM `packages` WHERE `device_id` = ? ORDER BY `name`', array($device['device_id'])) as $entry) {
echo '<tr class="list">';
echo '<td width=200><a href="' . generate_url($vars, array('name' => $entry['name'])) . '">' . $entry['name'] . '</a></td>';
if ($build != '') {
$dbuild = '-' . $entry['build'];
} else {
$dbuild = '';
}
echo '<td>' . $entry['version'] . $dbuild . '</td>';
echo '<td>' . $entry['arch'] . '</td>';
echo '<td>' . $entry['manager'] . '</td>';
echo '<td>' . format_si($entry['size']) . '</td>';
echo '</tr>';
$i++;
}
echo '</table>';
示例9: array
$classes = array('primary', 'success', 'danger');
$legend = '<table class="table table-condensed-more">';
$i = 0;
foreach ($totals_array as $type => $dir) {
// derp we actually need whole #s here for the graph. muiltiply by 100, yo!
$percentIn = $dir["in"] / $totalIn * 100;
$percentOut = $dir["out"] / $totalOut * 100;
$percent = ($dir["in"] + $dir["out"]) / ($totalIn + $totalOut) * 100;
$color = $config['graph_colours']['mixed'][$i];
$class = $classes[$i];
$bars_in .= ' <div class="progress-bar progress-bar-' . $class . '" style="width: ' . $percentIn . '%"><span class="sr-only">' . round($percentIn) . '%' . '</span></div>';
$bars_out .= ' <div class="progress-bar progress-bar-' . $class . '" style="width: ' . $percentOut . '%"><span class="sr-only">' . round($percentOut) . '%' . '</span></div>';
$bars .= ' <div class="progress-bar progress-bar-' . $class . '" style="width: ' . $percent . '%"><span class="sr-only">' . round($percent) . '%' . '</span></div>';
$i++;
$legend .= '<tr><td><span class="label label-' . $class . '">' . $type . '</span></td><td><i class="icon-circle-arrow-down green"></i> <small><b>' . format_si($dir['in']) . 'bps</b></small></td>
<td><i class="icon-circle-arrow-up" style="color: #323b7c;"></i> <small><b>' . format_si($dir['out']) . 'bps</b></small></td>
</tr>';
}
$legend .= '</table>';
?>
<table class="table table-condensed">
<tr>
<td rowspan="3" width="220"><?php
echo $legend;
?>
</td>
<th width="40"><span class="label label-success"><i class="icon-circle-arrow-up"></i> In</span></th>
<td>
<div class="progress" style="margin-bottom: 0;">
<?php
示例10: format_si
break;
default:
echo $cef['cef_path'];
}
echo '</td>';
echo '<td>' . format_si($cef['drop']);
if ($cef['drop'] > $cef['drop_prev']) {
echo " <span style='color:red;'>(" . round(($cef['drop'] - $cef['drop_prev']) / $interval, 2) . '/sec)</span>';
}
echo '</td>';
echo '<td>' . format_si($cef['punt']);
if ($cef['punt'] > $cef['punt_prev']) {
echo " <span style='color:red;'>(" . round(($cef['punt'] - $cef['punt_prev']) / $interval, 2) . '/sec)</span>';
}
echo '</td>';
echo '<td>' . format_si($cef['punt2host']);
if ($cef['punt2host'] > $cef['punt2host_prev']) {
echo " <span style='color:red;'>(" . round(($cef['punt2host'] - $cef['punt2host_prev']) / $interval, 2) . '/sec)</span>';
}
echo '</td>';
echo '</tr>
';
if ($vars['view'] == 'graphs') {
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $cef['cef_switching_id'];
$graph_array['type'] = 'cefswitching_graph';
echo "<tr bgcolor='{$bg_colour}'><td colspan=6>";
include 'includes/print-graphrow.inc.php';
echo '</td></tr>';
示例11: format_si
break;
default:
echo $cef['cef_path'];
}
echo "</td>";
echo "<td>" . format_si($cef['drop']);
if ($cef['drop'] > $cef['drop_prev']) {
echo " <span style='color:red;'>(" . round(($cef['drop'] - $cef['drop_prev']) / $interval, 2) . "/sec)</span>";
}
echo "</td>";
echo "<td>" . format_si($cef['punt']);
if ($cef['punt'] > $cef['punt_prev']) {
echo " <span style='color:red;'>(" . round(($cef['punt'] - $cef['punt_prev']) / $interval, 2) . "/sec)</span>";
}
echo "</td>";
echo "<td>" . format_si($cef['punt2host']);
if ($cef['punt2host'] > $cef['punt2host_prev']) {
echo " <span style='color:red;'>(" . round(($cef['punt2host'] - $cef['punt2host_prev']) / $interval, 2) . "/sec)</span>";
}
echo "</td>";
echo "</tr>\n ";
if ($vars['view'] == "graphs") {
$graph_array['height'] = "100";
$graph_array['width'] = "215";
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $cef['cef_switching_id'];
$graph_array['type'] = "cefswitching_graph";
echo "<tr bgcolor='{$bg_colour}'><td colspan=6>";
print_graph_row($graph_array);
echo "</td></tr>";
}
示例12: generate_url
if (is_integer($i / 2)) {
$bg_colour = $list_colour_a;
} else {
$bg_colour = $list_colour_b;
}
if ($vsvr['vsvr_state'] == "up") {
$vsvr_class = "green";
} else {
$vsvr_class = "red";
}
echo "<tr bgcolor='{$bg_colour}'>";
echo '<td width=320 class=list-large><a href="' . generate_url($vars, array('vsvr' => $vsvr['vsvr_id'], 'view' => NULL, 'graph' => NULL)) . '">' . $vsvr['vsvr_name'] . '</a></td>';
echo "<td width=320 class=list-small>" . $vsvr['vsvr_ip'] . ":" . $vsvr['vsvr_port'] . "</a></td>";
echo "<td width=100 class=list-small><span class='" . $vsvr_class . "'>" . $vsvr['vsvr_state'] . "</span></td>";
echo "<td width=320 class=list-small>" . format_si($vsvr['vsvr_bps_in'] * 8) . "bps</a></td>";
echo "<td width=320 class=list-small>" . format_si($vsvr['vsvr_bps_out'] * 8) . "bps</a></td>";
echo "</tr>";
if ($vars['view'] == "graphs") {
echo '<tr class="list-bold" bgcolor="' . $bg_colour . '">';
echo '<td colspan="5">';
$graph_type = "netscalervsvr_" . $vars['graph'];
$graph_array['height'] = "100";
$graph_array['width'] = "213";
$graph_array['to'] = $config['time']['now'];
$graph_array['id'] = $vsvr['vsvr_id'];
$graph_array['type'] = $graph_type;
include "includes/print-graphrow.inc.php";
echo "\n </td>\n </tr>";
}
echo "</td>";
echo "</tr>";
示例13: foreach
<?php
/**
* Observium Network Management and Monitoring System
* Copyright (C) 2006-2014, Adam Armstrong - http://www.observium.org
*
* @package observium
* @subpackage webui
* @author Adam Armstrong <adama@memetic.org>
* @copyright (C) 2006-2014 Adam Armstrong
*
*/
echo '<table class="table table-striped-two table-condensed table-bordered">';
echo "<thead><tr>\n <th>内存池</th>\n <th>MIB</th>\n <th>值</th>\n <th>上限</th>\n <th>下限</th>\n </tr></thead>";
$row = 1;
$sql = "SELECT *, `sensors`.`sensor_id` AS `sensor_id`";
$sql .= " FROM `sensors`";
$sql .= " LEFT JOIN `sensors-state` ON `sensors`.sensor_id = `sensors-state`.sensor_id";
$sql .= " WHERE `sensor_class` = ? AND `device_id` = ?";
foreach (dbFetchRows($sql, array($vars['metric'], $device['device_id'])) as $sensor) {
$graph_array['id'] = $sensor['sensor_id'];
$graph_array['type'] = 'sensor_' . $vars['metric'];
$sensor_url = "graphs/id=" . $sensor['sensor_id'] . "/type=" . $graph_array['type'];
echo "<tr>\n <td width=500 class='entity-title'><a class='entity-title' href='" . $sensor_url . "'>" . $sensor['sensor_descr'] . "</a></td>\n <td>" . nicecase($sensor['sensor_type']) . "</td>\n <td width=75>" . format_si($sensor['sensor_value']) . $config['sensor_types'][$vars['metric']]['symbol'] . "</td>\n <td width=75>" . format_si($sensor['sensor_limit']) . $config['sensor_types'][$vars['metric']]['symbol'] . "</td>\n <td width=75>" . format_si($sensor['sensor_limit_low']) . $config['sensor_types'][$vars['metric']]['symbol'] . "</td>\n </tr>\n";
echo "<tr><td colspan='5'>";
print_graph_row($graph_array);
echo "</td></tr>";
$row++;
}
echo "</table>";
// EOF
示例14: format_si
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2014 Adam Armstrong
*
*/
$defs = ' DEF:in_octets=' . $rrd_filename . ':INOCTETS:AVERAGE';
$defs .= ' DEF:out_octets=' . $rrd_filename . ':OUTOCTETS:AVERAGE';
$defs .= ' CDEF:in_bits=in_octets,8,*';
$defs .= ' CDEF:out_bits=out_octets,8,*';
$defs .= ' CDEF:in=in_bits,' . $port['ifSpeed'] . ',/,100,*';
$defs .= ' CDEF:out=out_bits,' . $port['ifSpeed'] . ',/,100,*';
$defs .= ' CDEF:in_max=in';
$defs .= ' CDEF:out_max=out';
$defs .= ' HRULE:100#555::';
$defs .= ' HRULE:-100#555::';
$colour_area_out = '3E629F';
$colour_line_out = '070A64';
$colour_area_in = '72B240';
$colour_line_in = '285B00';
#$colour_area_in_max = 'cc88cc';
#$colour_area_out_max = 'FFefaa';
$graph_max = 0;
$scale_min = '-100';
$scale_max = '100';
$unit_text = '% of ' . format_si($port['ifSpeed']) . 'b';
$args['nototal'] = 1;
$print_total = 0;
$nototal = 1;
include 'includes/graphs/generic_duplex.inc.php';
// EOF
示例15: generate_url
if ('`' . $lhead . '`' == $order) {
$icon = " class='fa fa-chevron-";
if ($by == 'asc') {
$bhead = 'desc';
$icon .= 'up';
} else {
$icon .= 'down';
}
$icon .= "'";
}
echo '<th><a href="' . generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'processes', 'order' => $lhead, 'by' => $bhead)) . '"><span' . $icon . '> ';
if (!empty($extra)) {
echo "<abbr title='{$extra}'>{$head}</abbr>";
} else {
echo $head;
}
echo '</span></a></th>';
}
//end foreach
echo '</tr></thead><tbody>';
foreach (dbFetchRows('SELECT * FROM `processes` WHERE `device_id` = ? ORDER BY ' . $order . ' ' . $by, array($device['device_id'])) as $entry) {
echo '<tr>';
echo '<td>' . $entry['pid'] . '</td>';
echo '<td>' . format_si($entry['vsz'] * 1024) . '</td>';
echo '<td>' . format_si($entry['rss'] * 1024) . '</td>';
echo '<td>' . $entry['cputime'] . '</td>';
echo '<td>' . $entry['user'] . '</td>';
echo '<td>' . $entry['command'] . '</td>';
echo '</tr>';
}
echo '</tbody></table></div>';