chiark / gitweb /
journalctl: add --utc option
[elogind.git] / man / journalctl.xml
index 6a972109c5dd5f043f697d68ee81b39ea6d1d1d4..7fb6afc8f67a578f4e14e5c7c855b932baed64c2 100644 (file)
@@ -21,7 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="journalctl">
+<refentry id="journalctl"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
         <refentryinfo>
                 <title>journalctl</title>
                 field, then they are automatically matched as
                 alternatives, i.e. the resulting output will show
                 entries matching any of the specified matches for the
-                same field. Finally, if the character
-                <literal>+</literal> appears as a separate word on the
-                command line, all matches before and after are combined
-                in a disjunction (i.e. logical OR).</para>
+                same field. Finally, the character
+                <literal>+</literal> may appears as a separate word
+                between other terms on the command line. This causes
+                all matches before and after to be combined in a
+                disjunction (i.e. logical OR).</para>
 
                 <para>As shortcuts for a few types of field/value
                 matches, file paths may be specified. If a file path
                 <literal>_KERNEL_DEVICE=</literal> match for the
                 device.</para>
 
+                <para>Additional constraints may be added using options
+                <option>--boot</option>, <option>--unit=</option>,
+                etc, to further limit what entries will be shown
+                (logical AND).</para>
+
                 <para>Output is interleaved from all accessible
                 journal files, whether they are rotated or currently
                 being written, and regardless of whether they belong to the
                 system itself or are accessible user journals.</para>
 
+                <para>The set of journal files which will be used
+                can be modified using the <option>--user</option>,
+                <option>--system</option>, <option>--directory</option>,
+                and <option>--file</option> options, see below.</para>
+
                 <para>All users are granted access to their private
                 per-user journals. However, by default, only root and
                 users who are members of the <literal>systemd-journal</literal>
                 <option>--no-pager</option> option and the "Environment"
                 section below.</para>
 
-                <para>When outputing to a tty, lines are colored
+                <para>When outputting to a tty, lines are colored
                 according to priority: lines of level ERROR and higher
                 are colored red; lines of level NOTICE and higher are
-                highlighted; and other lines are displayed normally.
+                highlighted; other lines are displayed normally.
                 </para>
         </refsect1>
 
                 <para>The following options are understood:</para>
 
                 <variablelist>
-                        <varlistentry>
-                                <term><option>-h</option></term>
-                                <term><option>--help</option></term>
-
-                                <listitem><para>Prints a short help
-                                text and exits.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--version</option></term>
-
-                                <listitem><para>Prints a short version
-                                string and exits.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--no-pager</option></term>
-
-                                <listitem><para>Do not pipe output into a
-                                pager.</para></listitem>
-                        </varlistentry>
-
                         <varlistentry>
                                 <term><option>--no-full</option></term>
                                 <term><option>--full</option></term>
                                 that the pager will not buffer logs of
                                 unbounded size. This may be overridden
                                 with an explicit <option>-n</option>
-                                with some other numeric value on the
-                                command line. Note that this option is
-                                only supported for the
-                                <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                                with some other numeric value while
+                                <option>-nall</option> will disable this cap.
+                                Note that this option is only supported for the
+                                <citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                                 pager.</para></listitem>
                         </varlistentry>
 
                                 journal events and limit the number of
                                 events shown. If
                                 <option>--follow</option> is used,
-                                this option is implied. The argument,
-                                a positive integer, is optional, and
-                                defaults to 10. </para></listitem>
+                                this option is implied. The argument is
+                                a positive integer or <literal>all</literal>
+                                to disable line limiting. The default value is
+                                10 if no argument is given.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term><option>-r</option></term>
                                 <term><option>--reverse</option></term>
 
-                                <listitem><para>Reverse output so the newest
+                                <listitem><para>Reverse output so that the newest
                                 entries are displayed first.</para></listitem>
                         </varlistentry>
 
                                                         terse output, only
                                                         showing the actual
                                                         message of each journal
-                                                        entry with no meta data,
+                                                        entry with no metadata,
                                                         not even a timestamp.
                                                         </para>
                                                 </listitem>
                                 </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--utc</option></term>
+
+                                <listitem><para>Express time in Coordinated Universal
+                                Time (UTC).</para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>-x</option></term>
                                 <term><option>--catalog</option></term>
                                 </para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>-t</option></term>
+                                <term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable>|<replaceable>PATTERN</replaceable></option></term>
+
+                                <listitem><para>Show messages for the
+                                specified syslog identifier
+                                <replaceable>SYSLOG_IDENTIFIER</replaceable>, or
+                                for any of the messages with a <literal>SYSLOG_IDENTIFIER</literal>
+                                matched by <replaceable>PATTERN</replaceable>.</para>
+
+                                <para>This parameter can be specified
+                                multiple times.</para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>-u</option></term>
-                                <term><option>--unit=</option></term>
+                                <term><option>--unit=<replaceable>UNIT</replaceable>|<replaceable>PATTERN</replaceable></option></term>
 
                                 <listitem><para>Show messages for the
-                                specified systemd unit. This will add
-                                a match for messages from the unit
-                                (<literal>_SYSTEMD_UNIT=</literal>)
-                                and additional matches for messages
-                                from systemd and messages about
-                                coredumps for the specified unit.</para>
-                                <para>This parameter can be specified multiple times.
-                                </para></listitem>
+                                specified systemd unit
+                                <replaceable>UNIT</replaceable> (such
+                                as a service unit), or for any of the
+                                units matched by
+                                <replaceable>PATTERN</replaceable>.
+                                If a pattern is specified, a list of
+                                unit names found in the journal is
+                                compared with the specified pattern
+                                and all that match are used. For each
+                                unit name, a match is added for
+                                messages from the unit
+                                (<literal>_SYSTEMD_UNIT=<replaceable>UNIT</replaceable></literal>),
+                                along with additional matches for
+                                messages from systemd and messages
+                                about coredumps for the specified
+                                unit.</para>
+
+                                <para>This parameter can be specified
+                                multiple times.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 the form FROM..TO. The log levels are
                                 the usual syslog log levels as
                                 documented in
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                                 i.e. <literal>emerg</literal> (0),
                                 <literal>alert</literal> (1),
                                 <literal>crit</literal> (2),
                                 operation.</para></listitem>
                         </varlistentry>
 
+                        <xi:include href="standard-options.xml" xpointer="help" />
+                        <xi:include href="standard-options.xml" xpointer="version" />
+                        <xi:include href="standard-options.xml" xpointer="no-pager" />
                 </variablelist>
         </refsect1>
 
                 failure code is returned.</para>
         </refsect1>
 
-        <refsect1>
-                <title>Environment</title>
-
-                <variablelist class='environment-variables'>
-                        <varlistentry>
-                                <term><varname>$SYSTEMD_PAGER</varname></term>
-                                <listitem><para>Pager to use when
-                                <option>--no-pager</option> is not given;
-                                overrides <varname>$PAGER</varname>.  Setting
-                                this to an empty string or the value
-                                <literal>cat</literal> is equivalent to passing
-                                <option>--no-pager</option>.</para></listitem>
-                        </varlistentry>
-                </variablelist>
-        </refsect1>
+        <xi:include href="less-variables.xml" />
 
         <refsect1>
                 <title>Examples</title>
 
                 <programlisting>journalctl -k -b -1</programlisting>
 
+                <para>Show a live log display from a system service <filename>apache.service</filename>:</para>
+
+                <programlisting>journalctl -f -u apache</programlisting>
+
         </refsect1>
 
         <refsect1>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>