We can view the cpu being consumed by a process. But how to control it?
Here comes a very simple fun tool - cpulimit
Feel free to download it from http://cpulimit.sourceforge.net/
Those using ubuntu can download it by this simple command.
- Code: Select all
sudo apt-get install cpulimit
Now the best thing about cpulimit is that it attempts to limit the cpu usage of a process. Limits are expressed in percentage and not in cpu time. cpulimit does not act on the nice value or other scheduling priority stuff, but on the real cpu usage.
Example #1 - To limit the cpu usage of a process evolution under 20%.
- Code: Select all
sudo cpulimit -e evolution -l 20
Example #2. You can also use the pid of the process for the same job.
- Code: Select all
sudo cpulimit -p 8888 -l 20
Here is the screenshot from my machine.. enjoy !!
You can view this post and many other interesting posts on our blog - http://www.networknuts.wordpress.com
