Question 231 of 513
Essential CommandsmediumMultiple ChoiceObjective-mapped

LFCS ps command Practice Question

This LFCS practice question tests your understanding of essential commands. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: ps command. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A system administrator is troubleshooting a performance issue. They need to identify which process is consuming the most CPU time over the last 24 hours. Which command should be used?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "which command"

    Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

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

ps aux --sort=-%cpu

Option A is the most appropriate among the given choices because `ps aux --sort=-%cpu` lists all processes sorted by the current CPU usage percentage. While this shows a snapshot of current CPU consumption, the `%cpu` field represents the percentage of CPU time used since the process started, giving an approximation of the process's cumulative CPU usage. For historical data over the last 24 hours, process accounting (e.g., `sa` command) would be needed, but among the options, only A provides per-process CPU data.

Key principle: ps command

Answer analysis

Option-by-option breakdown

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

  • ps aux --sort=-%cpu

    Why this is correct

    Correct. `ps aux --sort=-%cpu` displays processes sorted by CPU usage percentage, which reflects the process's CPU time over its lifetime, making it the best option for identifying the most CPU-consuming process.

    Clue confirmation

    The clue word "which command" in the question point toward this answer.

    Related concept

    ps command

  • sar -u -f /var/log/sa/sa$(date +%d)

    Why it's wrong here

    Incorrect. `sar -u` reports overall CPU utilization (user, system, idle, etc.) but does not provide per-process CPU time, so it cannot identify which specific process is consuming the most CPU.

  • top -b -n1

    Why it's wrong here

    Incorrect. `top -b -n1` shows a snapshot of processes, but it does not sort by CPU usage by default, and like `ps`, it only shows current values, not historical data.

  • uptime

    Why it's wrong here

    Incorrect. `uptime` shows system load averages, which are not per-process and do not indicate which process is using the most CPU.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Candidates often choose `sar -u` because it provides historical data, but it only shows overall CPU utilization, not per-process information. The question asks for the process consuming the most CPU, which requires process-level data.

Trap categories for this question

  • Command / output trap

    Incorrect. `top -b -n1` shows a snapshot of processes, but it does not sort by CPU usage by default, and like `ps`, it only shows current values, not historical data.

Detailed technical explanation

How to think about this question

The `sar` command collects and reports system activity data via the sysstat package, which logs CPU, memory, I/O, and network statistics at regular intervals (typically every 10 minutes) into binary files under `/var/log/sa/`. The `-u` option specifically reports CPU utilization as a percentage of time spent in user mode, system mode, idle, and I/O wait, enabling administrators to identify sustained high CPU usage patterns. In a real-world scenario, combining `sar -u` with `sar -P ALL` can pinpoint CPU core-level bottlenecks, and using `sar -f` with a specific date file allows retrospective analysis without needing a dedicated monitoring tool.

KKey Concepts to Remember

  • ps command
  • CPU time vs CPU utilization

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

ps command

Real-world example

How this comes up in practice

A practitioner preparing for the LFCS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. ps command Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Review ps command, then practise related LFCS questions on the same topic to reinforce the concept.

Related practice questions

Related LFCS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LFCS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LFCS question test?

Essential Commands — This question tests Essential Commands — ps command.

What is the correct answer to this question?

The correct answer is: ps aux --sort=-%cpu — Option A is the most appropriate among the given choices because `ps aux --sort=-%cpu` lists all processes sorted by the current CPU usage percentage. While this shows a snapshot of current CPU consumption, the `%cpu` field represents the percentage of CPU time used since the process started, giving an approximation of the process's cumulative CPU usage. For historical data over the last 24 hours, process accounting (e.g., `sa` command) would be needed, but among the options, only A provides per-process CPU data.

What should I do if I get this LFCS question wrong?

Review ps command, then practise related LFCS questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

What is the key concept behind this question?

ps command

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More LFCS practice questions

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.