Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
InfrastructureJuniorOccasionalTroubleshooting

How do you inspect running processes on Linux?

Answer

Use `ps` for a process snapshot, often `ps aux` or `ps -ef`, and `top` for an interactive changing view of CPU and memory usage. `pgrep` can locate PIDs by process name. For a specific service, combine process inspection with the service manager rather than treating a matching process name as proof that the service is healthy.

Strong answer includes

  • ps is a snapshot while top is interactive
  • can locate a PID with pgrep or ps filtering
  • process existence is not the same as application health

Practical example

When a test server becomes slow, `top` may show one Java process consuming a CPU core. Then `ps -fp <pid>` confirms its command line before anyone restarts or kills the wrong process.

#linux#processes#ps#top

Sources

Linux man-pages projectman7.org / Linux man-pages project · Linux processes, signals, networking and system-call-facing command behavior50 Linux Interview Questions (With Answers)Toolmingo · Recurrence signal for Linux filesystem, permissions, processes, systemd, networking and shell-command interview topics