why I cannot get tty info from lastcomm command?
Hi, guys
I installed acct package on a SUSE 11.1 with zypper, then I started acct with "/etc/init.d/acct start". After I logged on this system with a normal account and entered serveral commands, such as ls, cat, I can get the command list from lastcomm command like the following: ls userabc ?? 0.00 secs Sat Oct 26 02:00 The command, username, time are all correct, but the tty info is not correct, it shows "??", but not "pts/xx" as I expected. Did your guys encountered this issue? How did you solve that? Thanks in advance! |
Besides the above, I can only get tty name from tty1, tty2..., but for pseudo tty, I can only get "??" for its tty name.
Is this a bug for lastcomm? |
No - I don't believe ptys count as ttys unless they get recorded. What terminal emulator are you using? (as it has to be recorded by the emulator). It may be a bug in the emulator.
If you login via ssh I would expect it to show. Last only puts the ?? when the data field is null. |
Hi, jpollard
Thank you for your reply. I use putty, xshell as my emulator, and telnet to the server, but I got same "??" from them. Also I use xshell, ssh secure shell with ssh protocol to logon to the server, same "??". Do you think it's an emulator bug? My server is SUSE 11.1, installed acct-6.3.5 from http://download.opensuse.org/distrib...11.4/repo/oss/ with zypper command. |
Which system/release are you using? It works for me. (I'm using fedora 16/19 and it works on both).
The only commands without a tty are those running from cron and other services without a tty assigned. |
The following is my system/release:
Distributor ID: SUSE LINUX Description: SUSE Linux Enterprise Server 11 (x86_64) Release: 11 |
All times are GMT -5. The time now is 01:30 AM. |