Which two methods of changing kernel parameters can you use to modify values for the running system?
Correct Answer: B,D
Question 7
Which two types of reports does iostat generate?
Correct Answer: B,E
Explanation of Answer B:iostatis a tool used to monitor system input/output device loading by observing the time devices are active concerning their average transfer rates. The "Device Utilization Report" provides statistics about device utilization and throughput rates, which is critical in identifying performance bottlenecks. Explanation of Answer E:iostatalso generates "CPU Utilization Reports." These reports provide data about how the CPU is utilized during input/output operations, showing the percentage of CPU time used for user processes, system processes, and the time the CPU remains idle.
Question 8
Which three statements are true about the journalctl command?
Correct Answer: B,D,E
Option B: journalctl -p err shows only error log level. * Explanation: * The -p or --priority option in journalctl filters messages by their priority level. * When specifying asingle priority level, journalctl shows messagesonlyat that level. * The priority levels, as per syslog standards, are: * 0: emerg * 1: alert * 2: crit * 3: err * 4: warning * 5: notice * 6: info * 7: debug * Therefore, journalctl -p err displays messages with priorityerr (3)only. * Oracle Linux Reference: * OracleLinux 8: Managing Log Files- Section onFiltering Output withjournalctl: "Use the -p option to display messages from the journal that have a specific priority level." * Example: # journalctl -p err Option D: journalctl -k shows kernel logs since the last boot. * Explanation: * The -k or --dmesg option filters messages from the kernel, equivalent to the output of the dmesg command. * This option implies -b, which limits the output to messages from the current boot. * Therefore, journalctl -k displays kernel messages since the last boot. * Oracle Linux Reference: * OracleLinux 8: Managing Log Files- Section onViewing Kernel Messages: "Use the journalctl -k command to display kernel messages since the last system boot." * Example: # journalctl -k Option E: journalctl -p 6 shows all info log level messages and above. * Explanation: * When specifying a single numeric priority, journalctl displays messages withthat priority level and higher priority levels(i.e., lower severity). * Priority levels are ordered from 0 (highest severity) to 7 (lowest severity). * Therefore, journalctl -p 6 shows messages with priorities: * 0 (emerg) * 1 (alert) * 2 (crit) * 3 (err) * 4 (warning) * 5 (notice) * 6 (info) * This includesinfo level messages (6)and all higher priority messages. * Oracle Linux Reference: * OracleLinux 8: Managing Log Files- Section onFiltering Output with journalctl: "When you specify a single priority level, journalctl shows messages at that level and higher severity." * Example: # journalctl -p 6 Why Other Options Are Not Correct: * Option A:journalctl -bl -p err fails if journal persistence is not configured. * Explanation: * The -b option displays messages from the current boot. This works even if journal persistence isnotconfigured because the logs from the current boot are stored in volatile memory (/run/log/journal). * Therefore, the command doesnot failif journal persistence is not configured. * Oracle Linux Reference: * OracleLinux 8: Managing Log Files- Section onJournal Volatility: "By default, the journal stores logs in volatile memory and does not persist logs across reboots unless persistent storage is configured." * Option C:journalctl -p notice..warning shows all messages from notice to warning log level since the last boot. * Explanation: * The -p option allows specifying arangeof priorities. However, the correct order for the range should be from thehigher priority (lower number)to thelower priority (higher number). * Also, the priorities should be specified in the correct sequence, and ranges are inclusive. * Moreover, journalctl by default shows messages from all boots unless limited by the -b option. * Therefore, without -b, it does not limit messages to "since the last boot," making the statement incorrect. * Correct Command: * To display messages fromwarning (4)tonotice (5), the command should be: # journalctl -p warning..notice -b * But even then, the priorities need to be specified correctly, and the command in Option C is incorrect. Conclusion: OptionsB,D, andEare correct because they accurately describe the behavior of the journalctl command in filtering and displaying log messages based on priority levels and sources.
Question 9
Which two statements are true about the proc and sys file systems?
Correct Answer: B,D
Question 10
Examine these requirements for a host with a user oracle: * Network services must run in a confined domain. * The oracle user must be confined. * The oracle user must be able to use Mozilla Firefox. * Access to files and directories must be granted based only on SELinux contexts. * The SELinux configuration must be persistent across system restarts. * Users must be able to publish private HTML content. Now examine these commands and output: # sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max Kernel policy version: 31 # setenforce enforcing # semanage login -a -s guest_u oracle # setsebool -P http_enable_homedirs on Which requirements are satisfied?
Correct Answer: A
Explanation of Answer A: * Network services running in a confined domain: SELinux provides domain confinement for services, ensuring they run with restricted access based on their defined policies. * The oracle user must be confined: The commandsemanage login -a -s guest_u oracleconfines theoracleuser to theguest_uSELinux user role, which is a confined role. * Access to files and directories based only on SELinux contexts: With SELinux enabled and the policy loaded, access is governed by SELinux contexts. * Persistent SELinux configuration across reboots: Thesetenforce enforcingcommand, combined with the appropriate policy configuration, ensures that SELinux remains in enforcing mode across reboots. * Users able to publish private HTML content: Thesetsebool -P http_enable_homedirs oncommand enables the use of user home directories for web content, allowing users to host personal web pages.