]> git.proxmox.com Git - systemd.git/blame - man/systemd-cat.1
Imported Upstream version 219
[systemd.git] / man / systemd-cat.1
CommitLineData
14228c0d 1'\" t
e735f4d4 2.TH "SYSTEMD\-CAT" "1" "" "systemd 219" "systemd-cat"
14228c0d
MB
3.\" -----------------------------------------------------------------
4.\" * Define some portability stuff
5.\" -----------------------------------------------------------------
6.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.\" http://bugs.debian.org/507673
8.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10.ie \n(.g .ds Aq \(aq
11.el .ds Aq '
12.\" -----------------------------------------------------------------
13.\" * set default formatting
14.\" -----------------------------------------------------------------
15.\" disable hyphenation
16.nh
17.\" disable justification (adjust text to left margin only)
18.ad l
19.\" -----------------------------------------------------------------
20.\" * MAIN CONTENT STARTS HERE *
21.\" -----------------------------------------------------------------
22.SH "NAME"
23systemd-cat \- Connect a pipeline or program\*(Aqs output with the journal
24.SH "SYNOPSIS"
25.HP \w'\fBsystemd\-cat\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB[COMMAND]\fR\fB\ \fR\fB[ARGUMENTS...]\fR\ 'u
26\fBsystemd\-cat \fR\fB[OPTIONS...]\fR\fB \fR\fB[COMMAND]\fR\fB \fR\fB[ARGUMENTS...]\fR
27.HP \w'\fBsystemd\-cat\ \fR\fB[OPTIONS...]\fR\ 'u
28\fBsystemd\-cat \fR\fB[OPTIONS...]\fR
29.SH "DESCRIPTION"
30.PP
31\fBsystemd\-cat\fR
60f067b4 32may 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\&.
14228c0d
MB
33.PP
34If no parameter is passed,
35\fBsystemd\-cat\fR
60f067b4 36will write everything it reads from standard input (stdin) to the journal\&.
14228c0d 37.PP
60f067b4 38If 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\&.
14228c0d
MB
39.SH "OPTIONS"
40.PP
41The following options are understood:
42.PP
43\fB\-h\fR, \fB\-\-help\fR
44.RS 4
60f067b4 45Print a short help text and exit\&.
14228c0d
MB
46.RE
47.PP
48\fB\-\-version\fR
49.RS 4
60f067b4 50Print a short version string and exit\&.
14228c0d
MB
51.RE
52.PP
53\fB\-t\fR, \fB\-\-identifier=\fR
54.RS 4
55Specify a short string that is used to identify the logging tool\&. If not specified, no identification string is written to the journal\&.
56.RE
57.PP
58\fB\-p\fR, \fB\-\-priority=\fR
59.RS 4
60Specify the default priority level for the logged messages\&. Pass one of
61"emerg",
62"alert",
63"crit",
64"err",
65"warning",
66"notice",
67"info",
68"debug", or a value between 0 and 7 (corresponding to the same named levels)\&. These priority values are the same as defined by
69\fBsyslog\fR(3)\&. Defaults to
70"info"\&. Note that this simply controls the default, individual lines may be logged with different levels if they are prefixed accordingly\&. For details see
71\fB\-\-level\-prefix=\fR
72below\&.
73.RE
74.PP
75\fB\-\-level\-prefix=\fR
76.RS 4
77Controls whether lines read are parsed for syslog priority level prefixes\&. If enabled (the default), a line prefixed with a priority prefix such as
78"<5>"
79is logged at priority 5 ("notice"), and similar for the other priority levels\&. Takes a boolean argument\&.
80.RE
81.SH "EXIT STATUS"
82.PP
60f067b4 83On success, 0 is returned, a non\-zero failure code otherwise\&.
14228c0d
MB
84.SH "EXAMPLES"
85.PP
86\fBExample\ \&1.\ \&Invoke a program\fR
87.PP
88This calls
89/bin/ls
60f067b4 90with standard output and error connected to the journal:
14228c0d
MB
91.sp
92.if n \{\
93.RS 4
94.\}
95.nf
96# systemd\-cat ls
97.fi
98.if n \{\
99.RE
100.\}
101.PP
102\fBExample\ \&2.\ \&Usage in a shell pipeline\fR
103.PP
104This builds a shell pipeline also invoking
105/bin/ls
106and writes the output it generates to the journal:
107.sp
108.if n \{\
109.RS 4
110.\}
111.nf
112# ls | systemd\-cat
113.fi
114.if n \{\
115.RE
116.\}
117.PP
60f067b4 118Even 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\&.
14228c0d
MB
119.SH "SEE ALSO"
120.PP
121\fBsystemd\fR(1),
122\fBsystemctl\fR(1),
123\fBlogger\fR(1)