Annotation of src/usr.bin/lastcomm/lastcomm.1, Revision 1.10
1.10 ! alex 1: .\" $OpenBSD: lastcomm.1,v 1.9 1998/11/11 23:01:44 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
39: .Os BSD 3
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
57: Option:
58: .Bl -tag -width Fl
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
86: .Ar ttyd0 .
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
94: Flags, as accumulated by the accounting facilities in the system.
95: .It
1.8 aaron 96: Command name under which the process was called.
1.1 deraadt 97: .It
1.8 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
105: The flags are encoded as follows: ``S'' indicates the command was
106: executed by the super-user, ``F'' indicates the command ran after
107: a fork, but without a following
108: .Xr exec ,
109: ``C'' indicates the command was run in PDP-11 compatibility mode
110: (VAX only),
111: ``D'' indicates the command terminated with the generation of a
112: .Pa core
113: file, and ``X'' indicates the command was terminated with a signal.
114: .Sh FILES
115: .Bl -tag -width /var/account/acct -compact
116: .It Pa /var/account/acct
1.8 aaron 117: default accounting file
1.1 deraadt 118: .El
119: .Sh SEE ALSO
120: .Xr last 1 ,
1.6 espie 121: .Xr sigvec 3 ,
1.1 deraadt 122: .Xr acct 5 ,
1.10 ! alex 123: .Xr core 5 ,
! 124: .Xr accton 8
1.1 deraadt 125: .Sh HISTORY
126: The
127: .Nm lastcomm
128: command appeared in
129: .Bx 3.0 .