nerdexam
CompTIA

XK0-005 · Question #81

A junior Linux administrator is installing patches using YUM. The administrator issues the following command: yum list installed The output of the command is as follows: Given this scenario and the…

The correct answer is B. killall yum. YUM uses a lock file (/var/run/yum.pid) to prevent multiple instances from running simultaneously. If a previous yum process is still running (or was killed ungracefully and left a stale lock), subsequent yum commands will hang or display a 'Another app is currently holding the…

Troubleshooting

Question

A junior Linux administrator is installing patches using YUM. The administrator issues the following command:

yum list installed The output of the command is as follows:

Given this scenario and the output, which of the following should the administrator do to address this issue?

Exhibit

XK0-005 question #81 exhibit

Options

  • Arenice -n 9 -p 5180
  • Bkillall yum
  • Cps -ef | grep yum
  • Dtop | grep yum

How the community answered

(19 responses)
  • A
    11% (2)
  • B
    79% (15)
  • C
    5% (1)
  • D
    5% (1)

Explanation

YUM uses a lock file (/var/run/yum.pid) to prevent multiple instances from running simultaneously. If a previous yum process is still running (or was killed ungracefully and left a stale lock), subsequent yum commands will hang or display a 'Another app is currently holding the yum lock' error. The correct remediation is to kill the conflicting yum process with 'killall yum', which sends SIGTERM to all processes named 'yum', clearing the lock. After that, yum commands will run normally. 'renice' changes process priority (not relevant), 'ps -ef | grep yum' and 'top | grep yum' only display information without resolving the lock.

Topics

#Linux commands#Process management#yum#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice