XK0-006 Troubleshooting Practice Question
An administrator needs to identify which processes are consuming the most CPU and memory resources. Which two commands can provide this information? (Choose two.)
⚠ Common exam trap
The key distinction is between system-wide monitoring commands (like `free`, `vmstat`, `iostat`) and per-process commands (like `top`, `ps`). Candidates mistakenly choose `free -h` or `vmstat` thinking they show per-process CPU/memory details.
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
Option A, top, is correct because it is an interactive process monitor that displays a live, continuously refreshed list of running processes ranked by CPU usage by default, and it also shows per-process memory (RES/%MEM) so the administrator can identify the top CPU and memory consumers in one view. Option E, ps aux --sort=-%mem, is correct because it produces a static snapshot of all processes (a = all users, u = user-oriented format, x = include processes without a controlling terminal) sorted in descending order by memory percentage, which directly reveals the heaviest memory consumers and, with the aux output, their CPU usage as well. Option B, free -h, is not correct because it only reports aggregate system memory and swap usage in human-readable units, not per-process consumption. Option C, iostat -x, is not correct because it reports extended disk I/O and CPU utilization statistics per device, not which processes are using CPU or memory. Option D, vmstat 1 5, is not correct because it samples system-wide virtual memory, CPU, and I/O statistics every second for five iterations, but it does not attribute resource usage to individual processes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
top
Why this is correct
top presents a live, self-refreshing process list ordered by CPU consumption by default, also showing per-process memory usage. Its interactive display satisfies the requirement to identify the heaviest CPU and memory consumers in real time.
- ✗
free -h
Why it's wrong here
free -h reports only aggregate RAM and swap totals, with no per-process breakdown, so it cannot identify which processes consume CPU or memory. It is tempting because it is the fastest memory overview, and would be correct when checking overall system memory pressure rather than attributing usage to individual processes.
- ✗
iostat -x
Why it's wrong here
iostat -x reports per-device disk I/O utilisation and throughput, not per-process CPU or memory consumption, so it cannot name the top consumers. It is tempting because it does show CPU statistics, but only as system-wide averages, making it the right tool for diagnosing storage bottlenecks rather than process resource usage.
- ✗
vmstat 1 5
Why it's wrong here
vmstat 1 5 samples system-wide CPU, memory and I/O counters over five intervals, giving no per-process breakdown, so it cannot identify which processes consume the most resources. It is tempting because it reports CPU and memory figures, but it is designed for monitoring overall system load trends rather than attributing usage to individual processes.
- ✓
ps aux --sort=-%mem
Why this is correct
ps aux lists every process with CPU and memory percentages, and --sort=-%mem orders output by descending memory usage. This gives a static, sortable snapshot that satisfies the requirement to pinpoint the processes consuming the most memory.
Go deeper
Related to this question
Learn chapter
Process Management and System Monitoring
Key term
Terminal
A terminal is a text-based interface that allows users to communicate with a computer's operating system by typing commands.
Key term
Process
In IT service management, a process is a structured set of activities designed to accomplish a specific objective, such as managing incidents or changes, by transforming inputs into defined outputs.
About these practice questions
One of 781 original XK0-006 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.