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