COHERENT manpages
This page displays the COHERENT manpage for utmp.h [Login accounting information].
List of available manpages
Index
utmp.h -- Header File Login accounting information #include <utmp.h> Header file <utmp.h> defines the types and constants that are used to manipulate the system-adminstration files /etc/utmp and /usr/adm/wtmp. The former file describes every user who is currently logged into your system; the latter records when each user logged into your system and logged out again. Each of these files consists of records, each of which has are objects of type utmp, which <utmp.h> defines as follows: struct utmp { char ut_user[8]; char ut_id[4]; char ut_line[12]; short ut_pid; short ut_type; struct exit_status { short e_termination; short e_exit; } ut_exit; time_t ut_time; }; The following describes each field in utmp: ut_user The login identifier of the user. ut_id The user's identifier, as taken from /etc/init. ut_line The device through which the user logged in. ut_pid The process identifier of the user's shell. ut_type Type of entry in this file. This can be any of the following values: EMPTY An empty entry RUN_LVL Run level BOOT_TIME Boot time OLD_TIME NEW_TIME INIT_PROCESS Process spawned by init LOGIN_PROCESS A getty waiting for a login USER_PROCESS A user process DEAD_PROCESS ACCOUNTING ut_exit The process's exit status. It consists of the following fields: e_termination Process's termination status. e_exit Process's exit status. ut_time The time the user logged on. The following functions use this header file: endutent().....Close the logging file. getutent().....Read the next entry from /etc/utmp. getutid()......Find an entry in /etc/utmp by login identifier. getutline()....Find an entry in /etc/utmp by login device. pututline()....Write a record into /etc/utmp. setutent().....Rewind the input stream that is reading /etc/utmp utmpname().....Manipulate a file other than /etc/utmp. Each function is described in its own Lexicon entry. Files /etc/utmp /usr/adm/wtmp See Also ac, header files, login, utmp, who, wtmp