can some one please tell me, how can I checks each minute and reports on who logs in and who logs out?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For starting point, take a look here:
Using
who -sgives you the log in times of the users currently logged in. The link above uses a 5-minute threshold to filter the list, but you can change it to 1-minute.You can either make a script that does the above and then sleeps for 60 seconds in a while loop or maybe use
cronto set up this to run every minute (though I would prefer a script for short periods like that).You would miss the users who logged in and out between the two script runs, though.
I guess you would need more then a script if you need a more robust solution.