Courseiva
Troubleshooting →mediumMultiple Select

XK0-006 sar Practice Question

A system administrator needs to collect performance data over time to analyze CPU and memory usage trends. Which THREE of the following commands can be used to gather historical performance data? (Choose THREE.)

⚠ Common exam trap

XK0-006 often tests the distinction between real-time monitoring tools (like uptime and free) and tools that can provide historical data (like sar and iostat), so candidates may incorrectly include free or uptime.

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

✓

iostat

Option A, iostat, is correct because it reports CPU utilization and disk I/O statistics and can be run repeatedly (e.g., iostat 5) or logged over time to reveal performance trends. Option D, sar, is correct because the System Activity Reporter collects and stores historical performance data via the sadc collector and sysstat service, allowing retrieval of past CPU and memory statistics with commands like sar -u or sar -r. Option E, vmstat, is correct because it samples CPU, memory, paging, and I/O statistics at intervals (e.g., vmstat 5) and its output can be captured over time for trend analysis. Option B, uptime, is not correct because it only shows a single snapshot of load average and uptime, not historical performance data. Option C, free, is not correct because it displays a one-time snapshot of current memory usage rather than collecting data over time.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    iostat

    Why this is correct

    iostat reports CPU utilisation and disk I/O statistics, and with interval arguments it samples repeatedly, building a historical record of CPU trends. It writes to stdout, so redirecting output to a file captures the data over time.

  • ✗

    uptime

    Why it's wrong here

    uptime reports only current load averages and system uptime, with no historical retention or per-process CPU and memory breakdown. It suits a quick real-time health check. Commands such as sar, vmstat and top with logging capture the trend data the task requires.

  • ✗

    free

    Why it's wrong here

    free prints a single instantaneous snapshot of memory usage and exits; it cannot record data over time. It tempts because it reports memory statistics, so it fits memory monitoring, but historical trending requires sar, which samples and logs metrics across intervals.

  • ✓

    sar

    Why this is correct

    The `sar` command reads the binary daily data files written by the `sadc` collector, letting you replay CPU and memory statistics for any past date or time range. That satisfies the stem's requirement for historical trend analysis, unlike live snapshot tools such as `top` or `vmstat`.

  • ✓

    vmstat

    Why this is correct

    vmstat samples kernel thread, virtual memory, CPU and I/O statistics at a specified interval and count, writing each sample to stdout. Redirecting that output to a file builds a historical record for trend analysis, satisfying the requirement to collect CPU and memory performance data over time.

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 →

How Courseiva writes practice questions · Editorial policy

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 CompTIA exam blueprint

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.