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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
.TH socklog 8
.SH NAME
socklog \- small and secure syslogd replacement for use with runit
.SH SYNOPSIS
.B socklog
[\-rRU]
[unix]
.RI [ path\fR]
.br
.B socklog
[\-rR]
inet
.RI [ ip\fR]
.RI [ port\fR]
.br
.B socklog
[\-rR]
ucspi
.RI [ args\fR]
.SH DESCRIPTION
.B socklog
is run under runit's
.BR runsv (8),
writing syslog messages it receives from unix domain socket
.I path
or an inet udp socket
.I ip\fR:\fIport\fR
through a pipe provided by
.BR runsv (8)
to a
.BR svlogd (8)
process.
.LP
.B socklog
can be run as an ucspi application to listen to an unix domain stream socket
and for more flexible distributed logging.
.LP
If the environment variables $UID and/or $GID are present,
.B socklog
drops permissions to those ids after creating and binding the socket (not in
.I ucspi
mode).
.LP
.B socklog
converts syslog facility and priority information to names
(\fIfacility\fR.\fIpriority\fR:)
as found in
.I /usr/include/syslog.h
at compile time if present.
.LP
On solaris
.B socklog
also accepts
.I sun_stream
as first argument. Please see the web page for details.
.SH UNIX SOCKET
.B socklog
[
unix
] [
.I path
]
.LP
Starting
.B socklog
with the 1st argument
.IR unix ,
.B socklog
will listen to the unix domain socket
.IR path .
If
.I path
is omitted, the default
.I /dev/log
is used.
.LP
The 1st argument may be omitted, default is
.IR unix .
.SH INET SOCKET
.B socklog
inet [
.I ip
] [
.I port
]
.LP
Starting
.B socklog
with the 1st argument
.IR inet ,
.B socklog
will listen to the inet udp socket
.I ip\fR:\fIport\fR.
.LP
If
.I ip
starts with 0,
.B socklog
will bind to all local interfaces.
.LP
If
.I port
is less or equal 1024,
.B socklog
must be run by root.
.LP
.I port
may be omitted, default is 514.
.I ip
may be omitted, default is 0.
.LP
.B socklog
prepends
.I a.b.c.d:
to each syslog message it receives, where
.I a.b.c.d
is the ip address of the connecting system.
.SH UCSPI MODE
.B socklog
ucspi [
.I args
]
.LP
Starting
.B socklog
with the 1st argument
.IR ucspi ,
.B socklog
will run as an ucspi application. Normally
.B socklog
will only be started in
.I ucspi
mode by an ucspi server tool, such as
.BR tcpsvd (8),
.BR tcpserver (1)
or
.BR unixserver .
.LP
For each
.IR arg ,
.B socklog
will prepend
$\fIarg\fR:
to each syslog message, if the environment variable
.RI $ arg
is present (maximum is 8).
.SH OPTIONS
.TP
.B \-r
raw.
Write the raw syslog messages (no conversion of facility and priority)
to the pipe, additionally to the log messages with syslog facility and
priority converted to names.
.TP
.B \-R
raw only.
Same as \-r above, but write the raw syslog messages only.
.TP
.B \-U
respect umask.
Don't set umask to 0 before creating a unix domain socket, but respect
the current setting of
.BR umask (2).
This option only takes effect in unix mode.
.SH SEE ALSO
sv(8),
runsvdir(8),
runsv(8),
svlogd(8),
tryto(1),
uncat(1),
socklog-check(8),
tcpsvd(8),
nc(1)
.LP
https://smarden.org/socklog/
https://smarden.org/runit/
.SH AUTHOR
Gerrit Pape <pape@smarden.org>
|