From: Yu Watanabe Date: Mon, 1 Apr 2019 23:01:42 +0000 (+0900) Subject: Merge pull request #12030 from poettering/condition-memory X-Git-Tag: v242-rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f8f021541c58ca2fd8d05b7808c7395b90d6937;p=thirdparty%2Fsystemd.git Merge pull request #12030 from poettering/condition-memory add ConditionCPUs= + ConditionMemory= --- 3f8f021541c58ca2fd8d05b7808c7395b90d6937 diff --cc man/systemd.unit.xml index 9281c2c4ae0,e9601569ff3..6fee4c2faf1 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@@ -1251,10 -1254,28 +1254,28 @@@ be passed with a space separating them; in this case the condition will only pass if all listed controllers are available for use. Controllers unknown to systemd are ignored. Valid controllers are - , , , - , , - , and . + cpu, cpuacct, io, + blkio, memory, + devices, and pids. + ConditionMemory= 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 <, <=, =, + !=, >=, >. 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. + + ConditionCPUs= 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 + <, <=, =, !=, + >=, >. 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. + 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