Courseiva
Server Administration →mediumMultiple Choice

C100DBA Server Administration Practice Question

A DBA needs to automate log rotation on a Linux-based MongoDB server without restarting the mongod process. Which signal or command should be used to ensure the current log file is archived and a new one is started?

⚠ Common exam trap

Candidates often suggest restarting the service to rotate logs, which is unnecessary and causes avoidable downtime, failing to recognize that signal-based rotation is the standard administrative practice.

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

✓

Send a SIGUSR1 signal to the mongod PID.

Log rotation is a critical administrative task that prevents disk space exhaustion and facilitates log analysis. Using the SIGUSR1 signal on Linux systems allows the administrator to rotate logs without any downtime or server restarts. This ensures continuous availability while maintaining manageable file sizes for diagnostic purposes, which is essential for long-term server health and compliance with retention policies.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Send a SIGHUP signal to the mongod PID.

    Why it's wrong here

    The SIGHUP signal is traditionally used in many Unix daemons to reload configuration files, but MongoDB does not use it for log rotation. Relying on SIGHUP would result in no action or potentially unexpected behavior, depending on the OS version, rather than the intended archival and rollover of system logs.

  • ✗

    Run the 'rotateLogs' command from the admin database.

    Why it's wrong here

    This setting is incorrect because the 'logRotate' command must be issued from within the mongo shell to have an effect. While it achieves the same result as a signal, the question specifically asks for the mechanism used in automated Linux scripts, where signals are often the preferred external interface.

  • ✓

    Send a SIGUSR1 signal to the mongod PID.

    Why this is correct

    Sending a SIGUSR1 signal to the mongod process triggers the server to close the current log file, rename it with a timestamp, and open a new log file. This is the standard operational procedure for Linux environments to manage log growth without interrupting database services or requiring a full restart.

  • ✗

    Update the 'systemLog.path' in the YAML config and run 'mongod --reconfig'.

    Why it's wrong here

    MongoDB does not support a '--reconfig' flag for the mongod binary to update log paths dynamically. Changing the configuration file requires a full process restart to take effect, which violates the requirement of maintaining uptime. This method is inefficient for routine administrative tasks like log management in production.

About these practice questions

One of 222 original C100DBA 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 MongoDB exam blueprint

This C100DBA practice question is part of Courseiva's free MongoDB 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 C100DBA exam.