Solved

Way to use wtmp or "last" to gather total hours logged for a user?

Posted on 2007-03-23
3
418 Views
Last Modified: 2013-11-17
I'm needing to figure out a way (util or command) to use the stats from wtmp or "last" output to basically show the total number of hours logged for a given user.  I've had a few people putting a great deal of over time, and want to use this as a rough gauge of hours.  I realize all the inaccuracies in doing this in terms of the fact that the individuals may not have acutally been working, etc.  I'm hoping that maybe there's an easy way to take the longest session for a user each day, to avoid totalling hours of multiple sessions/logins they may have had going, and or avoiding over-lapping sessions.

Any ideas?

0
Comment
Question by:derdle
  • 2
3 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 18784550
What problem are you solving?
0
 

Author Comment

by:derdle
ID: 18786204
I'm trying to show a rough number of hours logged in for a user.  For people, including myself who do a lot of work at home, in addition to the office work-  I'd just like to gather a rough number of hours.  I know there are better ways and methods for this that we're implementing, now that we have a need.  ...but the need came about abruptly and I need to go back a few months and get an idea of the hours that have been logged into the system.
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 18788193
http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/periodic/monthly/200.accounting

this shell script shows user login summaries in FreeBSD system without asking.

put it in your crontab or so.

another is to look at www.redbooks.ibm.com for AIX accounting, and using
http://www.redbooks.ibm.com/abstracts/sg246396.html?Open
for CPU minute accounting etc.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AIX  NFS  question 1 153
How to find files recursively in ftp server quickly? 7 124
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 104
Access_log 17 151
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question