commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This will limit the average amount of CPU it consumes.
There are 6 alternatives - vote for the best!
Similar to `cpulimit`, although `prlimit` can be found shipped with recent util-linux.
Example: limit CPU consumption to 10% for a math problem which ordinarily takes up 100% CPU:
bc -l <(echo "1234123412341234^12341234")
See the difference `prlimit` makes:
prlimit --cpu=10 bc -l <(echo "1234123412341234^12341234")
To actually monitor the CPU usage, use `top`, `sar`, etc.. or:
pidstat -C 'bc' -hur -p ALL 1
Will limit the amount of CPU time Grooveshark the greedy yet useful Adobe Air app will have.
Leaves the UI lagging a little, but crucially does not ruin the audio.
If you can do better, submit your command here.
You must be signed in to comment.