Update perftool.php

This commit is contained in:
Namhyeon Go 2020-03-02 10:10:00 +09:00 committed by GitHub
parent dbf6f31e98
commit 8cb6cf52d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}
}
}