Update perftool.php
This commit is contained in:
parent
dbf6f31e98
commit
8cb6cf52d5
|
@ -61,8 +61,9 @@ if(!is_fn("set_cpu_usage_limit")) {
|
|||
$pid = get_shared_var("mypid");
|
||||
|
||||
if(!empty($pid) && loadHelper("exectool")) {
|
||||
write_common_log(sprintf("CPU usage limit setted. PID=%s, LIMIT=%s", $pid, ($ratio * $num_cores) * 100), "helper/perftool");
|
||||
write_common_log(sprintf("CPU usage limit setted. (PID, LIMIT)=(%s, %s)", $pid, ($ratio * $num_cores) * 100), "helper/perftool");
|
||||
exec_command(sprintf("cpulimit --pid %s --limit %s", $pid, ($ratio * $num_cores) * 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user