{
    "content": [
        {
            "type": "text",
            "text": "# choom (man)\n\n## NAME\n\nchoom - display and adjust OOM-killer score.  choom -p PID  choom -p PID -n number  choom -n number [--] command [argument ...]\n\n## DESCRIPTION\n\nThe choom command displays and adjusts Out-Of-Memory killer score setting.\n\n## TLDR\n\n> Display and change the adjust out-of-memory killer score.\n\n- Display the OOM-killer score of the process with a specific ID:\n  `choom {{-p|--pid}} {{pid}}`\n- Change the adjust OOM-killer score of a specific process:\n  `choom {{-p|--pid}} {{pid}} {{-n|--adjust}} {{1000..+1000}}`\n- Run a command with a specific adjust OOM-killer score:\n  `choom {{-n|--adjust}} {{1000..+1000}} {{command}} {{argument1 argument2 ...}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **OPTIONS** (4 subsections)\n- **NOTES**\n- **AUTHORS**\n- **SEE ALSO**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "choom",
        "section": "",
        "mode": "man",
        "summary": "choom - display and adjust OOM-killer score.  choom -p PID  choom -p PID -n number  choom -n number [--] command [argument ...]",
        "synopsis": null,
        "tldr_summary": "Display and change the adjust out-of-memory killer score.",
        "tldr_examples": [
            {
                "description": "Display the OOM-killer score of the process with a specific ID",
                "command": "choom {{-p|--pid}} {{pid}}"
            },
            {
                "description": "Change the adjust OOM-killer score of a specific process",
                "command": "choom {{-p|--pid}} {{pid}} {{-n|--adjust}} {{1000..+1000}}"
            },
            {
                "description": "Run a command with a specific adjust OOM-killer score",
                "command": "choom {{-n|--adjust}} {{1000..+1000}} {{command}} {{argument1 argument2 ...}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-p",
                "long": "--pid",
                "arg": null,
                "description": "Specifies process ID."
            },
            {
                "flag": "-n",
                "long": "--adjust",
                "arg": null,
                "description": "Specify the adjust score value."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "proc",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-p --pid",
                        "lines": 2,
                        "flag": "-p",
                        "long": "--pid"
                    },
                    {
                        "name": "-n --adjust",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--adjust"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "choom - display and adjust OOM-killer score.\n\nchoom -p PID\n\nchoom -p PID -n number\n\nchoom -n number [--] command [argument ...]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The choom command displays and adjusts Out-Of-Memory killer score setting.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-p --pid",
                        "content": "Specifies process ID.\n",
                        "flag": "-p",
                        "long": "--pid"
                    },
                    {
                        "name": "-n --adjust",
                        "content": "Specify the adjust score value.\n",
                        "flag": "-n",
                        "long": "--adjust"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information and exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "NOTES": {
                "content": "Linux kernel uses the badness heuristic to select which process gets killed in out of memory\nconditions.\n\nThe badness heuristic assigns a value to each candidate task ranging from 0 (never kill) to\n1000 (always kill) to determine which process is targeted. The units are roughly a proportion\nalong that range of allowed memory the process may allocate from based on an estimation of\nits current memory and swap use. For example, if a task is using all allowed memory, its\nbadness score will be 1000. If it is using half of its allowed memory, its score will be 500.\n\nThere is an additional factor included in the badness score: the current memory and swap\nusage is discounted by 3% for root processes.\n\nThe amount of \"allowed\" memory depends on the context in which the oom killer was called. If\nit is due to the memory assigned to the allocating task’s cpuset being exhausted, the allowed\nmemory represents the set of mems assigned to that cpuset. If it is due to a mempolicy’s\nnode(s) being exhausted, the allowed memory represents the set of mempolicy nodes. If it is\ndue to a memory limit (or swap limit) being reached, the allowed memory is that configured\nlimit. Finally, if it is due to the entire system being out of memory, the allowed memory\nrepresents all allocatable resources.\n\nThe adjust score value is added to the badness score before it is used to determine which\ntask to kill. Acceptable values range from -1000 to +1000. This allows userspace to polarize\nthe preference for oom killing either by always preferring a certain task or completely\ndisabling it. The lowest possible value, -1000, is equivalent to disabling oom killing\nentirely for that task since it will always report a badness score of 0.\n\nSetting an adjust score value of +500, for example, is roughly equivalent to allowing the\nremainder of tasks sharing the same system, cpuset, mempolicy, or memory controller resources\nto use at least 50% more memory. A value of -500, on the other hand, would be roughly\nequivalent to discounting 50% of the task’s allowed memory from being considered as scoring\nagainst the task.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Karel Zak <kzak@redhat.com>\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "proc(5)\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The choom command is part of the util-linux package which can be downloaded from Linux Kernel\nArchive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                     CHOOM(1)",
                "subsections": []
            }
        }
    }
}