HP-UX 11i Version 2 Release Notes (October 2003)
Internet and Networking
IPv6 Support
Chapter 6
157
• who (accepts new wtmps database if invoked with -W option)
who (Reads in-memory utmps database)
who <file> (Reads utmp records from <file>)
who -W (Reads wtmps database)
• last (By default, last and lastb read the new wtmps and btmps databases. The
last and lastb commands continue to read files containing old utmp-like records by
using the -f option.)
last -f <file that contains utmp-like records>
last (Reads wtmps database)
• acctcon and acctcon1 (accept wtmps-like record from STDIN if invoked with -W
option)
acctcon1 -t -l lineuse -o reboots < wtmp (Reads utmp records from STDIN)
acctcon1 -W -t -l lineuse -o reboots < wtmps (Reads wtmps-like records from STDIN)
• acctwtmp (writes the new wtmps-like record to stdout if the -X option is used.
Otherwise, acctwtmp writes the old utmp-like record to stdout.)
acctwtmp `uname` [>> /var/adm/wtmp] (Writes utmp record to STDOUT)
acctwtmp -X `uname` [>>/var/adm/wtmps] (Writes wtmps-like to STDOUT)
• fwtmp (can be used to modify the new wtmps and btmps databases by using the -X
option. Without the -X option, fwtmp continues to work on files containing utmp-like
records.)
fwtmp -X < /var/adm/wtmps (For binary to ASCII conversion)
fwtmp -cX < /var/adm/wtmps (For binary to binary conversion)
fwtmp -iX </var/adm/wtmps (For ASCII to ASCII conversion)
fwtmp -icX < file1 >file2 (For ASCII to binary conversion)
• init (updates both the /etc/utmpx and the in-memory utmps databases. It also
updates both the /var/adm/wtmp and /var/adm/wtmps databases.
NOTE Accounting commands that are used to modify the wtmp and btmp files—namely
closewtmp, utmp2wtmp, and wtmpfix—now work on the new wtmps and btmps
databases. A new option, -X, has been provided for fwtmp, last/lastb, and acctwtmp for
accessing/modifying files containing wtmps-like records.
Impact
This solution is primarily intended for large server systems which support a large
number of users/login sessions. The solution speeds up the response time for users to log
in to such systems.
System parameters like nproc, max_thread_proc, maxfiles, maxfiles_lim, and nfile
should be appropriately tuned to support a large number of simultaneous login sessions.
Applications that use getutx APIs to read information from the /etc/utmpx file will not
see the entries being updated in real-time. There will be a time lag between the
applications updating the in-memory database of the utmpd and these entries being
reflected in the /etc/utmpx file.