Hi,

Last command is very useful but it would be better if
I will know what file does this information resides?

What I am thinking is if the data resides in a file, I
could get it by making a perl script that will read a
"log file" and parse it line by line just like how i
could see it when I type the "last" command.


--- Robert C Wittig <[EMAIL PROTECTED]>
wrote:

> Felix T. Gomez, Jr. wrote:
> > Hi,
> > 
> > Thank you for the tips although if somebody could
> > still give me more inputs about this I would
> > appreciate it very much.
> > 
> > My initial plan is to make a C program that will
> run
> > the "last" command and get the number of hours of
> the
> > currently logged users.
> > 
> > Since the users can log in/out in a day and log
> in/out
> > again in another day, the hours/minutes of usage
> will
> > be accumulated thus I need to create a "database"
> for
> > it.
> > 
> > I guess this is not a big project, only that I
> have
> > little idea on where to begin.
> > 
> 
> I would probably just write a shell or perl script,
> as opposed to using C.
> 
> Once you have the raw data that you require, culled
> from 'last' and 
> whatever other files you cull, all you have to do is
> write a script 
> that extracts the important stuff and re-formats it
> into a report, the 
> way you want to see it. In the past, I have used
> perl to write up nice 
> HTML reports, that can then be read in the browser.
> 
> Being lazy, I probably would just write the script
> so that it kept a 
> running total of the values that I wanted to be
> cumulative, from one 
> report to the next, in a set of variables whose
> values were retained, 
> when the script stopped running, and added to the
> next total, each 
> time the script ran.
> 
> 
> 
> -- 
> -wittig http://www.robertwittig.com/
>       http://robertwittig.net/
>       http://robertwittig.org/
> .
> 





 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front


To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be 
removed. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/LINUX_Newbies/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/LINUX_Newbies/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to