Saturday, 23 August 2008

How to View and Limit Process CPU usage in Ubuntu Linux

For ubuntu users, we may want to get the process informations and limit the CPU usage of a process whenever we want.
Launch System Monitor from System->Administration->System Monitor.At Processes tab,you can see all processes and details.
process
You can also use this command to view processes details:
top
or
ps aux
And if you want to limit cpu usage of a process,first install cpulimit with this command:
sudo aptitude install cpulimit
Then,limit the process in following ways:
limit the process with its name to 35%:
cpulimit -e process_name -l 35
limit the process with its ID to 35%:
cpulimit -p ID_here -l 35

No comments:

Post a Comment