AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

Linux ps command: list and verify processes

PARTAGEZ

The ps command for Linux gives you an overview of all running processes. This command also offers many options to obtain a more detailed and specific list.

Linux ps command: what is it?

If your system is particularly slow or if you are having other types of problems, the Linux ps command may be particularly useful to you. Indeed, this establishes a list of all the processes running on your system at the time of its application ; “ps” is the abbreviation of “process status”. Along with the process name, the output also provides you with the process identification number (PID), the accumulated processor time as well as the responsible terminal. All this therefore gives you a very good first overview and allows you to quickly identify any possible problems. To examine a particular process, we recommend the pgrep command. The ps command works with all Linux distributions, such as Ubuntu.

How does the ps command work?

If you enter the ps command without adding an option, only all the processes are displayed launched by the shell in use. Thus, no other process is taken into account. Below you will find out how it is possible to take them into consideration. The list is very clear and has the merit of providing you with initial indications on the level of quality (good or bad) of the processes being carried out.

What does the ps command syntax look like?

The Linux ps command syntax is very simple. It usually looks like this:

Once executed, the command provides an overview of all running processes.

What are the options offered by Linux ps?

There are different types of options related to the ps command. Options in UNIX format are simply preceded by a hyphen, and it is possible to group them. BSD options, for their part without a hyphen, can also be grouped. GNU options begin with two dashes. Below are some of the most important options:

  • -HAS : it makes it possible to take into account all the processes currently running at the system level.
  • -has : it also makes it possible to take account of all the processes, with the exception of those which are not connected to the terminal. Session conductors are also left out.
  • -VS [processus] : it displays only the processes listed between the square brackets.
  • -d: it makes it possible to take into account all the processes, with the exception of the session conductors.
  • -e : it achieves the same result as the “-A” option.
  • -f: it makes it possible to further detail the result linked to the various processes.
  • a: it makes it possible to take into account the running processes only.
  • T: it makes it possible to take into account the processes linked to the terminal in use only.
  • x: it allows to limit the result to the processes which belong to you as user and performer.

ps command: examples

Below are some examples of how you can fine-tune the Linux ps command using options:

This command displays all processes.

This command displays more information about all processes.

$ ps -fC programme1, programme2, programme3

shell

This command allows you to search for particular programs and check them in detail.

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact