utmp

Entry in a user-information file

Synopsis:

struct utmp {
    char    ut_user[UT_NAMESIZE];
#define ut_name ut_user
    char    ut_id[4];
    char    ut_line[UT_LINESIZE];
    pid_t   ut_pid;
    short   ut_type;
    struct exit_status {
        short   e_termination;
        short   e_exit;
    } ut_exit;
    short   ut_spare;
    time_t  ut_time;
};

Description:

The utmp structure describes an entry in a user-information file. The members include:

ut_user
The user's login name.
ut_id
The line number.
ut_line
The device name (console).
ut_pid
The process ID.
ut_type
The type of entry. The possible values are:
ut_exit
The exit status of a process marked as DEAD_PROCESS. The structure exit_status includes at least the following members:
ut_time
The time that this entry was made.

Classification:

Unix

See also:

endutent(), getutent(), getutid(), getutline(), pututline(), setutent(), utmpname()

login in the Utilities Reference