LFCS Essential Commands Practice Question
A system administrator needs to identify which processes are consuming the most CPU and memory on a Linux server. Which TWO commands can provide a real-time, interactive view of process resource usage? (Choose two.)
⚠ Common exam trap
It's easy for candidates to confuse system-wide statistics tools like vmstat or iostat with per-process interactive monitors.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
top
top and htop are interactive, real-time process viewers that show CPU and memory usage per process. top is universally available, while htop offers enhanced usability. The other commands provide snapshots or system-wide statistics without per-process, real-time interactivity, so they do not meet the requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
vmstat 1
Why it's wrong here
vmstat 1 reports virtual memory statistics every second, including CPU and memory summaries, but it does not show per-process details. It is a system-wide view, not a process-level interactive monitor. It lacks the ability to identify individual processes consuming resources.
- ✓
top
Why this is correct
top displays a dynamic, real-time view of running processes, sorted by CPU usage by default. It shows memory usage, load average, and allows interactive commands like sorting by memory (M) or killing processes (k). It is a standard tool for live process monitoring.
- ✗
ps aux --sort=-%cpu
Why it's wrong here
ps aux --sort=-%cpu provides a static snapshot of processes sorted by CPU usage. It does not update in real time and is not interactive. While useful for quick checks, it does not offer a continuous, dynamic view of resource consumption as required.
- ✓
htop
Why this is correct
htop is an interactive process viewer similar to top but with a more user-friendly interface, color-coded meters, and easy scrolling. It shows per-core CPU usage and memory, and supports mouse interaction. It provides real-time updates and is commonly used for resource monitoring.
- ✗
iostat -x 1
Why it's wrong here
iostat -x 1 displays extended I/O statistics per device every second. It focuses on disk and I/O performance, not CPU or memory usage per process. It is not interactive and does not list processes, so it cannot identify which processes are consuming CPU or memory.
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.