exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 68 discussion

Actual exam question from CompTIA's XK0-004
Question #: 68
Topic #: 1
[All XK0-004 Questions]

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?

  • A. renice ג€"n 9 ג€"p 5180
  • B. killall yum
  • C. ps ג€"ef | grep yum
  • D. top | grep yum
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Reference:
https://www.thegeekdiary.com/yum-command-fails-with-another-app-is-currently-holding-the-yum-lock-in-centos-rhel-7/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
luken7777
1 year, 8 months ago
that's the response from Bard AI: The killall yum command is not the best option because it would kill all of the processes that are related to yum, including the process that is currently installing the patches. This could cause the installation to be interrupted or even corrupted. The ps -ef | grep yum command is a safer option because it will only kill the process that is holding the lock. This will allow the yum command to continue installing the patches without interruption. Here are the steps involved: Run the ps -ef | grep yum command to find the PID of the process that is holding the lock. Run the kill <PID> command to kill the process. Run the yum command again to continue installing the patches.
upvoted 1 times
...
J_Dawg
3 years, 7 months ago
B. First option listed in the reference link is to kill the existing yum process. In our context, `killall yum` would suffice for the same.
upvoted 2 times
DBB73
3 years, 6 months ago
I agree with B. Question "..which should [be done] to address the issue" A. Reprioritizes the other yum job, but if process is stuck, might not help. B. kills the process C. Shows the process D. Again, shows the process. Showing the process does not address the issue. Reprioritizing the process may not either. Killing the process WILL address the issue. Always select the BEST choice.
upvoted 5 times
...
...
o0o0
4 years ago
TO address the issue are asked by the question, I think A is the best option. In fact: A - increase the priority of the running yum and therefore enable the "yum list installed" command to run with a lower priority number (0 by default). - B is a make up (only pkill kills using process names) - C will just give already known information (the PID of yum which is 5180) -D will more information about the the running yum process.
upvoted 3 times
Spectre00Sec
3 years, 3 months ago
It is B: How to use killall command in Linux The basic structure of killall command is killall [process name] where process name will be the name of the process already running in your system and you want to terminate.
upvoted 4 times
...
...
trusteme
4 years, 3 months ago
Not sure if c resolve the issue it just find the process. Maybe a can help? Reducing?
upvoted 1 times
...
FilipIT
4 years, 3 months ago
According to link add as reference I think Correct answer is b.
upvoted 2 times
FilipIT
4 years, 3 months ago
I was wrong C is correct answ
upvoted 1 times
BleachX
3 years, 6 months ago
How does "ps -ef | grep yum" do anything beyond show you processes using yum? It doesn't address the issue with stopped pid 5180 that is holding the yum lock at all. B. killall yum would kill all processes using yum and the admin would simply run yum -y update again. I don't see another post by you so can't see why you say you were wrong, but i also can't see how C is correct.
upvoted 1 times
GlitchSloane
2 years, 9 months ago
The issue is that there's another process locking yum. Wouldn’t you have to find that process first to kill it.
upvoted 1 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago