From df31a6c0fe07805cb50045fbe91c2a6e7e430562 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 5 Mar 2014 03:36:22 +0100 Subject: systemd-run: add new --property= switch that can set arbitrary properties for the unit that is created The code for parsing these properties is shared with "systemctl set-property", which means all the resource control settings are immediately available. --- man/systemd-run.xml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'man/systemd-run.xml') diff --git a/man/systemd-run.xml b/man/systemd-run.xml index 064195a989..95c1cb7396 100644 --- a/man/systemd-run.xml +++ b/man/systemd-run.xml @@ -106,6 +106,18 @@ along with systemd; If not, see . generated one. + + + + + Sets a unit property for the scope or service + unit that is created. This takes an assignment in the same + format as + systemctl1's + set-property command. + + + @@ -173,7 +185,7 @@ along with systemd; If not, see . - Example + Examples The following command will log the environment variables provided by systemd to services: @@ -186,6 +198,15 @@ Sep 08 07:37:21 bupkis systemd[1]: Started /usr/bin/env. Sep 08 07:37:21 bupkis env[19948]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin Sep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8 Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64 + + The following command invokes the + updatedb8 + tool but lowers the block IO weight for it to 10. See + systemd.resource-control5 + for more information on the BlockIOWeight= + property. + + # systemd-run -p BlockIOWeight=10 updatedb @@ -197,6 +218,8 @@ Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20. systemd.service5, systemd.scope5, systemd.slice5, + systemd.exec5, + systemd.resource-control5, machinectl1 -- cgit v1.2.3-54-g00ecf