As a Linux system administrator, it’s important to regularly check the login date and time of your server's users. This helps you understand user activity, such as how many users are active, inactive, when they log in, and for how long.
1. w Command
The w command provides information about who is logged on and what they are doing. This is a commonly used tool to display user activity and processes on the server.
The w command shows:
1.Current time
2.System uptime
3.Number of logged-on users
4.System load averages for the past 1, 5, and 15 minutes
Example output:

Details for each user include:
1.Login name
2.TTY name
3.IP address
4.Login time
5.Idle time
6.JCPU time (time used by all processes attached to the TTY)
7.PCPU time (time used by the current process)
8.Command line of the current process
To display details of a specific user (e.g., test):
w test
2. who Command
The who command displays information about users currently logged in.
Example output:

Additional options:
1.Filter details for a specific user:
who | grep ostechnix
2.Display information for the current terminal session:
$ who am i
3.Display all available information:
$ who -a

3. users Command
The users command prints the usernames of users currently logged in.
Example:
$ last

These commands provide a comprehensive way to monitor user login activity on your VPS. Feel free to explore additional options and commands available online to suit your needs.