Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wtmps(4) [hpux man page]

wtmps(4)						     Kernel Interfaces Manual							  wtmps(4)

NAME
wtmps, btmps - user login information SYNOPSIS
DESCRIPTION
and hold user and accounting information for such commands as and (see last(1), who(1), write(1), and login(1)). File contains bad login entries for each invalid logon attempt. File contains a record for all logins and logouts apart from accounting records. These files contain structure, the key elements of the structure are given below: char ut_user[] User login name char ut_id[] Unique Id to distinguish an entry char ut_line[] Device name pid_t ut_pid Process Id short ut_type Type of Entry struct ut_exit The exit status of a process struct timeval ut_tv Time entry was made char ut_host[] Host name, if remote uint8_t ut_addr[] Internet Address of the Host, if remote short ut_addr_type Flag to identify type of address in ut_addr #define WTMPS_FILE "/var/adm/wtmps" #define BTMPS_FILE "/var/adm/btmps" Note that and tend to grow without bound, and should be checked regularly. Information that is no longer useful should be removed periodi- cally to prevent the file from becoming too large. Also note that and are not created by the programs that maintain them. Thus, if these files are removed, login record-keeping is turned off. AUTHOR
and were developed by Hewlett-Packard Company. FILES
SEE ALSO
last(1), login(1), who(1), write(1), acctcon(1M), fwtmp(1M), wtmpfix(1M), getuts(3C). wtmps(4)

Check Out this Related Man Page

utmp(4) 						     Kernel Interfaces Manual							   utmp(4)

NAME
utmp, wtmp, btmp - user login record format SYNOPSIS
DESCRIPTION
These files, which hold user and accounting information for such commands as and (see last(1), who(1), write(1), and login(1)), have the following structure as defined by #define UTMP_FILE "/etc/utmp" #define WTMP_FILE "/var/adm/wtmp" #define BTMP_FILE "/var/adm/btmp" #define ut_name ut_user struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id(usually line#)*/ char ut_line[12] /* 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; /* The exit status of a process*/ /* marked as DEAD_PROCESS.*/ unsigned short ut_reserved1; /* Reserved for future use*/ time_t ut_time; /* time entry was made*/ char ut_host[16]; /* host name,if remote*/ unsigned long ut_addr; /* host Internet addr, if remote*/ }; /* 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 /* getty process awaiting login */ #define USER_PROCESS 7 /* A user process */ #define DEAD_PROCESS 8 #define ACCOUNTING 9 #define UTMAXTYPE ACCOUNTING /* Max. legal value of ut_type */ /* Special strings or formats used in the "ut_line" field */ /* when accounting for something other than a process */ /* No string for the ut_line field can be more than */ /* 11 chars + a NULL in length */ #define RUNLVL_MSG "run-level %c" #define BOOT_MSG "system boot" #define OTIME_MSG "old time" #define NTIME_MSG "new time" File contains a record of all users logged onto the system. File contains bad login entries for each invalid logon attempt. File contains a record of all logins and logouts. Note that and tend to grow without bound, and should be checked regularly. Information that is no longer useful should be removed periodi- cally to prevent it from becoming too large. Also note that and are not created by the programs that maintain them. Thus, if these files are removed, record-keeping is turned off. FILES
AUTHOR
and were developed by HP and the University of California, Berkeley. SEE ALSO
last(1), login(1), who(1), write(1), acctcon(1M), fwtmp(1M), utmpd(1M), getut(3C), getuts(3C), getutx(3C). STANDARDS CONFORMANCE
TO BE OBSOLETED utmp(4)
Man Page