XK0-005 · Question #793
A Linux engineer needs to determine the oom_score value for PID 7991. Which of the following files should the engineer verify to find this value?
The correct answer is B. /proc/7991/oom_score. To find the Out-Of-Memory (OOM) score for a specific process with PID 7991, the engineer should look for the oom_score file within the process's directory in the /proc filesystem. The /proc filesystem provides an interface to kernel data structures and process information.
Question
A Linux engineer needs to determine the oom_score value for PID 7991. Which of the following files should the engineer verify to find this value?
Options
- A/var/7991/oom_score
- B/proc/7991/oom_score
- C/opt/7991/oom_score
- D/usr/config/7991/oom_score
How the community answered
(50 responses)- A4% (2)
- B92% (46)
- C2% (1)
- D2% (1)
Why each option
To find the Out-Of-Memory (OOM) score for a specific process with PID 7991, the engineer should look for the `oom_score` file within the process's directory in the `/proc` filesystem. The `/proc` filesystem provides an interface to kernel data structures and process information.
`/var` is typically used for variable data like logs and spool files, not for process-specific kernel information.
The `/proc` filesystem in Linux provides a pseudo-filesystem interface to kernel data structures and information about running processes. For any process with a specific Process ID (PID), its related information, including the `oom_score`, is exposed in a subdirectory named after its PID, such as `/proc/7991/oom_score`.
`/opt` is traditionally used for optional or third-party software packages, not for dynamic kernel or process data.
`/usr/config` is not a standard location for process-specific OOM information in Linux; `/usr` typically contains read-only user programs and libraries.
Concept tested: Linux /proc filesystem, OOM killer, process information
Source: https://docs.kernel.org/admin-guide/out-of-memory-killer.html
Topics
Community Discussion
No community discussion yet for this question.