In a running system, we often notice that suddenly a system is responding slowly. This can be because a running application is consuming a lot of memory or a process is doing CPU-intensive work. It's hard to predict which application is causing the system to respond slower. To know the reason, it is good to know what all processes are running and also know the monitoring behavior (such as the amount of CPU or memory being consumed) of processes.
To know a list of processes running in the system, we can use the
The syntax of the
ps command is as follows:
There are a lot of options to use the
ps command. The commonly used options are explained in the following table.