How to Manage Processes in Linux
No matter your Linux system, be it desktop or server, there will be quite a large number of processes running at any given time. Hopefully those processes are all running as expected. But if not, this article, written by Jack Wallen for TechRepublic Premium, has some tips to get your processes running smoothly again including how to list running processes, how to kill a running process and how to “nice” a process.
Featured text from the download:
HOW TO “NICE” A PROCESS
Another handy tool in your Linux toolkit is nice. Because Linux can run a vast amount of simultaneous processes, you can wind up with low priority processes slowing down higher priority processes. For example, say you have a server used for MySQL that also has a number of other services running. However, the most important service is the MySQL daemon. What you might want to do is give mysqld the highest priority and other processes a lower priority.
The priority of a process on a Linux system is called the “niceness,” and it is rated from 20 down to -20. What’s important to understand is that the lower the niceness value, the higher the priority (in other words, a process is “less nice,” so it’ll demand priority). If you give mysqld a lower niceness value it will have priority over other processes.
To start a process with a specific niceness, you’d issue a command like:
sudo nice -n VALUE PROCESS
Where VALUE is the nice value and PROCESS is the process name or ID.
Boost your Linux knowledge with our seven-page PDF guide. Previously priced at $49, this is now available for download at just $9. Alternatively, enjoy complimentary access with a Premium annual subscription. Click here to find out more.
TIME SAVED: Crafting this content required 14 hours of dedicated writing, editing and research.
Resource Details
* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.
* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.