How to List Running Processes in Linux?

Posted by Sakshita

List Running Processes in Linux

In the web hosting industry it is very common to use Shared Hosting services. Shared Hosting is a type of web hosting where multiple users share their resources within a single server.
May be you are also using the same. Have you ever get an update regarding maximum consumption of resources or you have fully consumed your resources? If yes, then this article will really help you to know how can you manage it.
To make you understand the topic more I would like to explain it with an example. Suppose you open a chrome to open your website and in another tab you have log in your cPanel account and then managing files in another tab. So every time you open a new tab a process is being done. 
Running Processes are basically the processes that are used to analyze the consumption of resources in a server. Even if you are not using shared hosting services then also you must track the consumption of your resources to check if unwanted process in running in the background or you want to modify the priority of any process. 
To do any of the mentioned task you must have the list of all the processes.
So, today in this article, I will share the procedure with which listing of running processes will be easier. 

How to list running processes in Linux?

To list all the running processes in Linux, one of the two given command can be used. 
a. ps command
b. top command
c. htop command
*To observe the output login to SSH and then use the commends as directed.
Now, let us learn about these commands in detail.

a. ps command

ps command list all the running processes. It does not show output as windows task manager thus the result are static.

The output shows four columns which includes PID, i.e. Process IDTTY, i.e Terminal NameTIME running time and CMDthe name of command that launches the process.
To know detailed information about your running processes use aux with ps.
Now, the below given commands will help to get more detailed information related to listing of running processes.
  • ps -u: This will list all the running processes of a certain user.

  • ps -T: List all the processes executed within a terminal.
  • ps -C process_name: This will filter all the processes with the particular process name.

b. top command

Now, the another command that is used for listing running processes is top command
top command shows real time updates for the running processes.This command sort the list of resource usage and thus the process that consumes most of the resources will be placed at the top.
As top command shows real time result then there are several things that can be done to analyze more clear output. So, below are the list of keys with their function.

c. htop command

This command shows similar result to top command but it has some user friendly features with which you can manage several task related to running processes.
When you enter htop on your screen, list of running processes will appear. At the bottom, you can see multiple keys with their function.
Check the below given image.
At the bottom of the image, you can observer the keys F1, F2, F3.........F10 are representing their functions in blue.

That's it !
You can use any of the given command to list running processes in LINUX. Apart from this, to learn more about SSH and its commands visit the blog www.blog.redserverhost.com.

Linux Hosting                                         Cheap Reseller Hosting 

Comments