In computing, a process refers to a program that is currently executing on a computer system. The operating system (OS) of a computer is responsible for managing processes, allocating system resources such as memory and CPU time to them, and ensuring that they run efficiently.
The “procs” command is a Unix/Linux command that displays information about the currently running processes on a system. This command can be used to view a list of all processes running on the system, including their process ID (PID), the user who started the process, and the amount of CPU and memory resources being used by the process.
procs Command Examples
1. List all processes showing the PID, user, CPU usage, memory usage, and the command which started them:
# procs
2. List information about processes, if the commands which started them contain
# procs {{zsh}}
3. List information about all processes sorted by CPU time in [a]scending or[d]escending order:
# procs {{--sorta|--sortd}} cpu
4. List information about processes with either a PID, command, or user containing 41 or firefox:
# procs --or {{PID|command|user}} {{41}} {{firefox}}
5. List information about processes with both PID 41 and a command or user containing zsh:
# procs --and {{41}} {{zsh}}
Summary
In addition to these basic options, the “procs” command can also be used to view detailed information about specific processes, such as the amount of CPU time used by a process, the number of threads it has spawned, and the amount of memory it is using. By providing insight into the currently running processes on a system, the “procs” command can be a valuable tool for troubleshooting performance issues, identifying resource-hungry processes, and monitoring system health.