Linux for Developers
/Beginner
top
Definition
A command-line utility that displays a dynamic, real-time, continually updating view of running processes and system resource usage (CPU, RAM).
Explain Like I'm New
The live Windows Task Manager for Linux. The screen constantly refreshes every 3 seconds to show you exactly which app is eating all your CPU.
Real World Example
Your web server is incredibly slow. You type `top`. The list constantly updates, and you see that a rogue Python script is stuck in an infinite loop, consuming 99.9% of the CPU.
Common Use Cases
- •Performance monitoring
- •Identifying resource hogs
Crucial Command Flags
| Flag / Option | Description |
|---|---|
| -d [sec] | Delay. Update the screen every [sec] seconds. |
| -u [user] | Monitor only processes owned by a specific user. |
| -i | Idle. Ignore idle or zombie processes. |
Interview Questions
basic
- How do you exit the `top` interface?
intermediate
- In `top`, what is 'Load Average' (e.g., 1.50, 0.80, 0.75)?