Sample Header Ad - 728x90

Is there a way to script a check to see how long someone has been logged into a server?

0 votes
3 answers
228 views
I'm an absolute scripting novice but I've been asked to create a script that checks how long a user has been logged in to a Linux server and if it's longer than, let's say, 5 hours, it would need an Exit status which can be picked up by our monitoring system and alert out. I don't want someone to write the script for me (I'm no cheat), but I'd appreciate as much advice as I can get. Has anyone had any experience with writing a shell script that would do this or something similar? Many thanks in advance.
Asked by CrimsonSi (1 rep)
Jan 30, 2020, 11:03 AM
Last activity: Jan 30, 2020, 12:58 PM