1753785 Members
7668 Online
108799 Solutions
New Discussion юеВ

users logged in

 
SOLVED
Go to solution
Amit Manna_5
Advisor

users logged in

Can we check the users logged in for last one month on a unix box
7 REPLIES 7
likid0
Honored Contributor
Solution

Re: users logged in

You can allways use the last command

man last
Windows?, no thanks
Robert-Jan Goossens
Honored Contributor

Re: users logged in

Hi,

# last | more
or
# last | grep "Mar"

Regards,
Robert-Jan
Amit Manna_5
Advisor

Re: users logged in

hi
i could not see any login in Feb or March even though i logged into the box. Is there anything wrong
James R. Ferguson
Acclaimed Contributor

Re: users logged in

Hi Amit:

> I could not see any login in Feb or March even though i logged into the box. Is there anything wrong

When you run 'last' it tells you the *beginning* date of the log activity at the end of its run. Look there.

The absence of a '/var/adm/wtmp' file turns off logging. It is very common to null the file (cat /dev/null > /var/adm/wtmp), since like all log files, it grows without bounds.

Regards!

...JRF...
Ski Ride
Advisor

Re: users logged in

I belive the file is getting very big and throws the below error.

# last | grep "Mar"
Invalid record size. Unable to continue ...


Any suggestions?

Keep Smiling ;)
T G Manikandan
Honored Contributor

Re: users logged in

check if you could use the

#lastb

I think you need to trim the /var/adm/*tmps

should be the wtmps and btmps.
Dennis Handly
Acclaimed Contributor

Re: users logged in

>Ski Ride: Invalid record size. Unable to continue ...
>Any suggestions?

The file is corrupted. You might be able to write a program to see if you can read past the error.