Get online users OpenSuse

Hello, is there any Shell Command to get a list of all the online users currently online and logged in on my machine?

finger and who both show a log of people that logged in, not the ones that are currently online.

What qualifies for you the term "online", as opposed to "logged in"?

Well, I have a system running in a network.

The network consist of me and my friend, who's called Tom.

So when he connects and logs in the two logged in users should be:

Tom
Ali

If by "logged in" you mean logged in to an console session, you can get the list by using

who | cut -d' ' -f1 | sort -u