1835650 Members
3033 Online
110081 Solutions
New Discussion

tracking usage

 
SOLVED
Go to solution
A Pandey
Frequent Advisor

tracking usage

Hi

I wanted to track the usage (time) of a user. Basically we would like to automate timesheets with log-in and log-out times and integrate this with a PERL script/program.

I was wondering if there is any .hist or .history file per user.

regards,

A.
4 REPLIES 4
Geoff Wild
Honored Contributor
Solution

Re: tracking usage

If trusted system - I think you can see with auditing...

Else, have a look at the last command.


The last command searches backwards through the file /var/adm/wtmp
(which contains a record of all logins and logouts) for information
about a user, a tty, or any group of users and ttys.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A Pandey
Frequent Advisor

Re: tracking usage

is /var/adm/wtmp a text file...does not seem to be so.

i used grep to track one user and all i got was unreadable characters
Patrick Wallek
Honored Contributor

Re: tracking usage

No wtmp is not a text file. That's why the suggestion to use the program 'last' which knows how to read the file.

# man last

for more info.
A Pandey
Frequent Advisor

Re: tracking usage

thank you gentlemen...sorry being a tubelight this morning ...