Question 220
Several Linux CPUs are unevenly busy, and the administrator needs per-CPU utilization samples. Which utility is suitable?
- ps aux
- mpstat -P ALL 1
- htop
- top
Explanation
Correct Answer
B:mpstat reports processor statistics including per-CPU usage at chosen intervals. It helps distinguish one saturated core from overall host utilization.
Incorrect Answers
A:ps aux displays a system-wide process snapshot including user, CPU and memory information; its scope differs from sampling each CPU's utilization, so it cannot meet the stated requirement.
C:htop provides an interactive process interface with navigation and tree views; the administrator instead needs sampling each CPU's utilization; this option serves a different purpose.
D:top updates an interactive table of processes and system load; it answers a neighboring question rather than sampling each CPU's utilization.
Question 221
An interactive job is currently stopped by Ctrl+Z and must resume in the background. Which shell builtin does that?
- bg %1
- SIGHUP (signal 1)
- nohup command >run.log 2>&1 &
- SIGKILL (signal 9)
- renice +10 -p 6120
- SIGTERM (signal 15)
Explanation
Correct Answer
A:bg resumes a suspended shell job in the background using its job identifier. It does not detach the job from all terminal-related signals.
Incorrect Answers
B:Many daemons interpret SIGHUP as a reload request, although behavior depends on the application; it will not provide resuming a suspended job in the background under these conditions.
C:nohup arranges for the launched command to ignore SIGHUP, while backgrounding and redirection prevent terminal dependence; using it would leave resuming a suspended job in the background unresolved.
D:SIGKILL forces termination through the kernel and bypasses process cleanup handlers; the requirement is resuming a suspended job in the background, outside the effect of this choice.
E:renice modifies the scheduling priority of an existing process; it does not deliver resuming a suspended job in the background, which is decisive in this scenario.
F:SIGTERM requests termination and can be handled so a process may clean up; the evidence calls for resuming a suspended job in the background, not merely this separate operation.
Question 222
An automation review requires listing the current account's scheduled cron entries without editing them. Which command fits?
- Ctrl+Z
- Ctrl+C
- 15 2 * * *
- crontab -l
Explanation
Correct Answer
D:crontab -l displays the current user's installed cron table. It does not show every system-wide timer or another user's entries without appropriate selection.
Incorrect Answers
A:Ctrl+Z normally delivers SIGTSTP to the foreground process group; the evidence calls for displaying installed user crontab entries, not merely this separate operation.
B:Ctrl+C causes the terminal to deliver an interrupt signal to the foreground process group; the task involves displaying installed user crontab entries, whereas this addresses another subsystem.
C:Cron places the minute field first and the hour field second, so 15 2 means 02:15; its scope differs from displaying installed user crontab entries, so it cannot meet the stated requirement.
Question 223
An existing process must be assigned a lower CPU scheduling priority without restarting it. Which command changes its nice value?
- SIGHUP (signal 1)
- SIGTERM (signal 15)
- renice +10 -p 6120
- bg %1
Explanation
Correct Answer
C:renice modifies the scheduling priority of an existing process. A higher numeric nice value generally means less favorable CPU scheduling.
Incorrect Answers
A:Many daemons interpret SIGHUP as a reload request, although behavior depends on the application; it answers a neighboring question rather than adjusting an already running process's niceness.
B:SIGTERM requests termination and can be handled so a process may clean up; that changes a different part of the system; the requested outcome is adjusting an already running process's niceness.
D:bg resumes a suspended shell job in the background using its job identifier; it will not provide adjusting an already running process's niceness under these conditions.
Question 224
A debugger needs to pause an uncooperative Linux process without terminating it, even if the process has installed handlers for ordinary terminal-generated stop signals. Which signal cannot be caught or ignored?
- SIGKILL
- SIGSTOP
- SIGTERM
- SIGTSTP
- SIGHUP
Explanation
Correct Answer
B:SIGSTOP causes an unconditional stop that the target cannot catch, block or ignore. SIGCONT can later resume execution, making it suitable for a forced debugging pause.
Incorrect Answers
A:SIGKILL cannot be caught or ignored, but it ends the target process rather than suspending it. The debugging session requires a resumable stop.
C:SIGTERM requests termination and is normally catchable and blockable. A process can handle or defer it, and its intent is shutdown rather than suspension.
D:SIGTSTP is the interactive terminal stop request ordinarily generated by Ctrl+Z. Unlike SIGSTOP, a program may catch or ignore it.
E:SIGHUP commonly indicates a lost controlling terminal and is often used by daemons to trigger reloads. It is catchable and is not an unconditional pause.
Question 225
A heavy batch job should start with less favorable scheduling priority than the shell. Which invocation sets it initially?
- bg %1
- nice -n 10 command
- SIGTERM (signal 15)
- SIGHUP (signal 1)
Explanation
Correct Answer
B:nice launches a new process with its requested scheduling niceness, typically making it less favored under contention when positive. It does not impose a fixed CPU usage ceiling.
Incorrect Answers
A:bg resumes a suspended shell job in the background using its job identifier; that is not equivalent to starting a job with reduced CPU priority.
C:SIGTERM requests termination and can be handled so a process may clean up; it answers a neighboring question rather than starting a job with reduced CPU priority.
D:Many daemons interpret SIGHUP as a reload request, although behavior depends on the application; that changes a different part of the system; the requested outcome is starting a job with reduced CPU priority.
Question 226
A worker launched multiple child programs, and an engineer must visualize parent/child relationships. Which command is appropriate?
- pidstat -p 6120 1
- mpstat -P ALL 1
- top
- pstree -p
- ps aux
Explanation
Correct Answer
D:pstree presents processes as a hierarchy and -p includes PIDs. This can reveal which parent spawned a stalled child.
Incorrect Answers
A:pidstat measures per-process statistics at intervals and can target a specific PID; it will not provide displaying process ancestry under these conditions.
B:mpstat reports processor statistics including per-CPU usage at chosen intervals; using it would leave displaying process ancestry unresolved.
C:top updates an interactive table of processes and system load; the requirement is displaying process ancestry, outside the effect of this choice.
E:ps aux displays a system-wide process snapshot including user, CPU and memory information; the evidence calls for displaying process ancestry, not merely this separate operation.
Question 227
A workstation may be powered off at its scheduled daily maintenance time. Which tool can catch up missed periodic jobs later?
- crontab -l
- Ctrl+C
- anacron
- ulimit -n
Explanation
Correct Answer
C:anacron is designed for interval-based periodic tasks on systems not continuously running. It records execution state and runs overdue jobs after startup.
Incorrect Answers
A:crontab -l displays the current user's installed cron table; the task involves catching up periodic jobs missed while offline, whereas this addresses another subsystem.
B:Ctrl+C causes the terminal to deliver an interrupt signal to the foreground process group; its scope differs from catching up periodic jobs missed while offline, so it cannot meet the stated requirement.
D:ulimit manages limits for the current shell and its descendants, subject to hard limits and policy; the administrator instead needs catching up periodic jobs missed while offline; this option serves a different purpose.
Question 228
A shell user needs to bring job 2 back to the foreground for interactive input. Which builtin is correct?
- fg %2
- SIGKILL (signal 9)
- SIGTERM (signal 15)
- nice -n 10 command
Explanation
Correct Answer
A:fg places a shell job in the foreground and waits for it. This reconnects terminal interaction with the selected job.
Incorrect Answers
B:SIGKILL forces termination through the kernel and bypasses process cleanup handlers; this does not achieve moving a selected shell job to foreground on the system described.
C:SIGTERM requests termination and can be handled so a process may clean up; it will not provide moving a selected shell job to foreground under these conditions.
D:nice launches a new process with its requested scheduling niceness, typically making it less favored under contention when positive; using it would leave moving a selected shell job to foreground unresolved.
Question 229
A process shows state Z in ps. Which interpretation is accurate?
- ps aux
- mpstat -P ALL 1
- Defunct child awaiting parent reaping
- pstree -p
Explanation
Correct Answer
C:A zombie has exited but retains a minimal process-table entry until its parent collects exit status. Sending it SIGKILL cannot kill an already terminated process.
Incorrect Answers
A:ps aux displays a system-wide process snapshot including user, CPU and memory information; it does not deliver interpreting the zombie process state, which is decisive in this scenario.
B:mpstat reports processor statistics including per-CPU usage at chosen intervals; the evidence calls for interpreting the zombie process state, not merely this separate operation.
D:pstree presents processes as a hierarchy and -p includes PIDs; its scope differs from interpreting the zombie process state, so it cannot meet the stated requirement.
Question 230
A diagnostic script needs a complete one-time snapshot of all running users' processes. Which command is suitable?
- mpstat -P ALL 1
- Defunct child awaiting parent reaping
- pidstat -p 6120 1
- ps aux
Explanation
Correct Answer
D:ps aux displays a system-wide process snapshot including user, CPU and memory information. It does not continuously refresh like top.
Incorrect Answers
A:mpstat reports processor statistics including per-CPU usage at chosen intervals; the administrator instead needs obtaining a cross-user process snapshot; this option serves a different purpose.
B:A zombie has exited but retains a minimal process-table entry until its parent collects exit status; it answers a neighboring question rather than obtaining a cross-user process snapshot.
C:pidstat measures per-process statistics at intervals and can target a specific PID; that changes a different part of the system; the requested outcome is obtaining a cross-user process snapshot.