{"id":4454,"date":"2022-12-20T17:49:21","date_gmt":"2022-12-20T20:49:21","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemd-scope-man5\/"},"modified":"2022-12-20T17:49:21","modified_gmt":"2022-12-20T20:49:21","slug":"systemd-scope-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemd-scope-man5\/","title":{"rendered":"SYSTEMD.SCOPE (man5)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD.SCOPE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#AUTOMATIC DEPENDENCIES\">AUTOMATIC DEPENDENCIES<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd.scope \u2212 Scope unit configuration<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>scope<\/i>.scope<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Scope units are not configured via unit configuration files, but are only created programmatically using the bus interfaces of systemd. They are named similar to filenames. A unit whose name ends in &#8220;.scope&#8221; refers to a scope unit. Scopes units manage a set of system processes. Unlike service units, scope units manage externally created processes, and do not fork off processes on its own.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The main purpose of scope units is grouping worker processes of a system service for organization and for managing resources.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212run \u2212\u2212scope<\/b> may be used to easily launch a command in a new scope unit from the command line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b><font color=\"#0000FF\">New Control Group Interfaces<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">for an introduction on how to make use of scope units from programs.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Note that, unlike service units, scope units have no &#8220;main&#8221; process: all processes in the scope are equivalent. The lifecycle of the scope unit is thus not bound to the lifetime of one specific process, but to the existence of at least one process in the scope. This also means that the exit statuses of these processes are not relevant for the scope unit failure state. Scope units may still enter a failure state, for example due to resource exhaustion or stop timeouts being reached, but not due to programs inside of them terminating uncleanly. Since processes managed as scope units generally remain children of the original process that forked them off, it is also the job of that process to collect their exit statuses and act on them as needed.<\/font><\/p>\n<h2>AUTOMATIC DEPENDENCIES <a name=\"AUTOMATIC DEPENDENCIES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Implicit Dependencies<\/b> <br \/> Implicit dependencies may be added as result of resource control parameters as documented in <b>systemd.resource-control<\/b>(5).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Default Dependencies<\/b> <br \/> The following dependencies are added unless <i>DefaultDependencies=no<\/i> is set:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 Scope units will automatically have dependencies of type <i>Conflicts=<\/i> and <i>Before=<\/i> on shutdown.target. These ensure that scope units are removed prior to system shutdown. Only scope units involved with early boot or late system shutdown should disable <i>DefaultDependencies=<\/i> option.<\/font><\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Scope files may include a [Scope] section, which carries information about the scope and the units it contains. A number of options that may be used in this section are shared with other unit types. These options are documented in <b>systemd.kill<\/b>(5) and <b>systemd.resource-control<\/b>(5). The options specific to the [Scope] section of scope units are the following:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>RuntimeMaxSec=<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Configures a maximum time for the scope to run. If this is used and the scope has been active for longer than the specified time it is terminated and put into a failure state. Pass &#8220;infinity&#8221; (the default) to configure no runtime limit.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd<\/b>(1), <b>systemd-run<\/b>(1), <b>systemd.unit<\/b>(5), <b>systemd.resource-control<\/b>(5), <b>systemd.service<\/b>(5), <b>systemd.directives<\/b>(7).<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">New Control Group Interfaces<\/font><\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/ControlGroupInterface\/<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd.scope \u2212 Scope unit configuration <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,978],"class_list":["post-4454","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-systemd"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4454"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4454\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}