nerdexam
CompTIA

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.

System Management

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)
  • A
    4% (2)
  • B
    92% (46)
  • C
    2% (1)
  • D
    2% (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.

A/var/7991/oom_score

`/var` is typically used for variable data like logs and spool files, not for process-specific kernel information.

B/proc/7991/oom_scoreCorrect

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`.

C/opt/7991/oom_score

`/opt` is traditionally used for optional or third-party software packages, not for dynamic kernel or process data.

D/usr/config/7991/oom_score

`/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

#Linux processes#oom_score#/proc filesystem#System information

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice