Figure 1: utmp record structure as defined in utmp.h
struct utmp {
char ut_user[8]; /* User login name */
char ut_line[12]; /* Device 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;
time_t ut_time; /* Time entry was made */
stnet termio ut_termio; /* Saved login termio parameters */
};
|