• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1016
  • Last Modified:

How to know login/logout time (between screen locks) of a Linux user.

Hi,

I am a manager and would like to know my worker's log-in, log-out time *** BETWEEN HIS SCREEN LOCKS ***.  
This question was not for a first-time log-in session because IT workers (and users) were rarely log off their computer at the end of the day, instead they just used screen-lock.  

In sumary, I would like to know how much time my workers work (during daytime and after hours).  Remember they never log off completely (in Linux, Gnome or KDE environment).

Thanks,
John
0
johnminhpham
Asked:
johnminhpham
  • 2
1 Solution
 
DVBCommented:
Hmmm, I have this session running for about two weeks now.

The first question I would ask is why you are doing this (there is a possible technical solution, but sometimes social solutions are just better).  If people are getting work done, then you shouldn't have major objections to their moving away from the screen at times.
0
 
kblack05Commented:
Run "set autologout" or otherwise enable automatic logout on time expiry for console users.

Then simply use the "last" command and diff them.
0
 
DVBCommented:
kblack05 - these are X users, not console.
0
 
pjedmondCommented:
Screen lock is on the client PC, and therefore there is no central access to information about it.

Only option if this *really* is the approach that you are going for is to change the filename xlock to xlock main, and create a new xlock file, make it executeable, and put in a script that for example:

wget http://www.myserver.com/?clientname

before calling xlock .

You'd need to repeat this for xscreensaver etc.

Another idea is that you could try adding 'nagios' to 'monitor' client PCs:

www.nagios.org

and then see when the CPU usage drops....then again, some of these screen savers use a huge amount of processing power. Obviously with either of these ideas, you have all the social, privacy and associated legal complications that may arise.

HTH:)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now