Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-03-23
3
Medium Priority
?
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

670 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