Annotation of src/usr.bin/lastcomm/lastcomm.1, Revision 1.16
1.16 ! jmc 1: .\" $OpenBSD: lastcomm.1,v 1.15 2003/06/10 09:12:10 jmc Exp $
1.3 deraadt 2: .\" $NetBSD: lastcomm.1,v 1.5 1995/10/22 01:43:41 ghudson Exp $
1.1 deraadt 3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
1.14 millert 15: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 16: .\" may be used to endorse or promote products derived from this software
17: .\" without specific prior written permission.
18: .\"
19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29: .\" SUCH DAMAGE.
30: .\"
31: .\" @(#)lastcomm.1 8.1 (Berkeley) 6/6/93
32: .\"
1.16 ! jmc 33: .Dd $Mdocdate$
1.1 deraadt 34: .Dt LASTCOMM 1
1.11 aaron 35: .Os
1.1 deraadt 36: .Sh NAME
37: .Nm lastcomm
38: .Nd show last commands executed in reverse order
39: .Sh SYNOPSIS
40: .Nm lastcomm
41: .Op Fl f Ar file
42: .Op Ar command ...
43: .Op Ar user ...
44: .Op Ar terminal ...
45: .Sh DESCRIPTION
1.8 aaron 46: .Nm lastcomm
1.1 deraadt 47: gives information on previously executed commands.
48: With no arguments,
49: .Nm lastcomm
50: prints information about all the commands recorded
51: during the current accounting file's lifetime.
52: .Pp
1.12 aaron 53: The options are as follows:
1.13 aaron 54: .Bl -tag -width Ds
1.1 deraadt 55: .It Fl f Ar file
56: Read from
57: .Ar file
58: rather than the default
59: accounting file.
60: .El
61: .Pp
62: If called with arguments, only accounting entries with a
63: matching
64: .Ar command
65: name,
66: .Ar user
67: name,
68: or
69: .Ar terminal
70: name
71: are printed.
72: So, for example:
73: .Pp
74: .Dl lastcomm a.out root ttyd0
75: .Pp
76: would produce a listing of all the
77: executions of commands named
78: .Pa a.out
79: by user
80: .Ar root
81: on the terminal
1.12 aaron 82: .Ar ttyd0 .
1.1 deraadt 83: .Pp
1.8 aaron 84: For each process entry, the following are printed:
1.1 deraadt 85: .Pp
86: .Bl -bullet -offset indent -compact
87: .It
1.8 aaron 88: Name of the user who ran the process.
1.1 deraadt 89: .It
1.12 aaron 90: Flags, as accumulated by the system's accounting facilities.
1.1 deraadt 91: .It
1.8 aaron 92: Command name under which the process was called.
1.1 deraadt 93: .It
1.12 aaron 94: Amount of CPU time used by the process (in seconds).
1.1 deraadt 95: .It
1.8 aaron 96: Time the process started.
1.3 deraadt 97: .It
1.8 aaron 98: Elapsed time of the process.
1.1 deraadt 99: .El
100: .Pp
1.12 aaron 101: The flags are encoded as follows:
102: .Sq S
103: indicates the command was
104: executed by the superuser,
105: .Sq F
106: indicates the command ran after
1.1 deraadt 107: a fork, but without a following
1.15 jmc 108: .Xr exec 3 ,
1.12 aaron 109: .Sq C
110: indicates the command was run in PDP-11 compatibility mode
1.1 deraadt 111: (VAX only),
1.12 aaron 112: .Sq D
113: indicates the command terminated with the generation of a
1.1 deraadt 114: .Pa core
1.12 aaron 115: file, and
116: .Sq X
117: indicates the command was terminated with a signal.
1.1 deraadt 118: .Sh FILES
119: .Bl -tag -width /var/account/acct -compact
120: .It Pa /var/account/acct
1.8 aaron 121: default accounting file
1.1 deraadt 122: .El
123: .Sh SEE ALSO
124: .Xr last 1 ,
1.6 espie 125: .Xr sigvec 3 ,
1.1 deraadt 126: .Xr acct 5 ,
1.10 alex 127: .Xr core 5 ,
128: .Xr accton 8
1.1 deraadt 129: .Sh HISTORY
130: The
131: .Nm lastcomm
132: command appeared in
133: .Bx 3.0 .