From e8882b55734e11774beb95eeb81bfd55fca761a2 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 2 Jun 2019 14:27:24 +0100 Subject: [PATCH] cpulimit: add page (#3067) --- pages/linux/cpulimit.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/linux/cpulimit.md diff --git a/pages/linux/cpulimit.md b/pages/linux/cpulimit.md new file mode 100644 index 000000000..2396a5e09 --- /dev/null +++ b/pages/linux/cpulimit.md @@ -0,0 +1,28 @@ +# cpulimit + +> A tool to throttle the CPU usage of other processes. +> More information: . + +- Limit an existing process with PID 1234 to only use 25% of the CPU: + +`cpulimit --pid {{1234}} --limit {{25%}}` + +- Limit an existing program by its executable name: + +`cpulimit --exe {{program}} --limit {{25}}` + +- Launch a given program and limit it to only use 50% of the CPU: + +`cpulimit --limit {{50}} {{program}}` + +- Launch a program, limit its CPU usage to 50% and run cpulimit in the background: + +`cpulimit --limit {{50}} --background {{program}}` + +- Kill its process if the program's CPU usage goes over 50%: + +`cpulimit --limit 50 --kill {{program}}` + +- Throttle both it and its child processes so that none go about 25% CPU: + +`cpulimit --limit {{25}} --monitor-forks {{program}}`