UTMP(4) DOMAIN/IX Reference Manual (SYS5) UTMP(4)
NAME
utmp - log-in records
USAGE
#include <utmp.h>
DESCRIPTION
The utmp file records information about who is currently
using the node. The file is a sequence of entries with the
following structure declared in the include file:
/* <sys/types.h> must be included */
#define UTMP_FILE ``/etc/utmp''
struct utmp {
char ut_user[32]; /* user login name */
char ut_id[4]; /* /etc/lines id (usually line #) */
char ut_line[12]; /* tty name */
short ut_pid; /* process id */
short ut_type; /* type of entry */
struct exit_status {
short e_termination; /* process termination status */
short e_exit; /* process exit status */
} ut_exit; /* the exit status of a process
/* marked as DEAD_PROCESS */
time_t ut_time; /* time entry was made */
char ut_host[32]; /* host name, if remote */
};
#define ut_name ut_user
/* definitions for ut_type */
#define EMPTY 0
#define RUN_LVL 1
#define BOOT_TIME 2
#define OLD_TIME 3
#define NEW_TIME 4
#define INIT_PROCESS 5 /* process spawned by ``init'' */
#define LOGIN_PROCESS 6 /* ``getty'' process waiting for login */
#define USER_PROCESS 7 /* user process */
#define DEAD_PROCESS 8
#define ACCOUNTING 9
#define UTMAXTYPE ACCOUNTING /* largest ut_type value */
/* special strings or formats used in the ut_line field when */
/* accounting for something other than a process */
/* no string for the ut_line field can be more than 11 chars + */
/* a NULL in length */
#define RUNLVL_MSG ``run-level %c''
#define BOOT_MSG ``system boot''
Printed 1/27/86 UTMP-1
UTMP(4) DOMAIN/IX Reference Manual (SYS5) UTMP(4)
#define OTIME_MSG ``old time''
#define NTIME_MSG ``new time''
This structure gives the name of the special file associated
with the user's terminal, the user's log-in name, and the
time of the log-in in the form of time (3).
FILES
/etc/utmp record of who is currently using the node
(link to `node_data/etc.utmp)
RELATED INFORMATION
login(1)
who(1)
UTMP-2 Printed 1/27/86