McPulimit
用于多个过程的cpulimit(限制所有过程,而不仅仅是第一个)
2
Github Watches
7
Github Forks
9
Github Stars
mcpulimit
cpulimit-like program for more than process.
Use case
I have a program with starts several child processes (GraphicsMagic), which each starts GhostScript subprocess, which eats cpu and together overheats my tiny laptop, which reboots.
Usage
mcpulimit [OPTIONS] [executable names]
-l=50: the percent (between 1 and 100) to limit the processes CPU usage to
-t=0: timeout (seconds) to exit after if there is no suitable target process (lazy mode)
The executable must be full paths if the executable is not found in PATH.
mcpulimit sends SIGSTOP and SIGCONT signals to the processes, thus you
need to have permission for this - but practically if mcpulimit runs as the
same user as the processes to be limited, no problems araise.
Installation
go install github.com/tgulacsi/mcpulimit
Requirements
Go compiler and an operating system with /proc filesystem, and SIGSTOP and SIGCONT signals.
相关推荐
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Take an adjectivised noun, and create images making it progressively more adjective!
Reviews
user_K8nfbN8B
I have been using mcpulimit by tgulacsi and it's been a game-changer for managing CPU usage on my system! The tool is easy to implement and incredibly efficient in preventing any process from hogging too much CPU. If you need a reliable way to limit CPU for tasks, I highly recommend checking it out at https://github.com/tgulacsi/mcpulimit.