chkutent(1M)
chkutent - check and repair utmp entries
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME chkutent - check and repair utmp entries SYNOPSIS chkutent [-f utmpx-file][-w wtmpx-file] DESCRIPTION chkutent opens and reads /var/adm/utmpx and makes 2 checks for consistency; whether there are any entries that have duplicate 'id' fields, and whether there are any entries that are stale. Stale entries are found by looking at all entries that have ut_type equal to USER_PROCESS and checking to see if the process (specified by ut_pid) is still alive. If it isn't, it sets the ut_type to DEAD_PROCESS and sets the process's termination time to the current time. It then makes sure that the files utmp, wtmp, and wtmpx are all consistent. Keeping the utmp file(s) consistent and up to date is important for accounting, last(1), and other system administration functions. However, these files are updated by a variety of programs, some of which are public domain programs. If these programs are terminated without giving them the opportunity to clean up their utmp entry, the files can easily get out of sync. The exact algorithm for updating the utmp files is also notoriously non-standard, so many third party or public domain applications may not quite do it correctly for IRIX. For these reasons, chkutent is run by cron(1M) every night and if any erroneous entries are found, they are repaired and a report sent to the system administrator. There are cases of corruption that chkutent cannot correct - in this case a message is printed with the word CORRUPT, and chkutent terminates without any further actions. If an administrator gets messages from chkutent frequently they may wish to start an investigation into which program(s) on the machine are generating them. Infrequent messages can safely be ignored. The following is a list of messages and probable causes: chkutent:ERROR:write failed on:xx The write to the utmpx file to correct a duplicate entry failed. This is likely due to an out of space condition on the file system that contains the utmpx file. chkutent:utmpx file xx CORRUPT with dup entry and neither entry `DEAD' There is a duplicate entry (two entries with the same `id') but chkutent didn't know how to fix it since both entries claim to represent still existing sessions. Action to correct this problem should be taken promptly. Having everyone log out and then running chkutent will usually work. Otherwise, the utmp and utmpx files should be made zero length and the system rebooted. chkutent:ERROR:Could not update utmpx file The call to pututxline(3) failed. This is usually due to either an out of space problem or that the utmp file corresponding to the utmpx file doesn't exist. It is important that both files exist - it is sufficient to simply touch(1) the missing file. utmpx fix - xx xx xx xx - see chkutent(1M) This is `normal' message printed each time chkutent finds an entry that represents a stale session. If no other error message are printed, it can be assumed that this entry was fixed. utmpx dup - xx xx xx xx - see chkutent(1M) This message printed each time chkutent finds a duplicate entry. This represents a serious corruption of the utmpx file. If this kind of corruption is frequently seen it is imperative that the offending program(s) be tracked down and fixed. If no other error message are printed, it can be assumed that this entry was fixed. The chkutent program may be run at any time by an administrator. chkutent does take an optional -f utmpx-file argument to let it operate on any utmpx-like file. Similarly, the optional -w wtmpx-file argument instructs chkutent to operate on the given file when updating the wtmp records. If the -f option is given without the -w option, no wtmp processing is done. FILES /var/adm/utmp /var/adm/utmpx /var/adm/wtmp /var/adm/wtmpx SEE ALSO getutx(3C)