Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OUTPUT OF LASTCOMM COMMAND

Status
Not open for further replies.

conquersmile

Technical User
Aug 29, 2003
20
AU
Hello,

I want to have a snapshot of the output of the lastcomm command.

I cannot access it due to some settings to be done at admin side.

Before asking my sys admn to do that, I want to see the output and know if this command is what i have been looking for.

Regards,
Padma Swamy
 
Try doing a man on the command lastcomm. this will show you info about the command.

man lastcomm

 
Here is a bit of my lastcomm output

ls root __ 0.22 secs Tue Oct 21 13:18
lastcomm harris79 pts/18 0.23 secs Tue Oct 21 13:17
sh S root pts/18 0.36 secs Tue Oct 21 13:16
find root pts/18 23.46 secs Tue Oct 21 13:16
mail S root pts/18 0.11 secs Tue Oct 21 13:16
cat root pts/18 0.05 secs Tue Oct 21 13:16
quota root pts/18 0.07 secs Tue Oct 21 13:16
ksh F harris79 pts/18 0.03 secs Tue Oct 21 13:16
sh S root pts/18 0.35 secs Tue Oct 21 13:09
lastcomm root pts/18 0.14 secs Tue Oct 21 13:10
ls root pts/18 0.07 secs Tue Oct 21 13:10
mv root pts/18 0.05 secs Tue Oct 21 13:10
ls root pts/18 0.08 secs Tue Oct 21 13:09
grep root pts/18 0.07 secs Tue Oct 21 13:09
ps root pts/18 0.44 secs Tue Oct 21 13:09
sendmail SF root __ 5.96 secs Tue Oct 14 08:54
mail S root pts/18 0.10 secs Tue Oct 21 13:09
cat root pts/18 0.05 secs Tue Oct 21 13:09
quota root pts/18 0.07 secs Tue Oct 21 13:09
grep harris79 pts/18 0.10 secs Tue Oct 21 13:09
ps harris79 pts/18 0.49 secs Tue Oct 21 13:09
lastcomm harris79 pts/18 0.13 secs Tue Oct 21 13:09
ls harris79 pts/18 0.17 secs Tue Oct 21 13:09
sendmail SF root __ 0.06 secs Tue Oct 21 13:09
df harris79 pts/18 0.10 secs Tue Oct 21 13:09
lastcomm harris79 pts/18 0.12 secs Tue Oct 21 13:08
lastcomm harris79 pts/18 0.12 secs Tue Oct 21 13:08
sh S root pts/18 0.36 secs Tue Oct 21 13:06
lastcomm root pts/18 0.10 secs Tue Oct 21 13:07
ls root pts/18 0.12 secs Tue Oct 21 13:07

Steve
 
Thank you Steve,

I think this is what I was looking for,

As you know last command gives ip address, login time but does not give me the command executed during that time.

i hope combination of the both the commands will help me because i want to generate a report which shows

LOGINNAME IP ADDRESSS TIME COMMAND EXECUTED

This is a kind of health check i want to do to my area to see if there is anybody else logging in with my id and if yes then what is being done.

Once again thank u
Regards
Padma Swamy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top