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

  man pages->IRIX man pages -> utmpx (4)              
Title
Content
Arch
Section
 

Contents


utmpx(4)							      utmpx(4)


NAME    [Toc]    [Back]

     utmpx, wtmpx - utmp and wtmp extended-format entries

SYNOPSIS    [Toc]    [Back]

     #include <utmpx.h>

DESCRIPTION    [Toc]    [Back]

     utmpx and wtmpx files are extended	versions of utmp and wtmp, resp.,
     containing	records	of type	struct utmpx.  The utmpx struct	is a superset
     of	the utmp struct, containing both additional fields and larger array
     allocation	for several existing fields.  utmpx's most significant
     addition is the ut_host field, which identifies the host from which the
     entry's job originated (if	applicable).  All Silicon Graphics X terminal
     emulators initialize the field to $DISPLAY	(see xdm(1)), but it may be
     blank (eg.	a dumb terminal	connected to a serial port).  Also, utmpx's
     ut_user and ut_line fields	accommodate longer strings than	their utmp
     counterparts.

     utmpx and wtmpx records have the following	structure, defined in utmpx.h:

     #define UTMPX_FILE	  "/var/adm/utmpx"
     #define WTMPX_FILE	  "/var/adm/wtmpx"
     #define ut_name	  ut_user
     #define ut_xtime	  ut_tv.tv_sec

     struct	utmpx {
	char	ut_user[32];	 /* user login name */
	char	ut_id[4];	 /* /etc/inittab id (created by	*/
				 /* process that puts entry in utmp) */
	char	ut_line[32];	 /* device name	(console, lnxx)	*/
	pid_t	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 DEAD_PROCESS	*/
	struct timeval ut_tv;	 /* time entry was made	*/
	long ut_session;	 /* session ID,	used for windowing */
	long pad[5];		 /* reserved for future	use */
	short ut_syslen;	 /* length of ut_host including	null */
	char ut_host[257];	 /* remote host	name */
     };
     /*	 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 */


									Page 1






utmpx(4)							      utmpx(4)



     #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 31 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"

FILES    [Toc]    [Back]

     /var/adm/utmpx
     /var/adm/wtmpx

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.

CAVEATS    [Toc]    [Back]

     Although the ut_host field	accommodates 257-character strings (256	chars
     + NULL), many commands truncate it	for simpler formatting.	 "w -W"
     displays the ut_host field	on a new line, and in its entirety.

SEE ALSO    [Toc]    [Back]

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


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
wtmp HP-UX utmp, wtmp, btmp entry format
btmp HP-UX utmp, wtmp, btmp entry format
utmp HP-UX utmp, wtmp, btmp entry format
utmp IRIX utmp and wtmp entry formats
login FreeBSD log a new login record to the utmp and wtmp files
getutent Linux access utmp file entries
getutent Tru64 Access utmp file entries
getutid_r Tru64 Access utmp file entries
getutid Tru64 Access utmp file entries
getutent_r Tru64 Access utmp file entries
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service