[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: last -t lists all entries in wtmp



On Thu, 2005-07-21 at 23:03 +0000, J.A. de Vries wrote:
> Hi,
> 
> For a monitor script I thought I'd use the -t switch of the last command
> hoping to get only the latest entries from wtmp. Seems there's something
> wrong there, since it will return all entries in wtmp regardless. Before
> I submit a bugreport I'd like to know if anyone on the list has noticed
> the same.
> 
> The exact command I used is "last -t 20050721000000" on a host running
> Etch (updated today, but it happened before the upgrade as well).
> 
> Another weird thing "last -t 2005072000000" will work without an error
> (note this is YYYYMMDDHHMMS<- not SS). Cutting off a second digit from
> the end will result in an error (as I'd expect). Using another time
> instead of midnight shows the same behavior (so it's not specific for
> the zeros).
> 
> A last experiment (pun intended) with "last -x" returned all entries in
> wtmp too and not just the runlevel changes... not what I expected from
> reading the manpage.
> 
> Could someone confirm this for me before I go bark against some tree in
> the BTS please?
> 

I think it's a question of interpretation of the man pages. To me it
seems that '-x' *also* gives the runlevel info; and that '-t' gives all
entries *up to* a date (as opposed to since or on that date)....
-- 
Michael Bane
Atmospheric Physics Group
University of Manchester



Reply to: