*BSD News Article 23694


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!news.kei.com!news.byu.edu!cwis.isu.edu!u.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Newsgroups: comp.unix.bsd
Subject: Re: Time tracking
Date: 11 Nov 1993 04:57:24 GMT
Organization: Weber State University, Ogden, UT
Lines: 34
Message-ID: <2bsgnk$gm3@u.cc.utah.edu>
References: <2aukp0$241@galaxy.ucr.edu>
NNTP-Posting-Host: cs.weber.edu

In article <2aukp0$241@galaxy.ucr.edu> duchow@galaxy.ucr.edu (John Duchowski) writes:
>Hi, I would like to find out how can one set up time tracking on unix,
>similar to that which one obtains when one does:
>
>	 $ logout/full
>
>on VMS.  I would like to do this in order to keep track of the time
>I spend signed on, because my Unix connection happes to be over a long
>distance line and I would like to minimize the associated costs.

You wouldn't necessarily be able to make it an option unless you wrote
a DCL shell (don't laugh -- it's been done before, but only commercially
and hasn't been ported to *BSD)...

but you could start with:

last $LOGNAME | head -1

which will have your name, tty, host you came from (if applicable), login
time in <day name> <month> <day> <hour>:<minute>, followed by the message
"still logged in".

Or you could write a program called "logout" and have it kill -1 the
parent process of the parent process ... back to the shell whose first
argument is "-" (thus killing the login session).  There are many ways to
log yourself out.  Then it could read your wtmp entry directly and get
better resoloution.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.