Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php ffi get load average


Use this:
<?php
$loads=sys_getloadavg();
$core_nums=trim(shell_exec("grep -P '^physical id' /proc/cpuinfo|wc -l"));
$load=$loads[0]/$core_nums;
echo $load;
?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #ffi #load #average
ADD COMMENT
Topic
Name
8+1 =