Process Management
In this lesson, you will learn how to manage processes on a Linux server. You will learn tools like ps, top, and kill. We will use the nginx package as our example. To get started, go ahead and install the nginx package with the command below:
sudo apt install nginx
Understanding NGINX as a Process
When NGINX is running on your Ubuntu Server, it operates as a process. This process can be viewed, managed, and terminated if necessary, using Linux commands. Knowing how to view and kill processes is an extremely important skill that I want to make sure you understand - so we will cover that in this lesson.
The top utility
The top command in Linux is an incredibly useful tool for monitoring system performance and managing processes. It provides a real-time, dynamic view of your system's resource usage, including CPU, memory, and process information. In this lesson, we'll focus on some essential skills you should have when using top, with a special emphasis on searching for process names.
Opening top
To start top, simply type the following command in your terminal:
top
Navigating the top Interface
Once top is running, you'll see a display showing a list of the system's currently running processes, along with information about system resources. The top portion shows overall system statistics, while the bottom portion lists individual processes.
Sorting Processes
By default, top sorts processes based on CPU usage, but you can sort by other criteria (you must use shift to capitalize each of the letters below):
- Press
Mto sort by memory usage. - Press
Pto sort back by CPU usage. - Press
Tto sort by the time the processes have been running.
Searching for Process Names
One key skill in top is searching for specific processes by name. This is particularly useful when you're monitoring a specific application or service. To search for a proc…
No comments yet. Add the first comment to start the discussion.