LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-26-2013, 09:35 PM   #1
liaott
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Rep: Reputation: Disabled
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!
 
Old 10-27-2013, 04:06 AM   #2
liaott
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-27-2013, 07:21 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,007

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
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.
 
Old 10-27-2013, 09:40 PM   #4
liaott
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-28-2013, 05:07 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,007

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
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.

Last edited by jpollard; 10-28-2013 at 05:09 AM.
 
Old 10-28-2013, 09:56 PM   #6
liaott
LQ Newbie
 
Registered: Oct 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
The following is my system/release:

Distributor ID: SUSE LINUX
Description: SUSE Linux Enterprise Server 11 (x86_64)
Release: 11
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The lastcomm command not showing full command. a.abdulna Linux - Newbie 10 02-13-2013 08:51 AM
can a tty execute command on another tty? BeacoN Linux - Desktop 3 11-08-2008 09:39 AM
Regarding lastcomm jpsingh Linux - General 1 01-03-2007 03:29 AM
errors with lastcomm and sa danrod Linux - Software 0 03-26-2006 12:40 PM
lastcomm and .bz2 accounting files dazdaz Linux - General 0 01-17-2006 03:39 AM


All times are GMT -5. The time now is 06:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration