From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tom Linden Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: last, who and ps Date: Fri, 01 Nov 2002 08:09:53 -0800 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1036167004 9433 80.91.224.249 (1 Nov 2002 16:10:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 1 Nov 2002 16:10:04 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 187eMw-0002Qs-00 for ; Fri, 01 Nov 2002 17:09:59 +0100 Original-Received: (qmail 16848 invoked by uid 5); 1 Nov 2002 16:11:07 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 16839 invoked by uid 49493); 1 Nov 2002 16:11:07 -0000 Original-Received: from tom@kednos.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.51. spamassassin: 2.50-cvs. Clear:SA:0(-4.0/5.0):. Processed in 0.424069 secs); 01 Nov 2002 16:11:07 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 1 Nov 2002 16:11:07 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H4W00ASKNMH48@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 01 Nov 2002 11:11:07 -0500 (EST) Original-Received: from freja.kednos.com (freja.kednos.com [206.160.220.7]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with SMTP id <0H4W00I7BNMD3M@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 01 Nov 2002 11:11:03 -0500 (EST) Original-Received: from unknown.hostname (206.160.220.11) by freja.kednos.com (V5.1-15H, OpenVMS V7.3 Alpha); Fri, 01 Nov 2002 07:10:45 -0700 (PDT) Original-To: Tru64 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Xref: main.gmane.org gmane.os.tru64.managers:2289 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2289 Based on the explanation provided below, it appears that ftp exited without cleaning up. On login (telnet/ssh), a record is written to each of /var/adm/utmp, /var/adm/wtmp, and /var/adm/lastlog. utmp contains one record per terminal, which gets emptied (zeroed-out) at logout. wtmp cotains one record for each login and logout; this is cumulative. lastlog is only the most recent login for each user (one record for every user, if user has never logged-in, his/her record is empty). "last" reads wtmp, and displays the login and logout entries in a nice readable format. If there is no logout entry for a session, then it says "Still logged in". "finger" look at utmp, if an entry is found for the user, it is displayed as "On since DATE on TTY from HOST", if a utmp ercord is not found for the user, then lastlog is used and the output is "Last logged in DATE on TTY from HOST" "who" and "w" look at utmp. idle times are generated by subtracting the "last modified" timestamp of the terminal device from the current time. FTP is usually not considered an "active" login, it is passive. Therefore Compaq's ftpd doesn't (shouldn't) write to utmp or lastlog; it only writes to wtmp. This is why you can see ftp in "last" but not "finger", "w", or "who". If you did a "ps ax | grep ftpd" or a "netstat -n | grep '\.22 '", I think you'd find the ftp process in question. If not, then the process exitted without cleaning-up (wrtting a logout rec to wtmp). > On a 4.0d system, if I run 'last' I see the following: > > ftp ftp testarossa.intel Mon Oct 28 14:59 still logged in > > but neither 'who' nor 'ps' provide anymore information. Anybody > have an expalantion? > > On a related note, 'lastcomm' complains that it can't find > /var/adm/pacct, which indeed doesn't exist. Is it 'runacct' to turn on > accounting? mike caplin ____________________________________________________________________________ ___ mcaplin@miami.edu --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002