Пример #1
0
function get_stats()
{
    $stats['cpu'] = cpu_usage();
    $stats['mem'] = mem_usage();
    $stats['uptime'] = get_uptime();
    $stats['states'] = get_pfstate();
    $stats['temp'] = get_temp();
    $stats['datetime'] = update_date_time();
    $stats['interfacestatistics'] = get_interfacestats();
    $stats['interfacestatus'] = get_interfacestatus();
    $stats['cpufreq'] = get_cpufreq();
    $stats['load_average'] = get_load_average();
    $stats['mbuf'] = get_mbuf();
    $stats['mbufpercent'] = get_mbuf(true);
    $stats['statepercent'] = get_pfstate(true);
    $stats = join("|", $stats);
    return $stats;
}
			</td>
		</tr>
		<?php 
}
?>
		<tr>
			<th><?php 
echo gettext("Load average");
?>
</th>
			<td>
				<div id="load_average" title="<?php 
echo gettext('Last 1, 5 and 15 minutes');
?>
"><?php 
echo get_load_average();
?>
</div>
			</td>
		</tr>
		<tr>
			<th><?php 
echo gettext("CPU usage");
?>
</th>
			<td>
				<div class="progress">
					<div id="cpuPB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
					</div>
				</div>
				<span id="cpumeter"><?php