Skip to content

Commit

Permalink
Fix load avg having too many numbers of decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
xVANKO authored and gwanglst committed Jun 24, 2022
1 parent 5369288 commit 2cd3856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/admin/html.open/view/ajax_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
function ajax_pid_load()
{
$data = array( 'pid' => Service::ServiceData(SInfo::DATA_PID),
'serverload' => implode(', ', sys_getloadavg()) ) ;
'serverload' => implode(', ', array_map(function($load) { return round($load, 5); }, \sys_getloadavg())) ) ;
echo json_encode($data) ;
}

Expand Down

0 comments on commit 2cd3856

Please sign in to comment.