我正在尝试使用cpulimit
命令,例如:
cpulimit -e 'tar -chzf [...]' -l 50
但 cpulimit 似乎无法启动该进程:
Warning: no target process found. Waiting for it...
那么我如何调用 cpulimit 来启动tar
它的所有输入参数?
答案1
尝试:
cpulimit -l 50 -- tar -chzf ...
从示例中man cpulimit
:
# cpulimit -l 20 firefox
Launch Firefox web browser and limit its CPU usage to 20%
# cpulimit -l 25 -- firefox -private
Launch Firefox web browser in private mode and limit its CPU usage to 25%