summaryrefslogtreecommitdiff
path: root/Software/systemd/ControlGroupInterface.mdwn
diff options
context:
space:
mode:
authorLennartPoettering <LennartPoettering@web>2013-09-27 10:23:17 -0700
committerwww <iki-www@freedesktop.org>2013-09-27 10:23:17 -0700
commitc027a2b47b1db7d475017938d9753f76c18f0dff (patch)
treefd1c60beaeba756c29bf57768dea452853370a4c /Software/systemd/ControlGroupInterface.mdwn
parent92666a4a39de940d62234c5351f1ec092e44f41a (diff)
Diffstat (limited to 'Software/systemd/ControlGroupInterface.mdwn')
-rw-r--r--Software/systemd/ControlGroupInterface.mdwn2
1 files changed, 1 insertions, 1 deletions
diff --git a/Software/systemd/ControlGroupInterface.mdwn b/Software/systemd/ControlGroupInterface.mdwn
index b7d750f3..7a7bf5d2 100644
--- a/Software/systemd/ControlGroupInterface.mdwn
+++ b/Software/systemd/ControlGroupInterface.mdwn
@@ -68,7 +68,7 @@ Most relevant APIs are exposed via D-Bus. To create and start a unit in the cgro
The properties array of `StartTransientUnit()` may take many of the settings that may also be configured in unit files. Not all parameters are currently accepted though, but we plan to cover more properties with future release. Currently you may set the `Description`, `Slice` and all dependency types of units, as well as `RemainAfterExit`, `ExecStart` for service units, `TimeoutStopUSec` and `PIDs` for scope units, and `CPUAccounting`, `CPUShares`, `BlockIOAccounting`, `BlockIOWeight`, `BlockIOReadBandwidth`, `BlockIOWriteBandwidth`, `BlockIODeviceWeight`, `MemoryAccounting`, `MemoryLimit`, `DevicePolicy`, `DeviceAllow` for services/scopes/slices. These fields map directly to their counterparts in unit files and as normal D-Bus object properties. The exception here is the `PIDs` field of scope units which is used for construction of the scope only and specifies the initial PIDs to add to the scope object.
-To alter resource control properties at runtime use the `SetUnitProperty()` call on the `Manager` object or `SetProperty()` on the individual Unit objects. This also takes an array of properties to set, in the same format as `StartTransientUnit()` takes. Note again that this is not a dictionary, and allows properties to be set multiple times with a single invocation. THis is useful for array properties: if a property is assigned the empty array it will be reset to the empty array itself, however if it is assigned a non-empty array then this array is appended to the previous array. This mimics behaviour of array settings in unit files. Note that most settings may only be set during creation of units with `StartTransientUnit()`, and may not be altered later on. The exception here are the resource control settings, more specifically `CPUAccounting`, `CPUShares`, `BlockIOAccounting`, `BlockIOWeight`, `BlockIOReadBandwidth`, `BlockIOWriteBandwidth`, `BlockIODeviceWeight`, `MemoryAccounting`, `MemoryLimit`, `DevicePolicy`, `DeviceAllow` for services/scopes/slices.
+To alter resource control properties at runtime use the `SetUnitProperty()` call on the `Manager` object or `SetProperty()` on the individual Unit objects. This also takes an array of properties to set, in the same format as `StartTransientUnit()` takes. Note again that this is not a dictionary, and allows properties to be set multiple times with a single invocation. THis is useful for array properties: if a property is assigned the empty array it will be reset to the empty array itself, however if it is assigned a non-empty array then this array is appended to the previous array. This mimics behaviour of array settings in unit files. Note that most settings may only be set during creation of units with `StartTransientUnit()`, and may not be altered later on. The exception here are the resource control settings, more specifically `CPUAccounting`, `CPUShares`, `BlockIOAccounting`, `BlockIOWeight`, `BlockIOReadBandwidth`, `BlockIOWriteBandwidth`, `BlockIODeviceWeight`, `MemoryAccounting`, `MemoryLimit`, `DevicePolicy`, `DeviceAllow` for services/scopes/slices. Note that the standard D-Bus `org.freedesktop.DBus.Properties.Set()` call is currently not supported by any of the unit objects to set these properties, but might eventually (note however, that it is substantially less useful as it only allows setting a single property at a time, resulting in races).
The [[`systemctl set-property`|http://www.freedesktop.org/software/systemd/man/systemctl.html]] command internally is little more than a wrapper around `SetUnitProperty()`. The [[`systemd-run`|http://www.freedesktop.org/software/systemd/man/systemd-run.html]] tool is a wrapper around `StartTransientUnit()`. It may be used to either run a process as a transient service in the background, where it is invoked from PID 1, or alternatively as a scope unit in the foreground, where it is run from the `systemd-run` process itself.