thanks for your reply. I have almost tried everything. but those are giving the overall working time instead of idle time. For ex, I have used "w" command, my system login tme 2021-01-27 10:13. current time is 3:13 PM. If i run this command it shows IDLE as 5:05 m. But I have only taken 45 mins break. so need exact idle time from system.Linux 'w' command, get IDLE time in seconds
I need to get idle time of all users in seconds (not minutes or days), how do i go about doing it ? This command lists the idle times of all connected users : w | awk '{if (NR!=1) {print $1,$5 }...unix.stackexchange.com
Google is your friend.
Search for : Linux terminal inactivity time