File: wtmpdb.8.xml

package info (click to toggle)
wtmpdb 0.75.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 692 kB
  • sloc: ansic: 4,222; xml: 715; sh: 81; makefile: 16
file content (414 lines) | stat: -rw-r--r-- 10,996 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="wtmpdb">
  <refmeta>
    <refentrytitle>wtmpdb</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="source">wtmpdb %version%</refmiscinfo>
    <refmiscinfo class="manual">wtmpdb</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>wtmpdb</refname>
    <refpurpose>display login, logout and reboot information</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis sepchar=" ">
      <command>wtmpdb</command>
      <arg choice="plain">COMMAND</arg>
      <arg choice="opt" rep="repeat">
       option
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>

    <title>DESCRIPTION</title>

    <para>
      <command>wtmpdb</command> displays the content of the wtmp
      login and boot times database and provides sub-commands for
      system scripts to create boot and shutdown entries and otherwise
      manipulate the wtmp database.
    </para>
    <para>
      This command is year 2038-safe and uses sqlite3 to store
      the information.
    </para>
  </refsect1>

  <refsect1>
    <title>COMMANDS</title>
    <para>The following commands are understood:</para>
    <variablelist>
      <varlistentry>
        <term><command>last</command>
	<optional><replaceable>option</replaceable>…</optional>
	<optional><replaceable>username</replaceable>…</optional>
	<optional><replaceable>tty</replaceable>…</optional></term>
        <listitem>
          <para>
	    <command>wtmpdb last</command> goes through the
	    <filename>/var/log/wtmp.db</filename> database (or the
	    database designated by the <command>-f</command> option) and
	    displays a list of of all users logged in and logged out. The
	    output can be restricted to different patterns via various
	    options. If one or more usernames and/or ttys are given
	    <command>wtmpdb last</command> will only show the entries matching
	    those arguments.
	  </para>

	  <para>
	    The login and logout times of the special user
	    <command>reboot</command> are the boot and shutdown times of the
	    system.
	  </para>
	  <variablelist>
	    <varlistentry>
	      <term>
		<option>-a, --hostlast</option>
	      </term>
	      <listitem>
		<para>
		  Display hostnames in the last column.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-d, --dns</option>
	      </term>
	      <listitem>
		<para>
		  Translate IP addresses into a hostname.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-f, --file</option> <replaceable>FILE</replaceable>
	      </term>
	      <listitem>
		<para>
		  Use <replaceable>FILE</replaceable> as wtmpdb database.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-F, --fulltimes</option>
	      </term>
	      <listitem>
		<para>
		  Display full times and dates.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-i, --ip</option>
	      </term>
	      <listitem>
		<para>
		  Translate hostnames to IP addresses.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-n, --limit</option> <replaceable>N</replaceable>
	      </term>
	      <term>
		<option>-</option><replaceable>N</replaceable>
	      </term>
	      <listitem>
		<para>
		  Display only the first <replaceable>N</replaceable> entries.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-p, --present</option> <replaceable>TIME</replaceable>
	      </term>
	      <listitem>
		<para>
		  Display who was present at <replaceable>TIME</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-R, --nohostname</option>
	      </term>
	      <listitem>
		<para>
		  Don't display any hostname or IP address.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-S, --service</option>
	      </term>
	      <listitem>
		<para>
		  Display PAM service used to login.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-s, --since</option> <replaceable>TIME</replaceable>
	      </term>
	      <listitem>
		<para>
		  Print only records more recent than
		  <replaceable>TIME</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-t, --until</option> <replaceable>TIME</replaceable>
	      </term>
	      <listitem>
		<para>
		  Print only records until <replaceable>TIME</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-w, --fullnames</option>
	      </term>
	      <listitem>
		<para>
		  Display full IP addresses and user and domain names.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>-x, --system</option>
	      </term>
	      <listitem>
		<para>
		  Display system shutdown entries.
		</para>
	      </listitem>
	    </varlistentry>
	    <varlistentry>
	      <term>
		<option>--time-format</option>
		<replaceable>FORMAT</replaceable>
	      </term>
	      <listitem>
		<para>
		  Display timestamps in the specified
		  <replaceable>FORMAT</replaceable>. The format can be
		  <replaceable>notime</replaceable>,
		  <replaceable>short</replaceable>,
		  <replaceable>full</replaceable>, or
		  <replaceable>iso</replaceable>.
		  <replaceable>notime</replaceable> will not display times at
		  all, <replaceable>short</replaceable> is the default option,
		  <replaceable>full</replaceable> will display the full times
		  and dates, and <replaceable>iso</replaceable> will display
		  times in ISO-8601 format.
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	  <para>
	    <replaceable>TIME</replaceable> must be in the format
	    <option>"YYYYMMDDHHMMSS"</option>,
	    <option>"YYYY-MM-DD HH:MM:SS"</option>,
	    <option>"YYYY-MM-DD HH:MM"</option>,
	    <option>"YYYY-MM-DD"</option>,
	    <option>"HH:MM:SS"</option>,
	    <option>"HH:MM"</option>,
	    <option>"now"</option>,
	    <option>"today"</option>,
	    <option>"yesterday"</option> or
	    <option>"tomorrow"</option> (time will be set to 00:00:00
	    if not specified; the date to today's).
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
        <term><command>boot</command>
	<optional><replaceable>option</replaceable>…</optional></term>
        <listitem>
          <para>
	    <command>wtmpdb boot</command> writes system boot times
	    to the <filename>/var/log/wtmp.db</filename> database.
	  </para>
	  <title>boot options</title>
	  <varlistentry>
	    <term>
	      <option>-f, --file</option> <replaceable>FILE</replaceable>
	    </term>
	    <listitem>
	      <para>
		Use <replaceable>FILE</replaceable> as wtmpdb database.
	      </para>
	    </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <option>-q, --quiet</option>
	    </term>
	    <listitem>
	      <para>
		Don't print informative messages.
	      </para>
	    </listitem>
	  </varlistentry>
	</listitem>
      </varlistentry>
      <varlistentry>
        <term><command>shutdown</command>
	<optional><replaceable>option</replaceable>…</optional></term>
        <listitem>
          <para>
	    <command>wtmpdb shutdown</command> writes system shutdown
	    requests to the <filename>/var/log/wtmp.db</filename>
	    database.
	  </para>
	  <title>shutdown options</title>
	  <varlistentry>
	    <term>
	      <option>-f, --file</option> <replaceable>FILE</replaceable>
	    </term>
	    <listitem>
	      <para>
		Use <replaceable>FILE</replaceable> as wtmpdb database.
	      </para>
	    </listitem>
	  </varlistentry>
	</listitem>
      </varlistentry>
      <varlistentry>
        <term><command>rotate</command>
	<optional><replaceable>option</replaceable>…</optional></term>
        <listitem>
          <para>
	    <command>wtmpdb rotate</command> exports old log entries
	    to the <filename>/var/log/wtmp_yyyymmmdd.db</filename>
	    database and removes these entries from the original one.
	  </para>
	  <title>rotate options</title>
	  <varlistentry>
	    <term>
	      <option>-f, --file</option> <replaceable>FILE</replaceable>
	    </term>
	    <listitem>
	      <para>
		Use <replaceable>FILE</replaceable> as wtmpdb database.
                The exported DB file will be on the same location.
	      </para>
	    </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <option>-d, --days</option> <replaceable>DAYS</replaceable>
	    </term>
	    <listitem>
	      <para>
		Entries will be exported which are older than
                <replaceable>DAYS</replaceable> days. Default is 60 days.
	      </para>
	    </listitem>
	  </varlistentry>
	</listitem>
      </varlistentry>
      <varlistentry>
        <term><command>import</command>
	  <optional><replaceable>option</replaceable>…</optional>
	  <replaceable>file</replaceable>…
	</term>
	<listitem>
          <para>
	    <command>wtmpdb import</command> imports legacy wtmp log
	    files to the <filename>/var/log/wtmp.db</filename>
	    database.
	  </para>
	  <title>import options</title>
	  <varlistentry>
	    <term>
	      <option>-f, --file</option> <replaceable>FILE</replaceable>
	    </term>
	    <listitem>
	      <para>
		Use <replaceable>FILE</replaceable> as wtmpdb database.
	      </para>
	    </listitem>
	  </varlistentry>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>global options</term>
	<title>global options</title>
	<varlistentry>
        <term>
          <option>-h, --help</option>
        </term>
        <listitem>
          <para>
            Display help message and exit.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-v, --version</option>
        </term>
        <listitem>
          <para>
            Print version number and exit.
          </para>
        </listitem>
      </varlistentry>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>FILES</title>
    <variablelist>
      <varlistentry>
        <term>/var/log/wtmp.db</term>
        <listitem>
          <para>Wtmpdb logging database file</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>/var/lib/wtmpdb/wtmp.db</term>
        <listitem>
          <para>
            Symbolic link from the upstream location to the above
            database file
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
	<refentrytitle>pam_wtmpdb</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
    </para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>
    <para>
      wtmpdb was written by Thorsten Kukuk &lt;kukuk@suse.com&gt;.
    </para>
  </refsect1>

</refentry>