3802a3d3d7af51ddff31943d5514382f01265770Lennart Poettering<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek This file is part of systemd.
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek Copyright 2013 Zbigniew Jędrzejewski-Szmek
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek under the terms of the GNU Lesser General Public License as published by
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2.1 of the License, or
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek (at your option) any later version.
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek Lesser General Public License for more details.
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek You should have received a copy of the GNU Lesser General Public License
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek xmlns:xi="http://www.w3.org/2001/XInclude">
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <productname>systemd</productname>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <email>lennart@poettering.net</email>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <refentrytitle>systemd-run</refentrytitle>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <refpurpose>Run programs in transient scope or service or timer units</refpurpose>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <refsynopsisdiv>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <arg choice="opt" rep="repeat">OPTIONS</arg>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <arg choice="plain"><replaceable>COMMAND</replaceable>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <arg choice="opt" rep="repeat">ARGS</arg>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <cmdsynopsis>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <arg choice="opt" rep="repeat">TIMER OPTIONS</arg>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <arg choice="req"><replaceable>COMMAND</replaceable></arg>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho </cmdsynopsis>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek </refsynopsisdiv>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <para><command>systemd-run</command> may be used to create and
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering start a transient <filename>.service</filename> or
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <filename>.scope</filename> unit and run the specified
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <replaceable>COMMAND</replaceable> in it. It may also be used to
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering create and start transient <filename>.timer</filename>
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering <para>If a command is run as transient service unit, it will be
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering started and managed by the service manager like any other service,
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering and thus shows up in the output of <command>systemctl
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering list-units</command> like any other unit. It will run in a clean
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering and detached execution environment, with the service manager as
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt its parent process. In this mode, <command>systemd-run</command>
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering will start the service asynchronously in the background and return
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering after the command has begun execution.</para>
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering <para>If a command is run as transient scope unit, it will be
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering started by <command>systemd-run</command> itself as parent process
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering and will thus inherit the execution environment of the
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering caller. However, the processes of the command are managed by the
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering service manager similar to normal services, and will show up in
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering the output of <command>systemctl list-units</command>. Execution
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering in this case is synchronous, and will return only when the command
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering finishes. This mode is enabled via the <option>--scope</option>
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering switch (see below). </para>
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <para>If a command is run with timer options such as
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <option>--on-calendar=</option> (see below), a transient timer
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering unit is created alongside the service unit for the specified
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering command. Only the transient timer unit is started immediately, the
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering transient service unit will be started when the transient timer
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering elapses. If the <option>--unit=</option> is specified, the
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <replaceable>COMMAND</replaceable> may be omitted. In this case,
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <command>systemd-run</command> only creates a
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering <filename>.timer</filename> unit that invokes the specified unit
dec896f8517e51450c3916e1d6e8285ee865bb43Lennart Poettering when elapsing.</para>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <para>The following options are understood:</para>
8c7db2fb2186277f9572d58b664cc59792ee4f50Evgeny Vereshchagin <varlistentry>
8c7db2fb2186277f9572d58b664cc59792ee4f50Evgeny Vereshchagin <term><option>--no-ask-password</option></term>
8c7db2fb2186277f9572d58b664cc59792ee4f50Evgeny Vereshchagin <listitem><para>Do not query the user for authentication for
8c7db2fb2186277f9572d58b664cc59792ee4f50Evgeny Vereshchagin privileged operations.</para></listitem>
8c7db2fb2186277f9572d58b664cc59792ee4f50Evgeny Vereshchagin </varlistentry>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <term><option>--scope</option></term>
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering <para>Create a transient <filename>.scope</filename> unit instead of
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek the default transient <filename>.service</filename> unit.
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <term><option>--unit=</option></term>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <listitem><para>Use this unit name instead of an automatically
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek generated one.</para></listitem>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <varlistentry>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <term><option>--property=</option></term>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <listitem><para>Sets a unit property for the scope or service
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering unit that is created. This takes an assignment in the same
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <command>set-property</command> command.</para>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering </varlistentry>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <term><option>--description=</option></term>
dca348bcbb462305864526c587495a14a76bfcdeJan Engelhardt <listitem><para>Provide a description for the service or scope
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering unit. If not specified, the command itself will be used as a
b8bde11658366290521e3d03316378b482600323Jan Engelhardt description. See <varname>Description=</varname> in
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <term><option>--slice=</option></term>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <listitem><para>Make the new <filename>.service</filename> or
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <filename>.scope</filename> unit part of the specified slice,
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek instead of the <filename>system.slice</filename>.</para>
6577c7cea72f19185ad999c223bcf663c010dc6fLennart Poettering <varlistentry>
6577c7cea72f19185ad999c223bcf663c010dc6fLennart Poettering <term><option>--remain-after-exit</option></term>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>After the service or scope process has
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering terminated, keep the service around until it is explicitly
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering stopped. This is useful to collect runtime information about
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering the service after it finished running. Also see
6577c7cea72f19185ad999c223bcf663c010dc6fLennart Poettering <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
6577c7cea72f19185ad999c223bcf663c010dc6fLennart Poettering </varlistentry>
a6c0353b9268d5b780fb7ff05a10cb5031446e5dLennart Poettering <varlistentry>
a6c0353b9268d5b780fb7ff05a10cb5031446e5dLennart Poettering <term><option>--send-sighup</option></term>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>When terminating the scope or service unit,
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering send a SIGHUP immediately after SIGTERM. This is useful to
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering indicate to shells and shell-like processes that the
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering connection has been severed. Also see
a6c0353b9268d5b780fb7ff05a10cb5031446e5dLennart Poettering <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
a6c0353b9268d5b780fb7ff05a10cb5031446e5dLennart Poettering </varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <term><option>--service-type=</option></term>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>Sets the service type. Also see
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering option has no effect in conjunction with
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering </varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>Runs the service process under the UNIX user
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering and group. Also see <varname>User=</varname> and
4de33e7f3238a6fe616e61139ab87e221572e5e5Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering </varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>Runs the service process with the specified
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering nice level. Also see <varname>Nice=</varname> in
4de33e7f3238a6fe616e61139ab87e221572e5e5Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering </varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <varlistentry>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering <listitem><para>Runs the service process with the specified
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering environment variables set. Also see
4de33e7f3238a6fe616e61139ab87e221572e5e5Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
981ee551945f4e00de52fcbb7780fd7476bcd47eLennart Poettering </varlistentry>
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <varlistentry>
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt <listitem><para>When invoking a command, the service connects
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering its standard input and output to the invoking tty via a
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering pseudo TTY device. This allows invoking binaries as services
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering that expect interactive user input, such as interactive
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering </varlistentry>
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering <varlistentry>
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering <listitem><para>Suppresses additional informational output
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering while running. This is particularly useful in combination with
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering <option>--pty</option> when it will suppress the initial
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering message explaining how to terminate the TTY connection.</para></listitem>
095dc59660c3dde782f32fe5a52b577f7700578bLennart Poettering </varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <term><option>--on-unit-inactive=</option></term>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <listitem><para>Defines monotonic timers relative to different
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho starting points. Also see <varname>OnActiveSec=</varname>,
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho options have no effect in conjunction with
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho </varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <listitem><para>Defines realtime (i.e. wallclock) timers with
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho calendar event expressions. Also see
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho option has no effect in conjunction with
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho </varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <varlistentry>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <listitem><para>Sets a timer unit property for the timer unit
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho that is created. It is similar with
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <option>--property</option> but only for created timer
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho unit. This option only has effect in conjunction with
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <option>--on-active=</option>, <option>--on-boot=</option>,
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <option>--on-calendar=</option>. This takes an assignment in
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho the same format as
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <command>set-property</command> command.</para> </listitem>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho </varlistentry>
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering <varlistentry>
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering <para>Do not synchronously wait for the requested operation
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering to finish. If this is not specified, the job will be
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering verified, enqueued and <command>systemd-run</command> will
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering wait until the unit's start-up is completed. By passing this
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering argument, it is only verified and enqueued.</para>
3d161f991e16369aa59f447eb4cdb90af33261c8Lennart Poettering </varlistentry>
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <xi:include href="user-system-options.xml" xpointer="user" />
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <xi:include href="user-system-options.xml" xpointer="system" />
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <xi:include href="user-system-options.xml" xpointer="host" />
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <xi:include href="user-system-options.xml" xpointer="machine" />
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek <xi:include href="standard-options.xml" xpointer="help" />
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek <xi:include href="standard-options.xml" xpointer="version" />
81c7dd897c6af68e66b58e97abce676641edc197Lennart Poettering <para>All command line arguments after the first non-option
3f85ef0f05ffc51e19f86fb83a1c51e8e3cd6817Harald Hoyer argument become part of the command line of the launched
fbce11397f4d19821a9dfe66ee3ebe11cad90057Jan Engelhardt process. If a command is run as service unit, its first argument
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering needs to be an absolute binary path.</para>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <para>On success, 0 is returned, a non-zero failure
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek code otherwise.</para>
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-Szmek <para>The following command will log the environment variables
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-Szmek provided by systemd to services:</para>
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-Szmek <programlisting># systemd-run env
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-SzmekRunning as unit run-19945.service.
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-Szmek# journalctl -u run-19945.service
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-SzmekSep 08 07:37:21 bupkis systemd[1]: Starting /usr/bin/env...
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-SzmekSep 08 07:37:21 bupkis systemd[1]: Started /usr/bin/env.
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-SzmekSep 08 07:37:21 bupkis env[19948]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
c9d954b27ee125c3c90a6d2951c62eec4abb160bZbigniew Jędrzejewski-SzmekSep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8
9fccdb0f64d12bc09a71442dd0af2248c1aa3e89Lennart PoetteringSep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64</programlisting>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <para>The following command invokes the
5aded369782f28255bc6b494ca905d7acaea7a56Zbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>updatedb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt tool, but lowers the block I/O weight for it to 10. See
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering for more information on the <varname>BlockIOWeight=</varname>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering property.</para>
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <programlisting># systemd-run -p BlockIOWeight=10 updatedb</programlisting>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <para>The following command will touch a file after 30 seconds.</para>
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <programlisting># date; systemd-run --on-active=30 --timer-property=AccuracySec=100ms /bin/touch /tmp/foo
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoMon Dec 8 20:44:24 KST 2014
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoRunning as unit run-71.timer.
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoWill run as unit run-71.service.
85fb80317b543601cdcf44b0a59da9cdabcbffa1Lennart Poettering# journalctl -b -u run-71.timer
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho-- Logs begin at Fri 2014-12-05 19:09:21 KST, end at Mon 2014-12-08 20:44:54 KST. --
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoDec 08 20:44:38 container systemd[1]: Starting /bin/touch /tmp/foo.
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoDec 08 20:44:38 container systemd[1]: Started /bin/touch /tmp/foo.
85fb80317b543601cdcf44b0a59da9cdabcbffa1Lennart Poettering# journalctl -b -u run-71.service
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho-- Logs begin at Fri 2014-12-05 19:09:21 KST, end at Mon 2014-12-08 20:44:54 KST. --
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoDec 08 20:44:48 container systemd[1]: Starting /bin/touch /tmp/foo...
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong ChoDec 08 20:44:48 container systemd[1]: Started /bin/touch /tmp/foo.</programlisting>
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering <para>The following command invokes <filename>/bin/bash</filename>
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering as a service passing its standard input, output and error to
9b15b7846d4de01bb5d9700a24077787e984e8abLennart Poettering the calling TTY.</para>
de6fae8a6ec65ea10c1660a3106524b2f23b6bc7Evgeny Vereshchagin <programlisting># systemd-run -t --send-sighup /bin/bash</programlisting>
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3803cde44c3d949765bdf0e8bce06886224d40b4Lennart Poettering <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
f09114bcc7dc9d4699e6ae41150056256bfbabb2Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
d21ed1ead18d16d35c30299a69d3366847f8a039Lennart Poettering <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
df31a6c0fe07805cb50045fbe91c2a6e7e430562Lennart Poettering <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
4c213d6cf416917c61f82d8bee795b8f3a4c5372WaLyong Cho <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
d21ed1ead18d16d35c30299a69d3366847f8a039Lennart Poettering <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>