File: systemd-cat.html

package info (click to toggle)
systemd 215-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 49,568 kB
  • sloc: ansic: 192,789; xml: 39,586; sh: 13,002; makefile: 4,700; perl: 1,461; python: 1,355
file content (81 lines) | stat: -rw-r--r-- 8,394 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-cat</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cat"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cat — Connect a pipeline or program's output with the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]  [COMMAND]  [ARGUMENTS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214173873072"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cat</strong></span> may be used to
                connect the standard input and output of a process to the
                journal, or as a filter tool in a shell pipeline to
                pass the output the previous pipeline element
                generates to the journal.</p><p>If no parameter is passed,
                <span class="command"><strong>systemd-cat</strong></span> will write
                everything it reads from standard input (stdin) to the journal.</p><p>If parameters are passed, they are executed as
                command line with standard output (stdout) and standard
                error output (stderr) connected to the journal, so
                that all it writes is stored in the journal.</p></div><div class="refsect1"><a name="idm214173943168"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--identifier=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Specify a short string
                                that is used to identify the logging
                                tool. If not specified, no identification
                                string is written to the journal.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--priority=</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Specify the default
                                priority level for the logged
                                messages. Pass one of
                                "<code class="literal">emerg</code>",
                                "<code class="literal">alert</code>",
                                "<code class="literal">crit</code>",
                                "<code class="literal">err</code>",
                                "<code class="literal">warning</code>",
                                "<code class="literal">notice</code>",
                                "<code class="literal">info</code>",
                                "<code class="literal">debug</code>", or a
                                value between 0 and 7 (corresponding
                                to the same named levels). These
                                priority values are the same as
                                defined by
                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. Defaults
                                to "<code class="literal">info</code>". Note that
                                this simply controls the default,
                                individual lines may be logged with
                                different levels if they are prefixed
                                accordingly. For details see
                                <code class="option">--level-prefix=</code>
                                below.</p></dd><dt id="--level-prefix="><span class="term"><code class="option">--level-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--level-prefix=">¶</a></dt><dd><p>Controls whether lines
                                read are parsed for syslog priority
                                level prefixes. If enabled (the
                                default), a line prefixed with a
                                priority prefix such as
                                "<code class="literal">&lt;5&gt;</code>" is logged
                                at priority 5
                                ("<code class="literal">notice</code>"), and
                                similar for the other priority
                                levels. Takes a boolean
                                argument.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173999760"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
                code otherwise.</p></div><div class="refsect1"><a name="idm214173998576"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214173997904"></a><p class="title"><b>Example 1. Invoke a program</b></p><div class="example-contents"><p>This calls <code class="filename">/bin/ls</code>
                        with standard output and error connected to the
                        journal:</p><pre class="programlisting"># systemd-cat ls</pre></div></div><br class="example-break"><div class="example"><a name="idm214173994912"></a><p class="title"><b>Example 2. Usage in a shell pipeline</b></p><div class="example-contents"><p>This builds a shell pipeline also
                        invoking <code class="filename">/bin/ls</code> and
                        writes the output it generates to the
                        journal:</p><pre class="programlisting"># ls | systemd-cat</pre></div></div><br class="example-break"><p>Even though the two examples have very similar
                effects the first is preferable since only one process
                is running at a time, and both stdout and stderr are
                captured while in the second example, only stdout is
                captured.</p></div><div class="refsect1"><a name="idm214173991408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                        <a href="logger.html"><span class="citerefentry"><span class="refentrytitle">logger</span>(1)</span></a>
                </p></div></div></body></html>