*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> utmp (4)              


utmp(4)								       utmp(4)

NAME    [Toc]    [Back]

     utmp, wtmp	- utmp and wtmp	entry formats

SYNOPSIS    [Toc]    [Back]

     #include <utmp.h>

DESCRIPTION    [Toc]    [Back]

     These files, which	hold user and accounting information for such commands
     as	who, last, write, and login, contain entries with the following
     structure,	defined	in utmp.h:

     #define UTMP_FILE	 "/var/adm/utmp"
     #define WTMP_FILE	 "/var/adm/wtmp"
     #define ut_name	 ut_user

     struct	utmp {
	char	ut_user[8];	 /* user login name */
	char	ut_id[4];	 /* /etc/inittab id (created by	*/
				 /* process that puts entry in utmp) */
	char	ut_line[12];	 /* device name	(console, lnxx)	*/
	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;		 /* exit status	of a process */
				 /* marked as DEAD_PROCESS */
	time_t	ut_time;	 /* time entry was made	*/
     /*	 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   /* a "getty" process waiting for	login */
     #define USER_PROCESS  7   /* a user process */
     #define DEAD_PROCESS  8
     #define ACCOUNTING	   9
     #define UTMAXTYPE	   ACCOUNTING /* max legal value of ut_type */
     /*	 Below are the special strings or formats used in the "ut_line"	*/
     /*	 field when accounting for something other than	a process.  */
     /*	 Strings for the ut_line field must be no more than 11 chars +	*/
     /*	 terminating NULL in length.  */

     #define RUNLVL_MSG	    "run-level %c"
     #define BOOT_MSG	    "system boot"
     #define OTIME_MSG	    "old time"
     #define NTIME_MSG	    "new time"

									Page 1

utmp(4)								       utmp(4)

FILES    [Toc]    [Back]


WARNING    [Toc]    [Back]

     All changes to /var/adm/wtmp must also be logged in /var/adm/wtmpx.  Most
     commands that extract information from these files	silently discard all
     wtmpx entries without wtmp	complements.

SEE ALSO    [Toc]    [Back]

     w(1), login(1), who(1), last(1), utmpx(4),	write(1), getut(3C),
     getutx(3C), chkutent(1M)

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
utmp HP-UX utmp, wtmp, btmp entry format
wtmp HP-UX utmp, wtmp, btmp entry format
btmp HP-UX utmp, wtmp, btmp entry format
login FreeBSD log a new login record to the utmp and wtmp files
utmpx IRIX utmp and wtmp extended-format entries
updwtmp Linux append an entry to the wtmp file
logout FreeBSD remove an entry from the utmp file
logwtmp FreeBSD append a new record to the wtmp file
rpccp_add_member HP-UX Adds a member to a group in a name service entry; if the specified entry does not exist, creates the entry
rpccp_add_element HP-UX Adds an element to a profile in a name service entry; if the specified entry does not exist, creates the entry
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service