ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 190 - XK0-005 discussion

Report
Export

As part of the requirements for installing a new application, the swappiness parameter needs to be changed to O. This change needs to persist across re-boots and be applied immediately. A Linux systems administrator is performing this change. Which of the following steps should the administrator complete to accomplish this task?

A.
echo 'vm. swappiness---()' >> /etc/sysctl . conf && sysctl ---p
Answers
A.
echo 'vm. swappiness---()' >> /etc/sysctl . conf && sysctl ---p
B.
echo 'vrn. >> / proc/meminfo && sysctl ---a
Answers
B.
echo 'vrn. >> / proc/meminfo && sysctl ---a
C.
sysctl ---v >> / proc/meminfo & & echo 'vm. swapiness=0'
Answers
C.
sysctl ---v >> / proc/meminfo & & echo 'vm. swapiness=0'
D.
sysctl ---h 'vm. swapiness---O' && echo / etc/vmswapiness
Answers
D.
sysctl ---h 'vm. swapiness---O' && echo / etc/vmswapiness
Suggested answer: A

Explanation:

To change the swappiness parameter to 0 and make it persistent across reboots and applied immediately, the administrator can perform the following steps:

Append the linevm.swappiness=0to the file/etc/sysctl.confusingecho 'vm.swappiness=0' >> /etc/sysctl.conf(A). This will set the swappiness parameter to 0 for future boots.

Reload the sysctl configuration usingsysctl -p(A). This will apply the changes to the current system without rebooting. The other commands will not achieve this task, but either write to a wrong file, use a wrong option, or have a syntax error.Reference:

[CompTIA Linux+ Study Guide], Chapter 8: Optimizing Linux Performance, Section: Tuning Kernel Parameters with sysctl

[How to Change Swappiness in Linux]

asked 02/10/2024
David Aghaegbuna
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first