From nobody@FreeBSD.ORG Tue Oct  5 18:03:16 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id AF9B814F98; Tue,  5 Oct 1999 18:02:43 -0700 (PDT)
Message-Id: <19991006010243.AF9B814F98@hub.freebsd.org>
Date: Tue,  5 Oct 1999 18:02:43 -0700 (PDT)
From: pfeifer@dbai.tuwien.ac.at
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: /usr/binlast does not accept input from stdin nor does it process .gz files
X-Send-Pr-Version: www-1.0

>Number:         14150
>Category:       misc
>Synopsis:       /usr/binlast does not accept input from stdin nor does it process .gz files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct  5 18:10:02 PDT 1999
>Closed-Date:    Wed Oct 6 02:44:36 PDT 1999
>Last-Modified:  Wed Oct  6 10:50:01 PDT 1999
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 3.2-RELEASE
>Organization:
Vienna University of Technology
>Environment:
FreeBSD canopus.dbai.tuwien.ac.at 3.2-RELEASE FreeBSD 3.2-RELEASE #0:
Tue Sep  7 20:20:49 CEST 1999
pfeifer@canopus.dbai.tuwien.ac.at:/usr/src/sys/compile/GERALD  i386
>Description:
/usr/binlast does not accept input from stdin nor does it process
.gz files.

So, why is this a problem? After all, there is the -f option, right?

This is not sufficient, as FreeBSD gzips the current wtmp once a
month to /var/log/wtmp.Month.gz and the -f option does not work with
.gz files.
>How-To-Repeat:

>Fix:
1. Make /usr/bin/last accept wtmp format on stdin.
2. Enable /usr/bin/last to process .gz files.

>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@ucb.crimea.ua>
To: pfeifer@dbai.tuwien.ac.at
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/14150: /usr/binlast does not accept input from stdin nor does it process .gz files
Date: Wed, 6 Oct 1999 10:20:01 +0300

 On Tue, Oct 05, 1999 at 06:02:43PM -0700, pfeifer@dbai.tuwien.ac.at wrote:
 > 
 > /usr/bin/last does not accept input from stdin nor does it process
 > .gz files.
 > 
 > So, why is this a problem? After all, there is the -f option, right?
 > 
 Right :-)
 
 `/usr/bin/last -f /dev/stdin < wtmp-format-file' will do the trick.
 
 As for .gz files, it's bloat.
 
 
 -- 
 Ruslan Ermilov		Sysadmin and DBA of the
 ru@ucb.crimea.ua	United Commercial Bank,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.247.647	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Wed Oct 6 02:44:36 PDT 1999 
State-Changed-Why:  
Adding gzip capabilities to last would be considered extraneous to most. 
I'd suggest the originator removes the Z from the wtmp line in newsyslog.conf 

From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: Ruslan Ermilov <ru@ucb.crimea.ua>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: misc/14150: /usr/binlast does not accept input from stdin nor
 does it process .gz files
Date: Wed, 6 Oct 1999 19:38:43 +0200 (MET DST)

 On Wed, 6 Oct 1999, Ruslan Ermilov wrote:
 >> So, why is this a problem? After all, there is the -f option, right?
 > Right :-)
 > 
 > `/usr/bin/last -f /dev/stdin < wtmp-format-file' will do the trick.
 
 Hmm, but unfortunately
 
   % zcat /var/log/wtmp.Aug.gz | /usr/bin/last -f /dev/stdin
   last: /dev/stdin: Illegal seek
 
 does not work. Even with that nice trick I still do not see how I can
 use last for one of those gzipped wtmp files in /var/log.
 
 > As for .gz files, it's bloat.
 
 Fully agreed. That why I filed the report to ask for /usr/bin/last 
 also accepting its input from stdin so that I can just issue
 
   % zcat /var/log/wtmp.Aug.gz | last 
 
 Sorry if my original GNATS submission did not specify this clearly enough.
 
 Gerald
 -- 
 Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
 
 
>Unformatted:
