diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-04-02 08:01:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 08:01:42 +0900 |
commit | 3f8f021541c58ca2fd8d05b7808c7395b90d6937 (patch) | |
tree | 0a82d5bfe1c6066edbe42887d767cefc6f9057a1 /man | |
parent | 1589231365e9f98270451a19175416cf7699aa0e (diff) | |
parent | a70984c049017d9b58f00dd3e15237a609593df1 (diff) | |
download | systemd-3f8f021541c58ca2fd8d05b7808c7395b90d6937.tar.gz |
Merge pull request #12030 from poettering/condition-memory
add ConditionCPUs= + ConditionMemory=
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.unit.xml | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 9281c2c4ae..6fee4c2faf 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1002,6 +1002,8 @@ <term><varname>ConditionUser=</varname></term> <term><varname>ConditionGroup=</varname></term> <term><varname>ConditionControlGroupController=</varname></term> + <term><varname>ConditionMemory=</varname></term> + <term><varname>ConditionCPUs=</varname></term> <!-- We do not document ConditionNull= here, as it is not particularly @@ -1117,11 +1119,12 @@ the exact assignment is looked for with right and left hand side matching.</para> - <para><varname>ConditionKernelVersion=</varname> may be used to check whether the kernel version (as reported - by <command>uname -r</command>) matches a certain expression (or if prefixed with the exclamation mark does not - match it). The argument must be a single string. If the string starts with one of <literal><</literal>, - <literal><=</literal>, <literal>=</literal>, <literal>>=</literal>, <literal>></literal> a relative - version comparison is done, otherwise the specified string is matched with shell-style globs.</para> + <para><varname>ConditionKernelVersion=</varname> may be used to check whether the kernel version (as + reported by <command>uname -r</command>) matches a certain expression (or if prefixed with the + exclamation mark does not match it). The argument must be a single string. If the string starts with + one of <literal><</literal>, <literal><=</literal>, <literal>=</literal>, + <literal>!=</literal>, <literal>>=</literal>, <literal>></literal> a relative version + comparison is done, otherwise the specified string is matched with shell-style globs.</para> <para>Note that using the kernel version string is an unreliable way to determine which features are supported by a kernel, because of the widespread practice of backporting drivers, features, and fixes from newer upstream @@ -1255,6 +1258,24 @@ <literal>blkio</literal>, <literal>memory</literal>, <literal>devices</literal>, and <literal>pids</literal>.</para> + <para><varname>ConditionMemory=</varname> verifies if the specified amount of system memory is + available to the current system. Takes a memory size in bytes as argument, optionally prefixed with a + comparison operator <literal><</literal>, <literal><=</literal>, <literal>=</literal>, + <literal>!=</literal>, <literal>>=</literal>, <literal>></literal>. On bare-metal systems + compares the amount of physical memory in the system with the specified size, adhering to the + specified comparison operator. In containers compares the amount of memory assigned to the container + instead.</para> + + <para><varname>ConditionCPUs=</varname> verifies if the specified number of CPUs is available to the + current system. Takes a number of CPUs as argument, optionally prefixed with a comparison operator + <literal><</literal>, <literal><=</literal>, <literal>=</literal>, <literal>!=</literal>, + <literal>>=</literal>, <literal>></literal>. Compares the number of CPUs in the CPU affinity mask + configured of the service manager itself with the specified number, adhering to the specified + comparision operator. On physical systems the number of CPUs in the affinity mask of the service + manager usually matches the number of physical CPUs, but in special and virtual environments might + differ. In particular, in containers the affinity mask usually matches the number of CPUs assigned to + the container and not the physically available ones.</para> + <para>If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a logical AND is applied). Condition checks can be prefixed with a pipe symbol (|) in |