Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-27-2004, 12:58 AM   #1
Registered: Feb 2003
Distribution: Redhat
Posts: 58

Rep: Reputation: 15
Event logging


I have a Redhat linux Server.

I would like to configure it in such a way that it displays the last login and logout date and time for a particular when he login to the system.

Currently it displays the last login time and date, but not logout.

Please let me know how to configure it to display both.

Old 10-27-2004, 08:18 AM   #2
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
I think a lot of that information may be stored in /var/log/wtmp. However, I'm not that familiar with parsing through wtmp to make any useful information. A script-based way to obtain information is by using the last <username> commandl and then yank out the info you need. For instance, when I type in last neil from the command prompt of one of my servers, I get this:
neil     pts/198      h10-215-220-46.  Tue Oct 19 15:15 - 16:56  (01:41)
neil     pts/197      h10-215-220-46.  Tue Oct 19 14:33 - 14:58  (00:24)
Username, terminal, hostname I connected from, Date/time when I connected through when I disconnected, and lastly my duration in (HH:MM) format.
Old 10-28-2004, 12:59 AM   #3
Registered: Feb 2003
Distribution: Redhat
Posts: 58

Original Poster
Rep: Reputation: 15
Thankyou Niel



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Capturing rem1986 Linux - General 2 12-13-2005 12:11 PM
Timer Event wallwaters Linux - Software 1 05-26-2005 09:46 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM
Event Sounds.. jhorvath Slackware 2 10-01-2002 04:13 PM
New IP address event ? krumholz Linux - Networking 2 08-01-2002 12:02 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration