Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A system administrator notices that a service…

A system administrator notices that a service named 'myapp' fails to start on a Linux server. The command 'systemctl status myapp' shows 'Active: failed (Result: exit-code)'. Which of the following is the BEST first step to diagnose the issue?

⚠ Common exam trap

The trap here is that candidates often jump to checking running processes with 'ps' or kernel messages with 'dmesg', but the correct first step is always to consult the service-specific logs via 'journalctl' because systemd captures the exact failure reason from the service's own output.

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

Run 'journalctl -u myapp.service' to inspect the service logs.

The 'journalctl -u myapp.service' command retrieves the systemd journal logs specifically for the myapp service, which contain the service's stdout, stderr, and any error messages generated during its failed startup attempt. Since the service failed with an exit code, these logs are the most direct source of diagnostic information to identify why the process terminated abnormally.

Answer analysis

Option-by-option breakdown

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

  • Run 'journalctl -u myapp.service' to inspect the service logs.

    Why this is correct

    journalctl with the unit flag shows logs for that specific service, revealing startup errors.

  • Run 'dmesg' to view kernel messages.

    Why it's wrong here

    dmesg shows kernel messages, not service-specific errors.

  • Run 'ps aux | grep myapp' to check if the process is running.

    Why it's wrong here

    This only checks if the process is present, not why it failed to start.

  • Edit the service file with 'systemctl edit myapp' and increase timeout values.

    Why it's wrong here

    Modifying configuration without knowing the cause can introduce new issues.

About these practice questions

This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.