From a1c5652369e4757e78faa5e3733b65a4b517bd7e Mon Sep 17 00:00:00 2001 From: Kairee Wu Date: Wed, 1 Feb 2023 13:33:57 +0800 Subject: [PATCH] docs: add guide for cpu keeper --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f3c8ea..010dbc4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ # debian -Debian init scripts \ No newline at end of file +Debian init scripts + +### CPU 占用率保持工具使用说明: + +1. 将对应架构(amd64、arm64)的文件拷贝到需要的目录; +2. 启动 screen 或者 tmux 进程 +3. 执行 `./cpulimit -l 20 -i ./keeper` + - `-l 20`: 想要限制的占用率 + - `-i`: 限制对子进程也生效 + +例如: + +```bash +$ git clone https://git.ofcss.com/kairee/debian.git +$ mv debian/bin/amd64 /usr/local/keeper +$ screen -S cpukeeper +$ cd /usr/local/keeper +$ ./cpulimit -l 19 -i ./keeper +``` + +另外启动一个窗口,用 top 或者 htop(推荐)查看 CPU 占用率