Installation guide

The runacct shell script invokes the lastlogin shell script during its
CMS state. You can invoke the lastlogin shell script manually to update
the /var/adm/acct/sum/loginlog file, which is included in the
/var/adm/acct/sum/rprt
mmdd
daily report.
The lastlogin shell script has the following syntax:
/usr/sbin/acct/lastlogin
12.4.9 The last Command
The last command displays, in reverse chronological order, all login
records in the /var/adm/wtmp file. For each login session, the following
information is provided:
Time that the session began
Duration of the session
tty terminal on which the session took place
The following information is included when applicable:
Terminations when rebooting
Continuing sessions
The last command has the following syntax:
/usr/bin/last
[-#][username...] [ tty...]
By default, all records are displayed. You can specify a user name and a
terminal for which you want to display records.
The following example displays information only about the three previous
root logins:
# last -3 root
root ttyp1 shout Fri Jan 21 10:56 still logged in
root ttyp1 raven Fri Jan 21 08:59 - 09:00 (00:00)
root ttyp0 raven Thu Jan 20 15:29 - 15:54 (00:24)
12.5 Process Accounting
Process accounting occurs when a command, shell script, or program is
executed in the system. When a process exits, the kernel writes the process
accounting record to the /var/adm/pacct database file. Process
accounting records enable you to monitor program execution statistics. You
can use the ps command to get information about running processes. The
accton command creates the /var/adm/pacct file and turns on process
accounting.
12–20 Administering the System Accounting Services