{
    "content": [
        {
            "type": "text",
            "text": "# systemd.scope(5) (man)\n\n**Summary:** systemd.scope - Scope unit configuration\n\n**Synopsis:** scope.scope\n\n## See Also\n\n- systemd(1)\n- systemd-run(1)\n- systemd.unit(5)\n- systemd.resource-control(5)\n- systemd.service(5)\n- systemd.directives(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (25 lines)\n- **AUTOMATIC DEPENDENCIES** (1 lines) — 2 subsections\n  - Implicit Dependencies (3 lines)\n  - Default Dependencies (7 lines)\n- **OPTIONS** (10 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (6 lines)\n\n## Full Content\n\n### NAME\n\nsystemd.scope - Scope unit configuration\n\n### SYNOPSIS\n\nscope.scope\n\n### DESCRIPTION\n\nScope units are not configured via unit configuration files, but are only created\nprogrammatically using the bus interfaces of systemd. They are named similar to filenames. A\nunit whose name ends in \".scope\" refers to a scope unit. Scopes units manage a set of system\nprocesses. Unlike service units, scope units manage externally created processes, and do not\nfork off processes on its own.\n\nThe main purpose of scope units is grouping worker processes of a system service for\norganization and for managing resources.\n\nsystemd-run --scope may be used to easily launch a command in a new scope unit from the\ncommand line.\n\nSee the New Control Group Interfaces[1] for an introduction on how to make use of scope units\nfrom programs.\n\nNote that, unlike service units, scope units have no \"main\" process: all processes in the\nscope are equivalent. The lifecycle of the scope unit is thus not bound to the lifetime of\none specific process, but to the existence of at least one process in the scope. This also\nmeans that the exit statuses of these processes are not relevant for the scope unit failure\nstate. Scope units may still enter a failure state, for example due to resource exhaustion or\nstop timeouts being reached, but not due to programs inside of them terminating uncleanly.\nSince processes managed as scope units generally remain children of the original process that\nforked them off, it is also the job of that process to collect their exit statuses and act on\nthem as needed.\n\n### AUTOMATIC DEPENDENCIES\n\n#### Implicit Dependencies\n\nImplicit dependencies may be added as result of resource control parameters as documented in\nsystemd.resource-control(5).\n\n#### Default Dependencies\n\nThe following dependencies are added unless DefaultDependencies=no is set:\n\n•   Scope units will automatically have dependencies of type Conflicts= and Before= on\nshutdown.target. These ensure that scope units are removed prior to system shutdown. Only\nscope units involved with early boot or late system shutdown should disable\nDefaultDependencies= option.\n\n### OPTIONS\n\nScope files may include a [Scope] section, which carries information about the scope and the\nunits it contains. A number of options that may be used in this section are shared with other\nunit types. These options are documented in systemd.kill(5) and systemd.resource-control(5).\nThe options specific to the [Scope] section of scope units are the following:\n\nRuntimeMaxSec=\nConfigures a maximum time for the scope to run. If this is used and the scope has been\nactive for longer than the specified time it is terminated and put into a failure state.\nPass \"infinity\" (the default) to configure no runtime limit.\n\n### SEE ALSO\n\nsystemd(1), systemd-run(1), systemd.unit(5), systemd.resource-control(5), systemd.service(5),\nsystemd.directives(7).\n\n### NOTES\n\n1. New Control Group Interfaces\nhttps://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/\n\n\n\nsystemd 249                                                                         SYSTEMD.SCOPE(5)\n\n"
        }
    ],
    "structuredContent": {
        "command": "systemd.scope",
        "section": "5",
        "mode": "man",
        "summary": "systemd.scope - Scope unit configuration",
        "synopsis": "scope.scope",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemd-run",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-run/1/json"
            },
            {
                "name": "systemd.unit",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
            },
            {
                "name": "systemd.resource-control",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.resource-control/5/json"
            },
            {
                "name": "systemd.service",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
            },
            {
                "name": "systemd.directives",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "AUTOMATIC DEPENDENCIES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Implicit Dependencies",
                        "lines": 3
                    },
                    {
                        "name": "Default Dependencies",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}