1tlog-rec(8)                 System Manager's Manual                tlog-rec(8)
2
3
4

NAME

6       tlog-rec - record terminal I/O of a program or a user shell
7
8

SYNOPSIS

10       tlog-rec [OPTION...] [CMD_FILE [CMD_ARG...]]
11
12

DESCRIPTION

14       Tlog-rec is a terminal I/O logging program. It starts a program under a
15       pseudo-TTY, connects it to the actual terminal and logs whatever passes
16       between  them including user input, program output, and terminal window
17       size changes.
18
19       CMD_FILE argument specifies the program to run and record. If  CMD_FILE
20       contains a slash (/) character, then it is assumed to contain a path to
21       the program to run. Otherwise a program  file  with  CMD_FILE  name  is
22       searched  for  in directories specified with the PATH environment vari‐
23       able. If this variable is  not  set,  then  the  current  directory  is
24       searched, followed by the system-default directories output by "getconf
25       CS_PATH", which is usually "/bin:/usr/bin".
26
27       CMD_ARG arguments are used as arguments  to  the  program  to  run  and
28       record.
29
30       If  no  non-option  arguments  are  specified, then tlog-rec starts and
31       records a user shell specified with the SHELL environment variable,  or
32       if  that  is not set, it starts the shell specified in the NSS database
33       for the user tlog-rec runs as.
34
35       Tlog-rec loads its parameters first from the system-wide  configuration
36       file  /usr/local/etc/tlog/tlog-rec.conf,  then from the file pointed at
37       by TLOG_REC_CONF_FILE environment variable (if set), then from the con‐
38       tents of the TLOG_REC_CONF_TEXT environment variable (if set), and then
39       from command-line options. Parameters from each of these sources  over‐
40       ride the previous one in turn.
41
42

OPTIONS

44   General options
45       -h, --help
46              Output a command-line usage message and exit.
47
48
49
50
51       -v, --version
52              Output version information and exit.
53
54
55
56
57       --configuration
58              Output program configuration in JSON and exit.
59
60
61
62
63       --latency=SECONDS
64              Cache captured data SECONDS seconds before logging.
65
66              SECONDS  is  the  number  of  seconds to cache captured data for
67              before logging.  The encoded data which does not  reach  payload
68              size stays in memory and is not logged until this number of sec‐
69              onds elapses.
70
71              Value minimum: 1
72
73       --payload=BYTES
74              Limit encoded data to BYTES bytes.
75
76              BYTES is the maximum encoded data (payload)  size  per  message,
77              bytes.   As  soon as payload exceeds this number of bytes, it is
78              formatted into a message and logged.
79
80              Value minimum: 32
81
82       -w, --writer=STRING
83              Use STRING log writer (journal/syslog/file, default file).
84
85              STRING is the type of "log  writer"  to  use  for  logging.  The
86              writer needs to be configured using its dedicated parameters.
87
88              Value should be one of: "journal", "syslog", "file"
89
90       --semaphore=FILE
91              Write "READY" to FILE when recording is setup.
92
93              FILE is a path to a "semaphore" file to write string "READY" to,
94              when the recording setup is done, and I/O can be passed  to  and
95              from the recorded program.
96
97
98   Logged data set options
99       --log-input[=BOOL]
100              Enable/disable logging user input.
101
102              If specified as true, user input is logged.
103
104
105       --log-output[=BOOL]
106              Enable/disable logging program output.
107
108              If specified as true, terminal output is logged.
109
110
111       --log-window[=BOOL]
112              Enable/disable logging terminal window size changes.
113
114              If specified as true, terminal window size changes are logged.
115
116
117   Logging limit options
118       --limit-rate=NUMBER
119              Set logging rate limit to NUMBER of message bytes/sec.
120
121              NUMBER  is  the  maximum  rate  messages  could  be  logged  at,
122              bytes/sec.
123
124              Value minimum: 0
125
126       --limit-burst=NUMBER
127              Set logging burst limit to NUMBER of message bytes.
128
129              NUMBER is the number of  bytes  by  which  logged  messages  are
130              allowed to exceed the rate limit momentarily, i.e. "burstiness".
131
132              Value minimum: 0
133
134       --limit-action=STRING
135              Perform STRING action above limits (pass/delay/drop).
136
137              STRING is the logging limit action.  If set to "pass" no logging
138              limits will be applied.  If set  to  "delay",  logging  will  be
139              throttled.   If set to "drop", messages exceeding limits will be
140              dropped.
141
142              Value should be one of: "pass", "delay", "drop"
143
144   File writer options
145       -o, --file-path=FILE
146              Log to FILE file.
147
148              FILE is the "file" writer log file path.
149
150
151   Syslog writer options
152       --syslog-facility=STRING
153              Log with STRING syslog facility.
154
155              STRING is the syslog facility "syslog"  writer  should  use  for
156              messages.
157
158              Value  should  be  one of: "auth", "authpriv", "cron", "daemon",
159              "ftp", "kern", "local0", "local1", "local2", "local3", "local4",
160              "local5",  "local6",  "local7", "lpr", "mail", "news", "syslog",
161              "user", "uucp"
162
163       --syslog-priority=STRING
164              Log with STRING syslog priority.
165
166              STRING is the syslog priority "syslog"  writer  should  use  for
167              messages.
168
169              Value  should be one of: "emerg", "alert", "crit", "err", "warn‐
170              ing", "notice", "info", "debug"
171
172   Journal writer options
173       --journal-priority=STRING
174              Log with STRING syslog-style priority.
175
176              STRING is the syslog-style priority "journal" writer should  use
177              for messages.
178
179              Value  should be one of: "emerg", "alert", "crit", "err", "warn‐
180              ing", "notice", "info", "debug"
181
182       --journal-augment[=BOOL]
183              Enable/disable adding extra journal fields.
184
185              If specified as true, the "journal" writer copies the  following
186              JSON  fields  to  Journal  fields: user -> TLOG_USER, session ->
187              TLOG_SESSION, rec -> TLOG_REC, and id -> TLOG_ID.
188
189
190
191

ENVIRONMENT

193       TLOG_REC_CONF_FILE
194              Specifies the location of a configuration file to be read.   The
195              configuration  parameters  in this file override the ones in the
196              system-wide   configuration    file    /usr/local/etc/tlog/tlog-
197              rec.conf.
198
199
200       TLOG_REC_CONF_TEXT
201              Specifies  the configuration text to be read.  The configuration
202              parameters in this variable override the ones in the file speci‐
203              fied with TLOG_REC_CONF_FILE.
204
205
206       SHELL  Specifies the shell to run, if no positional arguments are found
207              on the command line.
208
209

FILES

211       /usr/local/etc/tlog/tlog-rec.conf
212              The system-wide configuration file
213
214

EXAMPLES

216       Record a vim session to a file:
217              tlog-rec -o vim.log vim
218
219
220       Record user input only:
221              tlog-rec --log-input=on --log-output=off --log-window=off
222
223
224       Record with minimal latency:
225              tlog-rec --latency=1
226
227

SEE ALSO

229       tlog-rec.conf(5), tlog-rec-session(8), tlog-play(8)
230
231

AUTHOR

233       Nikolai Kondrashov <spbnick@gmail.com>
234
235
236
237Tlog                               May 2017                        tlog-rec(8)
Impressum