home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10423 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.3 KB

  1. Path: sparky!uunet!mcsun!uknet!news.cs.bham.ac.uk!idf
  2. From: idf@cs.bham.ac.uk (Ian Fitchet)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: How to determine user login time in minutes?
  5. Message-ID: <IDF.92Aug27111645@fat-controller.cs.bham.ac.uk>
  6. Date: 27 Aug 92 11:16:45 GMT
  7. References: <cosmo.714854795@cherry>
  8. Sender: news@cs.bham.ac.uk
  9. Organization: School of Computer Science, University of Birmingham
  10. Lines: 22
  11. In-Reply-To: cosmo@cherry.ucsb.edu's message of 26 Aug 92 18:46:35 GMT
  12. Nntp-Posting-Host: fattie
  13.  
  14. > On 26 Aug 92, Boris wrote
  15.  
  16. > I'd like to keep track of how long I've used the system.  This should be done
  17. > in my .logout file.  I've played around with "last," but it won't give me the
  18. > time for the _current_ session (it says "still logged in").  
  19.  
  20. > Is there a utility that I'm missing?  Or does someone know of a script 
  21. > (preferably in Perl) that will figure out the login time?
  22.  
  23.  If you want to use last then why not background the job in your
  24. .logout, sleep&loop until the "still logged in" is replaced with the
  25. timestamp then do your numbering with that.
  26.  
  27. --
  28. Cheers,
  29.  
  30.     Ian
  31.  
  32. -------------------------------------------------------------------------------
  33. Ian Fitchet                           I.D.Fitchet@cs.bham.ac.uk
  34. School of Computer Science
  35. Univ. of Birmingham, UK, B15 2TT
  36.