Update perftool.php

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

View File

@ -61,9 +61,8 @@ 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, LIMIT)=(%s, %s)", $pid, ($ratio * $num_cores) * 100), "helper/perftool");
write_common_log(sprintf("Limited CPU usage (%s, %s)<=(PID, LIMIT)", $pid, ($ratio * $num_cores) * 100), "helper/perftool");
exec_command(sprintf("cpulimit --pid %s --limit %s", $pid, ($ratio * $num_cores) * 100));
}
}
}