{
    "content": [
        {
            "type": "text",
            "text": "# prlimit(1) (man)\n\n**Summary:** prlimit - get and set process resource limits\n\n**Synopsis:** prlimit [options] [--resource[=limits]] [--pid PID]\nprlimit [options] [--resource[=limits]] command [argument...]\n\n## Examples\n\n- `Display limit values for all current resources.`\n- `Display the limits of the RSS, and set the soft and hard limits for the number of open`\n- `files to 1024 and 4095, respectively.`\n- `Modify only the soft limit for the number of processes.`\n- `Set for the current process both the soft and ceiling values for the number of processes`\n- `to unlimited.`\n- `Set both the soft and hard CPU time limit to ten seconds and run 'sort'.`\n\n## See Also\n\n- ulimit(1p)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (22 lines)\n- **GENERAL OPTIONS** (1 lines) — 7 subsections\n  - -h, --help (2 lines)\n  - --noheadings (2 lines)\n  - -o, --output (3 lines)\n  - -p, --pid (2 lines)\n  - --raw (2 lines)\n  - --verbose (2 lines)\n  - -V, --version (2 lines)\n- **RESOURCE OPTIONS** (1 lines) — 16 subsections\n  - -c, --core (2 lines)\n  - -d, --data (2 lines)\n  - -e, --nice (2 lines)\n  - -f, --fsize (2 lines)\n  - -i, --sigpending (2 lines)\n  - -l, --memlock (2 lines)\n  - -m, --rss (2 lines)\n  - -n, --nofile (2 lines)\n  - -q, --msgqueue (2 lines)\n  - -r, --rtprio (2 lines)\n  - -s, --stack (2 lines)\n  - -t, --cpu (2 lines)\n  - -u, --nproc (2 lines)\n  - -v, --as (2 lines)\n  - -x, --locks (2 lines)\n  - -y, --rttime (2 lines)\n- **NOTES** (3 lines)\n- **EXAMPLES** (1 lines) — 5 subsections\n  - prlimit --pid 13134 (2 lines)\n  - prlimit --pid 13134 --rss --nofile=1024:4095 (3 lines)\n  - prlimit --pid 13134 --nproc=512: (2 lines)\n  - prlimit --pid $$ --nproc=unlimited (3 lines)\n  - prlimit --cpu=10 sort -u hugefile (2 lines)\n- **AUTHORS** (2 lines)\n- **SEE ALSO** (2 lines)\n- **REPORTING BUGS** (2 lines)\n- **AVAILABILITY** (6 lines)\n\n## Full Content\n\n### NAME\n\nprlimit - get and set process resource limits\n\n### SYNOPSIS\n\nprlimit [options] [--resource[=limits]] [--pid PID]\n\nprlimit [options] [--resource[=limits]] command [argument...]\n\n### DESCRIPTION\n\nGiven a process ID and one or more resources, prlimit tries to retrieve and/or modify the\nlimits.\n\nWhen command is given, prlimit will run this command with the given arguments.\n\nThe limits parameter is composed of a soft and a hard value, separated by a colon (:), in\norder to modify the existing values. If no limits are given, prlimit will display the current\nvalues. If one of the values is not given, then the existing one will be used. To specify the\nunlimited or infinity limit (RLIMINFINITY), the -1 or 'unlimited' string can be passed.\n\nBecause of the nature of limits, the soft limit must be lower or equal to the high limit\n(also called the ceiling). To see all available resource limits, refer to the RESOURCE\nOPTIONS section.\n\n•   soft:hard Specify both limits.\n\n•   soft: Specify only the soft limit.\n\n•   :hard Specify only the hard limit.\n\n•   value Specify both limits to the same value.\n\n### GENERAL OPTIONS\n\n#### -h, --help\n\nDisplay help text and exit.\n\n#### --noheadings\n\nDo not print a header line.\n\n#### -o, --output\n\nDefine the output columns to use. If no output arrangement is specified, then a default\nset is used. Use --help to get a list of all supported columns.\n\n#### -p, --pid\n\nSpecify the process id; if none is given, the running process will be used.\n\n#### --raw\n\nUse the raw output format.\n\n#### --verbose\n\nVerbose mode.\n\n#### -V, --version\n\nDisplay version information and exit.\n\n### RESOURCE OPTIONS\n\n#### -c, --core\n\nMaximum size of a core file.\n\n#### -d, --data\n\nMaximum data size.\n\n#### -e, --nice\n\nMaximum nice priority allowed to raise.\n\n#### -f, --fsize\n\nMaximum file size.\n\n#### -i, --sigpending\n\nMaximum number of pending signals.\n\n#### -l, --memlock\n\nMaximum locked-in-memory address space.\n\n#### -m, --rss\n\nMaximum Resident Set Size (RSS).\n\n#### -n, --nofile\n\nMaximum number of open files.\n\n#### -q, --msgqueue\n\nMaximum number of bytes in POSIX message queues.\n\n#### -r, --rtprio\n\nMaximum real-time priority.\n\n#### -s, --stack\n\nMaximum size of the stack.\n\n#### -t, --cpu\n\nCPU time, in seconds.\n\n#### -u, --nproc\n\nMaximum number of processes.\n\n#### -v, --as\n\nAddress space limit.\n\n#### -x, --locks\n\nMaximum number of file locks held.\n\n#### -y, --rttime\n\nTimeout for real-time tasks.\n\n### NOTES\n\nThe prlimit system call is supported since Linux 2.6.36, older kernels will break this\nprogram.\n\n### EXAMPLES\n\n#### prlimit --pid 13134\n\nDisplay limit values for all current resources.\n\n#### prlimit --pid 13134 --rss --nofile=1024:4095\n\nDisplay the limits of the RSS, and set the soft and hard limits for the number of open\nfiles to 1024 and 4095, respectively.\n\n#### prlimit --pid 13134 --nproc=512:\n\nModify only the soft limit for the number of processes.\n\n#### prlimit --pid $$ --nproc=unlimited\n\nSet for the current process both the soft and ceiling values for the number of processes\nto unlimited.\n\n#### prlimit --cpu=10 sort -u hugefile\n\nSet both the soft and hard CPU time limit to ten seconds and run 'sort'.\n\n### AUTHORS\n\nDavidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie.\n\n### SEE ALSO\n\nulimit(1p), prlimit(2)\n\n### REPORTING BUGS\n\nFor bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n\n### AVAILABILITY\n\nThe prlimit command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-07-20                                   PRLIMIT(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "prlimit",
        "section": "1",
        "mode": "man",
        "summary": "prlimit - get and set process resource limits",
        "synopsis": "prlimit [options] [--resource[=limits]] [--pid PID]\nprlimit [options] [--resource[=limits]] command [argument...]",
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "",
                "long": "--noheadings",
                "arg": null,
                "description": "Do not print a header line."
            },
            {
                "flag": "-o",
                "long": "--output",
                "arg": null,
                "description": "Define the output columns to use. If no output arrangement is specified, then a default set is used. Use --help to get a list of all supported columns."
            },
            {
                "flag": "-p",
                "long": "--pid",
                "arg": null,
                "description": "Specify the process id; if none is given, the running process will be used."
            },
            {
                "flag": "",
                "long": "--raw",
                "arg": null,
                "description": "Use the raw output format."
            },
            {
                "flag": "",
                "long": "--verbose",
                "arg": null,
                "description": "Verbose mode."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            },
            {
                "flag": "-c",
                "long": "--core",
                "arg": null,
                "description": "Maximum size of a core file."
            },
            {
                "flag": "-d",
                "long": "--data",
                "arg": null,
                "description": "Maximum data size."
            },
            {
                "flag": "-e",
                "long": "--nice",
                "arg": null,
                "description": "Maximum nice priority allowed to raise."
            },
            {
                "flag": "-f",
                "long": "--fsize",
                "arg": null,
                "description": "Maximum file size."
            },
            {
                "flag": "-i",
                "long": "--sigpending",
                "arg": null,
                "description": "Maximum number of pending signals."
            },
            {
                "flag": "-l",
                "long": "--memlock",
                "arg": null,
                "description": "Maximum locked-in-memory address space."
            },
            {
                "flag": "-m",
                "long": "--rss",
                "arg": null,
                "description": "Maximum Resident Set Size (RSS)."
            },
            {
                "flag": "-n",
                "long": "--nofile",
                "arg": null,
                "description": "Maximum number of open files."
            },
            {
                "flag": "-q",
                "long": "--msgqueue",
                "arg": null,
                "description": "Maximum number of bytes in POSIX message queues."
            },
            {
                "flag": "-r",
                "long": "--rtprio",
                "arg": null,
                "description": "Maximum real-time priority."
            },
            {
                "flag": "-s",
                "long": "--stack",
                "arg": null,
                "description": "Maximum size of the stack."
            },
            {
                "flag": "-t",
                "long": "--cpu",
                "arg": null,
                "description": "CPU time, in seconds."
            },
            {
                "flag": "-u",
                "long": "--nproc",
                "arg": null,
                "description": "Maximum number of processes."
            },
            {
                "flag": "-v",
                "long": "--as",
                "arg": null,
                "description": "Address space limit."
            },
            {
                "flag": "-x",
                "long": "--locks",
                "arg": null,
                "description": "Maximum number of file locks held."
            },
            {
                "flag": "-y",
                "long": "--rttime",
                "arg": null,
                "description": "Timeout for real-time tasks."
            }
        ],
        "examples": [
            "Display limit values for all current resources.",
            "Display the limits of the RSS, and set the soft and hard limits for the number of open",
            "files to 1024 and 4095, respectively.",
            "Modify only the soft limit for the number of processes.",
            "Set for the current process both the soft and ceiling values for the number of processes",
            "to unlimited.",
            "Set both the soft and hard CPU time limit to ten seconds and run 'sort'."
        ],
        "see_also": [
            {
                "name": "ulimit",
                "section": "1p",
                "url": "https://www.chedong.com/phpMan.php/man/ulimit/1p/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "GENERAL OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--noheadings",
                        "lines": 2,
                        "long": "--noheadings"
                    },
                    {
                        "name": "-o, --output",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--output"
                    },
                    {
                        "name": "-p, --pid",
                        "lines": 2,
                        "flag": "-p",
                        "long": "--pid"
                    },
                    {
                        "name": "--raw",
                        "lines": 2,
                        "long": "--raw"
                    },
                    {
                        "name": "--verbose",
                        "lines": 2,
                        "long": "--verbose"
                    },
                    {
                        "name": "-V, --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "RESOURCE OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-c, --core",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--core"
                    },
                    {
                        "name": "-d, --data",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--data"
                    },
                    {
                        "name": "-e, --nice",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--nice"
                    },
                    {
                        "name": "-f, --fsize",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--fsize"
                    },
                    {
                        "name": "-i, --sigpending",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--sigpending"
                    },
                    {
                        "name": "-l, --memlock",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--memlock"
                    },
                    {
                        "name": "-m, --rss",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--rss"
                    },
                    {
                        "name": "-n, --nofile",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--nofile"
                    },
                    {
                        "name": "-q, --msgqueue",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--msgqueue"
                    },
                    {
                        "name": "-r, --rtprio",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--rtprio"
                    },
                    {
                        "name": "-s, --stack",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--stack"
                    },
                    {
                        "name": "-t, --cpu",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--cpu"
                    },
                    {
                        "name": "-u, --nproc",
                        "lines": 2,
                        "flag": "-u",
                        "long": "--nproc"
                    },
                    {
                        "name": "-v, --as",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--as"
                    },
                    {
                        "name": "-x, --locks",
                        "lines": 2,
                        "flag": "-x",
                        "long": "--locks"
                    },
                    {
                        "name": "-y, --rttime",
                        "lines": 2,
                        "flag": "-y",
                        "long": "--rttime"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "prlimit --pid 13134",
                        "lines": 2
                    },
                    {
                        "name": "prlimit --pid 13134 --rss --nofile=1024:4095",
                        "lines": 3
                    },
                    {
                        "name": "prlimit --pid 13134 --nproc=512:",
                        "lines": 2
                    },
                    {
                        "name": "prlimit --pid $$ --nproc=unlimited",
                        "lines": 3
                    },
                    {
                        "name": "prlimit --cpu=10 sort -u hugefile",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}