1Z0-106 practice question 6 of 15

Which two statements are true about the proc and sys file systems?

Full set: 60 questions
Answer options
A: proc contains information about memory and CPUs. Correct answer
B: sys contains a list of running processes.
C: sys contains information about memory and CPUs. Correct answer
D: proc contains a list of network drivers.
E: sys contains a list of mounted devices.
Correct Answer:
A. proc contains information about memory and CPUs.; C. sys contains information about memory and CPUs.
Explanation

The /proc filesystem is a virtual filesystem that provides a direct interface to kernel data structures. It contains numerous files that report on the system's state, including /proc/cpuinfo for detailed processor information and /proc/meminfo for memory usage statistics. Similarly, the /sys filesystem (sysfs) exports information from the kernel's device model to user space in a structured way. It also contains detailed information about core hardware, with CPU topology and control files located under /sys/devices/system/cpu/ and memory block information under /sys/devices/system/memory/. Both filesystems serve as sources for CPU and memory information, though they present it differently.

Why Incorrect

B. sys contains a list of running processes. Incorrect. The /proc filesystem contains directories corresponding to each running process ID (PID), not /sys.
D. proc contains a list of network drivers. Incorrect. The /sys filesystem provides a structured view of devices and their associated drivers, for example, under /sys/class/net/.
E. sys contains a list of mounted devices. Incorrect. The list of mounted filesystems is found in /proc/mounts. /sys shows all detected devices, regardless of their mount status.

References

1. Oracle® Linux 7 Documentation: Administrator's Guide, Chapter 27, "Working with the /proc File System". Section 27.2, "Important /proc Files and Directories," explicitly lists /proc/cpuinfo and /proc/meminfo as key files for retrieving system hardware information.

2. The Linux Kernel Documentation: The sysfs Filesystem. The official kernel documentation describes the layout of sysfs, detailing the /sys/devices/system/ hierarchy which contains the cpu and memory subdirectories for managing and viewing information about those subsystems. (Available at kernel.org/doc/html/latest/filesystems/sysfs.html).

3. proc(5) Linux Manual Page: The man page states, "The proc filesystem is a pseudo-filesystem which provides an interface to kernel data structures... It contains... information about the system, such as /proc/cpuinfo and /proc/meminfo."

4. Red Hat Enterprise Linux 7 Documentation: Kernel Administration Guide, Chapter 5, "The sysfs filesystem". This guide explains that sysfs provides information about devices and drivers, and specifically mentions that CPU topology is exposed under /sys/devices/system/cpu/ and memory blocks under /sys/devices/system/memory/.

Scroll to Top