Skip to main content

Command Palette

Search for a command to run...

Essential Linux Concepts for DevOps - Part 12- Process Monitoring

Published
2 min read

A process means program in execution. It generally takes an input, processes it and gives us the appropriate output. ps command can be used in linux to get the list of processes running in foreground. Each process will have a unique identifier called PID, which can be used to track it or kill it through shell.

Types of processes:

  • Foreground processes

  • Background processes

  1. Foreground processes: Such kind of processes are also known as interactive processes. These are the processes which are to be executed or initiated by the user or the programmer, they can not be initialized by system services. Such processes take input from the user and return the output. While these processes are running we can not directly initiate a new process from the same terminal.

  2. Background processes: Such kind of processes are also known as non interactive processes. These are the processes that are to be executed or initiated by the system itself or by users, though they can even be managed by users. These processes have a unique PID or process if assigned to them and we can initiate other processes within the same terminal from which they are initiated.

    1. ps - This command displays information about currently running processes.

    2. top - This command shows real-time information about system processes, including CPU and memory usage.

    3. htop - Similar to top, but with a more user-friendly interface and additional features.

    4. pidof - This command finds the process ID of a running program.

    5. kill - This command terminates a running process.

    6. killall - This command terminates all processes with a specific name.

    7. pgrep - This command finds the process ID of a running program using pattern matching.

    8. lsof - This command lists all files that are currently opened by processes.

    9. strace - This command traces system calls and signals made by a program.

    10. vmstat - This command displays information about system memory usage, including swap space.

More from this blog

Ashok Mahanthi's blog

30 posts