From 2f75b05c240ebb52c19c2d4d3e4c72c1f6691fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Feb 2018 12:53:15 +0100 Subject: [PATCH 1/4] man: IPAccounting for slices in now allowed Also split that description into paragraphs by subject. --- man/systemd.resource-control.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml index 18b7bf8f6a..5033802c85 100644 --- a/man/systemd.resource-control.xml +++ b/man/systemd.resource-control.xml @@ -484,15 +484,17 @@ Takes a boolean argument. If true, turns on IPv4 and IPv6 network traffic accounting for packets sent or received by the unit. When this option is turned on, all IPv4 and IPv6 sockets created by any process of - the unit are accounted for. When this option is used in socket units, it applies to all IPv4 and IPv6 sockets + the unit are accounted for. + + When this option is used in socket units, it applies to all IPv4 and IPv6 sockets associated with it (including both listening and connection sockets where this applies). Note that for socket-activated services, this configuration setting and the accounting data of the service unit and the socket unit are kept separate, and displayed separately. No propagation of the setting and the collected statistics is done, in either direction. Moreover, any traffic sent or received on any of the socket unit's sockets is accounted to the socket unit — and never to the service unit it might have activated, even if the - socket is used by it. Note that IP accounting is currently not supported for slice units, and enabling this - option for them has no effect. The system default for this setting may be controlled with - DefaultIPAccounting= in + socket is used by it. + + The system default for this setting may be controlled with DefaultIPAccounting= in systemd-system.conf5. From da5e955fbd11becb7f12430c1cf4a9cc5a5341f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Feb 2018 12:58:53 +0100 Subject: [PATCH 2/4] systemctl,man: use UNIT as the placeholder for a unit name NAME is kind of meaningless, because everything has a name. "Unit" makes it more obvious that a name of a unit is necessary. I was always momentarily baffled by "set-property NAME ASSIGNMENT...", where there are two objects (the unit and the property), and it's not clear which of the two "NAME" is supposed to signify. --- man/systemctl.xml | 38 ++++++++++++++++---------------- src/systemctl/systemctl.c | 46 +++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index 60882e5aa3..a638ff5396 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -58,7 +58,7 @@ systemctl OPTIONS COMMAND - NAME + UNIT @@ -835,7 +835,7 @@ Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago - isolate NAME + isolate UNIT Start the unit specified on the command line and its dependencies @@ -1004,7 +1004,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - set-property NAME ASSIGNMENT + set-property UNIT ASSIGNMENT Set the specified unit properties at runtime where @@ -1059,7 +1059,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err list-dependencies - NAME + UNIT @@ -1101,7 +1101,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - enable NAME + enable UNIT enable PATH @@ -1152,7 +1152,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - disable NAME + disable UNIT Disables one or more units. This removes all symlinks to the unit files backing the specified units @@ -1184,7 +1184,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - reenable NAME + reenable UNIT Reenable one or more units, as specified on the command line. This is a combination of @@ -1195,7 +1195,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - preset NAME + preset UNIT Reset the enable/disable status one or more unit files, as specified on @@ -1208,7 +1208,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err enabled and disabled, or only enabled, or only disabled. If the unit carries no install information, it will be silently ignored - by this command. NAME must be the real unit name, + by this command. UNIT must be the real unit name, any alias names are ignored silently. For more information on the preset policy format, see @@ -1233,7 +1233,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - is-enabled NAME + is-enabled UNIT Checks whether any of the specified unit files are @@ -1320,7 +1320,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - mask NAME + mask UNIT Mask one or more units, as specified on the command line. This will link these unit files to @@ -1334,7 +1334,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - unmask NAME + unmask UNIT Unmask one or more unit files, as specified on the command line. This will undo the effect of @@ -1355,7 +1355,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - revert NAME + revert UNIT Revert one or more unit files to their vendor versions. This command removes drop-in configuration @@ -1378,9 +1378,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err add-wants TARGET - NAME + UNITadd-requires TARGET - NAME + UNIT Adds Wants= or Requires= @@ -1396,7 +1396,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - edit NAME + edit UNIT Edit a drop-in snippet or a whole replacement file if @@ -1446,7 +1446,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - set-default NAME + set-default TARGET Set the default target to boot into. This sets @@ -1869,7 +1869,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Parameter Syntax - Unit commands listed above take either a single unit name (designated as NAME), + Unit commands listed above take either a single unit name (designated as UNIT), or multiple unit specifications (designated as PATTERN…). In the first case, the unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"), systemctl will append a suitable suffix, .service by default, and a type-specific suffix in @@ -1906,7 +1906,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err in memory are not considered for glob expansion. - For unit file commands, the specified NAME should be the name of the unit file + For unit file commands, the specified UNIT should be the name of the unit file (possibly abbreviated, see above), or the absolute path to the unit file: # systemctl enable foo.service or diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 6eec0171c6..537c91a15d 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7252,53 +7252,53 @@ static void systemctl_help(void) { " by address\n" " list-timers [PATTERN...] List timer units currently in memory, ordered\n" " by next elapse\n" - " start NAME... Start (activate) one or more units\n" - " stop NAME... Stop (deactivate) one or more units\n" - " reload NAME... Reload one or more units\n" - " restart NAME... Start or restart one or more units\n" - " try-restart NAME... Restart one or more units if active\n" - " reload-or-restart NAME... Reload one or more units if possible,\n" + " start UNIT... Start (activate) one or more units\n" + " stop UNIT... Stop (deactivate) one or more units\n" + " reload UNIT... Reload one or more units\n" + " restart UNIT... Start or restart one or more units\n" + " try-restart UNIT... Restart one or more units if active\n" + " reload-or-restart UNIT... Reload one or more units if possible,\n" " otherwise start or restart\n" - " try-reload-or-restart NAME... If active, reload one or more units,\n" + " try-reload-or-restart UNIT... If active, reload one or more units,\n" " if supported, otherwise restart\n" - " isolate NAME Start one unit and stop all others\n" - " kill NAME... Send signal to processes of a unit\n" + " isolate UNIT Start one unit and stop all others\n" + " kill UNIT... Send signal to processes of a unit\n" " is-active PATTERN... Check whether units are active\n" " is-failed PATTERN... Check whether units are failed\n" " status [PATTERN...|PID...] Show runtime status of one or more units\n" " show [PATTERN...|JOB...] Show properties of one or more\n" " units/jobs or the manager\n" " cat PATTERN... Show files and drop-ins of one or more units\n" - " set-property NAME ASSIGNMENT... Sets one or more properties of a unit\n" + " set-property UNIT ASSIGNMENT... Sets one or more properties of a unit\n" " help PATTERN...|PID... Show manual for one or more units\n" " reset-failed [PATTERN...] Reset failed state for all, one, or more\n" " units\n" - " list-dependencies [NAME] Recursively show units which are required\n" + " list-dependencies [UNIT] Recursively show units which are required\n" " or wanted by this unit or by which this\n" " unit is required or wanted\n\n" "Unit File Commands:\n" " list-unit-files [PATTERN...] List installed unit files\n" - " enable [NAME...|PATH...] Enable one or more unit files\n" - " disable NAME... Disable one or more unit files\n" - " reenable NAME... Reenable one or more unit files\n" - " preset NAME... Enable/disable one or more unit files\n" + " enable [UNIT...|PATH...] Enable one or more unit files\n" + " disable UNIT... Disable one or more unit files\n" + " reenable UNIT... Reenable one or more unit files\n" + " preset UNIT... Enable/disable one or more unit files\n" " based on preset configuration\n" " preset-all Enable/disable all unit files based on\n" " preset configuration\n" - " is-enabled NAME... Check whether unit files are enabled\n" - " mask NAME... Mask one or more units\n" - " unmask NAME... Unmask one or more units\n" + " is-enabled UNIT... Check whether unit files are enabled\n" + " mask UNIT... Mask one or more units\n" + " unmask UNIT... Unmask one or more units\n" " link PATH... Link one or more units files into\n" " the search path\n" - " revert NAME... Revert one or more unit files to vendor\n" + " revert UNIT... Revert one or more unit files to vendor\n" " version\n" - " add-wants TARGET NAME... Add 'Wants' dependency for the target\n" + " add-wants TARGET UNIT... Add 'Wants' dependency for the target\n" " on specified one or more units\n" - " add-requires TARGET NAME... Add 'Requires' dependency for the target\n" + " add-requires TARGET UNIT... Add 'Requires' dependency for the target\n" " on specified one or more units\n" - " edit NAME... Edit one or more unit files\n" + " edit UNIT... Edit one or more unit files\n" " get-default Get the name of the default target\n" - " set-default NAME Set the default target\n\n" + " set-default TARGET Set the default target\n\n" "Machine Commands:\n" " list-machines [PATTERN...] List local containers and host\n\n" "Job Commands:\n" From fbf3283bdd3a41abecef84b3b5f5626c2c4073c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Feb 2018 14:37:02 +0100 Subject: [PATCH 3/4] systemctl,man: use PROPERTY as the placeholder for a property name --- man/systemctl.xml | 10 +-- src/systemctl/systemctl.c | 146 +++++++++++++++++++------------------- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index a638ff5396..c311548f4b 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1004,7 +1004,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - set-property UNIT ASSIGNMENT + set-property UNIT PROPERTY=VALUE Set the specified unit properties at runtime where @@ -1013,7 +1013,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err runtime. Not all properties may be changed at runtime, but many resource control settings (primarily those in systemd.resource-control5) - may. The changes are applied instantly, and stored on disk + may. The changes are applied immediately, and stored on disk for future boots, unless is passed, in which case the settings only apply until the next reboot. The syntax of the property assignment follows @@ -1028,9 +1028,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Note that this command allows changing multiple properties at the same time, which is preferable over - setting them individually. Like unit file configuration - settings, assigning the empty list to list parameters will - reset the list. + setting them individually. Like with unit file configuration + settings, assigning an empty list will reset the property. + diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 537c91a15d..2a33fd076d 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7247,85 +7247,85 @@ static void systemctl_help(void) { " --firmware-setup Tell the firmware to show the setup menu on next boot\n" " --plain Print unit dependencies as a list instead of a tree\n\n" "Unit Commands:\n" - " list-units [PATTERN...] List units currently in memory\n" - " list-sockets [PATTERN...] List socket units currently in memory, ordered\n" - " by address\n" - " list-timers [PATTERN...] List timer units currently in memory, ordered\n" - " by next elapse\n" - " start UNIT... Start (activate) one or more units\n" - " stop UNIT... Stop (deactivate) one or more units\n" - " reload UNIT... Reload one or more units\n" - " restart UNIT... Start or restart one or more units\n" - " try-restart UNIT... Restart one or more units if active\n" - " reload-or-restart UNIT... Reload one or more units if possible,\n" - " otherwise start or restart\n" - " try-reload-or-restart UNIT... If active, reload one or more units,\n" - " if supported, otherwise restart\n" - " isolate UNIT Start one unit and stop all others\n" - " kill UNIT... Send signal to processes of a unit\n" - " is-active PATTERN... Check whether units are active\n" - " is-failed PATTERN... Check whether units are failed\n" - " status [PATTERN...|PID...] Show runtime status of one or more units\n" - " show [PATTERN...|JOB...] Show properties of one or more\n" - " units/jobs or the manager\n" - " cat PATTERN... Show files and drop-ins of one or more units\n" - " set-property UNIT ASSIGNMENT... Sets one or more properties of a unit\n" - " help PATTERN...|PID... Show manual for one or more units\n" - " reset-failed [PATTERN...] Reset failed state for all, one, or more\n" - " units\n" - " list-dependencies [UNIT] Recursively show units which are required\n" - " or wanted by this unit or by which this\n" - " unit is required or wanted\n\n" + " list-units [PATTERN...] List units currently in memory\n" + " list-sockets [PATTERN...] List socket units currently in memory,\n" + " ordered by address\n" + " list-timers [PATTERN...] List timer units currently in memory,\n" + " ordered by next elapse\n" + " start UNIT... Start (activate) one or more units\n" + " stop UNIT... Stop (deactivate) one or more units\n" + " reload UNIT... Reload one or more units\n" + " restart UNIT... Start or restart one or more units\n" + " try-restart UNIT... Restart one or more units if active\n" + " reload-or-restart UNIT... Reload one or more units if possible,\n" + " otherwise start or restart\n" + " try-reload-or-restart UNIT... If active, reload one or more units,\n" + " if supported, otherwise restart\n" + " isolate UNIT Start one unit and stop all others\n" + " kill UNIT... Send signal to processes of a unit\n" + " is-active PATTERN... Check whether units are active\n" + " is-failed PATTERN... Check whether units are failed\n" + " status [PATTERN...|PID...] Show runtime status of one or more units\n" + " show [PATTERN...|JOB...] Show properties of one or more\n" + " units/jobs or the manager\n" + " cat PATTERN... Show files and drop-ins of specified units\n" + " set-property UNIT PROPERTY=VALUE... Sets one or more properties of a unit\n" + " help PATTERN...|PID... Show manual for one or more units\n" + " reset-failed [PATTERN...] Reset failed state for all, one, or more\n" + " units\n" + " list-dependencies [UNIT] Recursively show units which are required\n" + " or wanted by this unit or by which this\n" + " unit is required or wanted\n\n" "Unit File Commands:\n" - " list-unit-files [PATTERN...] List installed unit files\n" - " enable [UNIT...|PATH...] Enable one or more unit files\n" - " disable UNIT... Disable one or more unit files\n" - " reenable UNIT... Reenable one or more unit files\n" - " preset UNIT... Enable/disable one or more unit files\n" - " based on preset configuration\n" - " preset-all Enable/disable all unit files based on\n" - " preset configuration\n" - " is-enabled UNIT... Check whether unit files are enabled\n" - " mask UNIT... Mask one or more units\n" - " unmask UNIT... Unmask one or more units\n" - " link PATH... Link one or more units files into\n" - " the search path\n" - " revert UNIT... Revert one or more unit files to vendor\n" - " version\n" - " add-wants TARGET UNIT... Add 'Wants' dependency for the target\n" - " on specified one or more units\n" - " add-requires TARGET UNIT... Add 'Requires' dependency for the target\n" - " on specified one or more units\n" - " edit UNIT... Edit one or more unit files\n" - " get-default Get the name of the default target\n" - " set-default TARGET Set the default target\n\n" + " list-unit-files [PATTERN...] List installed unit files\n" + " enable [UNIT...|PATH...] Enable one or more unit files\n" + " disable UNIT... Disable one or more unit files\n" + " reenable UNIT... Reenable one or more unit files\n" + " preset UNIT... Enable/disable one or more unit files\n" + " based on preset configuration\n" + " preset-all Enable/disable all unit files based on\n" + " preset configuration\n" + " is-enabled UNIT... Check whether unit files are enabled\n" + " mask UNIT... Mask one or more units\n" + " unmask UNIT... Unmask one or more units\n" + " link PATH... Link one or more units files into\n" + " the search path\n" + " revert UNIT... Revert one or more unit files to vendor\n" + " version\n" + " add-wants TARGET UNIT... Add 'Wants' dependency for the target\n" + " on specified one or more units\n" + " add-requires TARGET UNIT... Add 'Requires' dependency for the target\n" + " on specified one or more units\n" + " edit UNIT... Edit one or more unit files\n" + " get-default Get the name of the default target\n" + " set-default TARGET Set the default target\n\n" "Machine Commands:\n" - " list-machines [PATTERN...] List local containers and host\n\n" + " list-machines [PATTERN...] List local containers and host\n\n" "Job Commands:\n" - " list-jobs [PATTERN...] List jobs\n" - " cancel [JOB...] Cancel all, one, or more jobs\n\n" + " list-jobs [PATTERN...] List jobs\n" + " cancel [JOB...] Cancel all, one, or more jobs\n\n" "Environment Commands:\n" - " show-environment Dump environment\n" - " set-environment NAME=VALUE... Set one or more environment variables\n" - " unset-environment NAME... Unset one or more environment variables\n" - " import-environment [NAME...] Import all or some environment variables\n\n" + " show-environment Dump environment\n" + " set-environment NAME=VALUE... Set one or more environment variables\n" + " unset-environment NAME... Unset one or more environment variables\n" + " import-environment [NAME...] Import all or some environment variables\n\n" "Manager Lifecycle Commands:\n" - " daemon-reload Reload systemd manager configuration\n" - " daemon-reexec Reexecute systemd manager\n\n" + " daemon-reload Reload systemd manager configuration\n" + " daemon-reexec Reexecute systemd manager\n\n" "System Commands:\n" - " is-system-running Check whether system is fully running\n" - " default Enter system default mode\n" - " rescue Enter system rescue mode\n" - " emergency Enter system emergency mode\n" - " halt Shut down and halt the system\n" - " poweroff Shut down and power-off the system\n" - " reboot [ARG] Shut down and reboot the system\n" - " kexec Shut down and reboot the system with kexec\n" - " exit [EXIT_CODE] Request user instance or container exit\n" - " switch-root ROOT [INIT] Change to a different root file system\n" - " suspend Suspend the system\n" - " hibernate Hibernate the system\n" - " hybrid-sleep Hibernate and suspend the system\n", + " is-system-running Check whether system is fully running\n" + " default Enter system default mode\n" + " rescue Enter system rescue mode\n" + " emergency Enter system emergency mode\n" + " halt Shut down and halt the system\n" + " poweroff Shut down and power-off the system\n" + " reboot [ARG] Shut down and reboot the system\n" + " kexec Shut down and reboot the system with kexec\n" + " exit [EXIT_CODE] Request user instance or container exit\n" + " switch-root ROOT [INIT] Change to a different root file system\n" + " suspend Suspend the system\n" + " hibernate Hibernate the system\n" + " hybrid-sleep Hibernate and suspend the system\n", program_invocation_short_name); } From 135775c156eebd046bea4d01f7cb1237e5775bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Feb 2018 14:39:06 +0100 Subject: [PATCH 4/4] systemctl: use VARIABLE as the placeholder for a variable name The man page was already using VARIABLE=VALUE, so no change there. --- src/systemctl/systemctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 2a33fd076d..01cce28038 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7306,9 +7306,9 @@ static void systemctl_help(void) { " cancel [JOB...] Cancel all, one, or more jobs\n\n" "Environment Commands:\n" " show-environment Dump environment\n" - " set-environment NAME=VALUE... Set one or more environment variables\n" - " unset-environment NAME... Unset one or more environment variables\n" - " import-environment [NAME...] Import all or some environment variables\n\n" + " set-environment VARIABLE=VALUE... Set one or more environment variables\n" + " unset-environment VARIABLE... Unset one or more environment variables\n" + " import-environment [VARIABLE...] Import all or some environment variables\n\n" "Manager Lifecycle Commands:\n" " daemon-reload Reload systemd manager configuration\n" " daemon-reexec Reexecute systemd manager\n\n"