Linux 1.2 Slackware. Problem: entries given by 'last' command
are off by one. Example: I truncate the wtmp file (cat > wtmp)
and reboot. Sessions at the console are logged correctly with
correct login and logout times, but if I start X (using startx
command) then I don't see any ttypx entries for xterms. If
I log an xterm out, then an entry shows up under 'last', with
the actual logout time given as the reported login time, and
saying that I am "still logged in"
Here are some excerpts, first from finger, then from last.
ttyp2 shown under last is an xterm which I started after
starting X (used a menu item to do so), and then logged out of
it a minute later. Note that I start xterm with the +ut option.
:: bash# finger
:: Login Name Tty Idle Login Time Office Office Ph
:: templon Jeff Templon 1 21 May 19 12:49 26-452 8-5442
:: templon Jeff Templon p1 May 19 12:49 [ :0.0 ]
:: templon Jeff Templon p0 16 May 19 12:49 [ :0.0 ]
:: bash# last -4
:: templon ttyp2 :0.0 Fri May 19 12:50 still logged in
:: templon tty1 Fri May 19 12:49 still logged in
:: templon tty1 Fri May 19 12:47 - 12:48 (00:01)
:: runlevel ~ Fri May 19 12:46
Any suggestions welcome.
JT