Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capturing user idle time with the finger command

Status
Not open for further replies.

JMD55

Programmer
Aug 6, 2001
1
US
Hello Everyone;
I've written a ksh script which essentially tracks users idle time. I was told that the finger command would return valid idle time for a particular user. I was told this by several wanna be admins. I have been using Exceed software to open a session remotely. Well I wrote all of the code (all based on the finger command) which is logically sound (so it seems). I have found that when I run the finger command on a console (locally) I don't receive any idle time. I do receive idle time for all users who are remotely connected to a machine , but not for the console user. I realize I may need to rework my code for idle time. Is there anyway I can get a users idle time ???
If there isn't, I was thinking of trapping keystrokes and mouseclicks - if the user is doing either it means he isn't idle, but I just don't know how to do this in Solaris. Can any of you knowledgable people help me out........Thanx ....
 
I had a similar requirement a while ago.

finger -i returns the idle time for users.
Hope this helps.
 
w username will also return the idle time. w on it's own will produce a list for all users logged in.

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top