procs — modern ps
💬 "procs command"
procs is a modern ps replacement, a color process viewer. It supports column selection and storage integration.
It displays running processes with color. Without the complex options of ps, you can select and view only the desired columns.
- Concept: Displays running processes with color.
- Main Features: Allows selecting only desired columns without ps's complex options.
- Advantages: PID search is intuitive.
- Usage: You can search by container name.
Installation and Download
procs is installed via a package manager or an official script.
| Environment | Command |
|---|---|
| Ubuntu / Debian | sudo apt install procs |
| Fedora / RHEL | sudo dnf install procs |
| Arch | sudo pacman -S procs |
| macOS (brew) | brew install procs |
| Rust cargo | cargo install procs |
| Binary download | github.com/dalance/procs/releases |
Verify the installation with procs --version.
Frequently Used Options
| Option | Description |
|---|---|
| -c user,pid,cmd | Select columns |
| --dupid | Show duplicate PIDs |
| --watch | Refresh in real-time |
| --color | Force color output |
| --and | Combine multiple search conditions with AND |
3 Essential Command Combinations
procs nginx— Search for nginx processesprocs -c user,pid,cpu,mem,cmd— Select and view columnsprocs --watch— Monitor processes in real-time
💬 "Show me an example of using procs on a real server"
Here is a step-by-step guide for common situations encountered on live production servers.
Step 1 · Verify Installation
Check if it is installed.
procs --version || sudo apt install -y procs
Step 2 · Search for a Specific Process
Find the nginx process.
procs nginx
Step 3 · Select Columns
View only the desired columns.
procs -c user,pid,cpu,mem,cmd
Live Execution Output
This is the result of searching for the nginx process using procs. It is displayed neatly with color.
!procs command execution result
Live production server
How It's Used in Practice
1. Port-Occupying Processes
Situation — Find the process using a specific port.
procs 8201
Result — The comment-api process is visible.
Key Point — Useful for diagnosing port conflict issues.
2. Processes by User
Situation — View only processes of a specific user.
procs --and user=www-data
Result — Only www-data processes are shown.
Key Point — Conditions can be combined using --and.
Live Execution Output
This is the result of checking a specific process by selecting columns.
!procs command execution result 2
Live production server
Points of Caution
- procs uses a different output format than ps. Be cautious when replacing existing scripts that parse ps output.
- The --watch mode continuously refreshes the screen, so do not use it for writing to log files.
- Detailed information for processes without sufficient permissions may be restricted.
Source (HTML): https://games.aidebatehub.com/programs/linux/modern/procs.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments