]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/lastcomm/lastcomm.1
This commit was generated by cvs2svn to compensate for changes in r154182,
[FreeBSD/FreeBSD.git] / usr.bin / lastcomm / lastcomm.1
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     From: @(#)lastcomm.1    8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD$
34 .\"
35 .Dd September 18, 1996
36 .Dt LASTCOMM 1
37 .Os
38 .Sh NAME
39 .Nm lastcomm
40 .Nd show last commands executed in reverse order
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl EScesu
44 .Op Fl f Ar file
45 .Op Ar command ...\&
46 .Op Ar user ...\&
47 .Op Ar terminal ...\&
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility gives information on previously executed commands.
52 With no arguments,
53 .Nm
54 prints information about all the commands recorded
55 during the current accounting file's lifetime.
56 .Pp
57 The following options are available:
58 .Bl -tag -width indent
59 .It Fl E
60 Print the time the process exited.
61 .It Fl S
62 Print the time the process started.
63 .It Fl c
64 Print the amount of cpu time used by the process.
65 .It Fl e
66 Print the amount of elapsed time used by the process.
67 .It Fl s
68 Print the amount of system time used by the process.
69 .It Fl u
70 Print the amount of user time used by the process.
71 .It Fl f Ar file
72 Read from
73 .Ar file
74 rather than the default
75 .Pa /var/account/acct .
76 .El
77 .Pp
78 If no options are specified,
79 .Fl cS
80 is assumed.
81 If
82 .Nm
83 is invoked with arguments, only accounting entries with a
84 matching
85 .Ar command
86 name,
87 .Ar user
88 name,
89 or
90 .Ar terminal
91 name
92 are printed.
93 For example:
94 .Pp
95 .Dl lastcomm a.out root ttyd0
96 .Pp
97 would produce a listing of all the
98 executions of commands named
99 .Pa a.out
100 by user
101 .Ar root
102 on the terminal
103 .Ar ttyd0 .
104 .Pp
105 For each process entry, the following are printed.
106 .Pp
107 .Bl -bullet -offset indent -compact
108 .It
109 The name of the user who ran the process.
110 .It
111 Flags, as accumulated by the accounting facilities in the system.
112 .It
113 The command name under which the process was called.
114 .It
115 The amount of
116 CPU
117 .Pq Fl c ,
118 wall
119 .Pq Fl e ,
120 system
121 .Pq Fl s ,
122 or user
123 .Pq Fl u
124 time used by the process (in seconds).
125 .It
126 The time the process started
127 .Pq Fl S
128 or exited
129 .Pq Fl E .
130 .El
131 .Pp
132 The flags are encoded as follows: ``S'' indicates the command was
133 executed by the super-user, ``F'' indicates the command ran after
134 a fork, but without a following
135 .Xr exec 3 ,
136 .\" ``C'' indicates the command was run in PDP-11 compatibility mode
137 .\" (VAX only),
138 ``D'' indicates the command terminated with the generation of a
139 .Pa core
140 file, and ``X'' indicates the command was terminated with a signal.
141 .Sh FILES
142 .Bl -tag -width /var/account/acct -compact
143 .It Pa /var/account/acct
144 default accounting file
145 .El
146 .Sh SEE ALSO
147 .Xr last 1 ,
148 .Xr sigvec 2 ,
149 .Xr acct 5 ,
150 .Xr core 5
151 .Sh HISTORY
152 The
153 .Nm
154 command appeared in
155 .Bx 3.0 .