Who's connected to me?

eyoungren

macrumors Core
Original poster
Aug 31, 2011
21,954
14,583
ten-zero-eleven-zero-zero by zero-two
Just a quick question. Is there an easy way to tell which computers are connected to you?

I've always been curious about this under OS X but have never asked. I know in OS9 the Users and Groups control panel will show who is connected.

OS X only seems to tell you that SOMEONE is connected and only if you are shutting down or restarting.

Now that I have the Quicksilver set up as a Time Machine server I'm just interested in knowing what computer is connected (because it'd be backing up).
 

Altemose

macrumors G3
Mar 26, 2013
9,171
478
Elkton, Maryland
Just a quick question. Is there an easy way to tell which computers are connected to you?

I've always been curious about this under OS X but have never asked. I know in OS9 the Users and Groups control panel will show who is connected.

OS X only seems to tell you that SOMEONE is connected and only if you are shutting down or restarting.

Now that I have the Quicksilver set up as a Time Machine server I'm just interested in knowing what computer is connected (because it'd be backing up).
Open a Terminal window (/Applications/Utilities/Terminal) and copy in that Terminal code. It should display all users connected. If you want I will write a script for you.

Code:
last |grep "logged in"
 

eyoungren

macrumors Core
Original poster
Aug 31, 2011
21,954
14,583
ten-zero-eleven-zero-zero by zero-two
Isn't this just showing what user accounts on the host machine are logged in?

I did this while a TM backup was running from one of my other Macs and it didn't say anything about that Mac being connected.

What I'm looking for is something that tells me what Mac is connected.

Here's what I mean. My Quicksilver is Youngren14, which is the Mac I would be using to find out what machines are connected to it. My PB is Youngren7, my son's Mac is Youngren10 and my daughter's is Youngren6. The iMac is Youngren17.

I'm wanting to find out something like this…
Connected to Youngren14 (IP: 192.168.0.118): Youngren7 (IP:192.168.0.105), etc…
 

Altemose

macrumors G3
Mar 26, 2013
9,171
478
Elkton, Maryland
Isn't this just showing what user accounts on the host machine are logged in?

I did this while a TM backup was running from one of my other Macs and it didn't say anything about that Mac being connected.

What I'm looking for is something that tells me what Mac is connected.

Here's what I mean. My Quicksilver is Youngren14, which is the Mac I would be using to find out what machines are connected to it. My PB is Youngren7, my son's Mac is Youngren10 and my daughter's is Youngren6. The iMac is Youngren17.

I'm wanting to find out something like this…
Connected to Youngren14 (IP: 192.168.0.118): Youngren7 (IP:192.168.0.105), etc…
Do you want a program or a Terminal command?
 

eyoungren

macrumors Core
Original poster
Aug 31, 2011
21,954
14,583
ten-zero-eleven-zero-zero by zero-two
I am not aware of one that will do this. I am going to try and write one for you. I am part of the way there from the looks of it... I got it to display the IP addresses but now I need to get the machine identifiers.
Maybe this will help…it gets the computer name, i.e., the name displayed on the network.
Code:
scutil --get ComputerName
 

Altemose

macrumors G3
Mar 26, 2013
9,171
478
Elkton, Maryland
Maybe this will help…it gets the computer name, i.e., the name displayed on the network.
Code:
scutil --get ComputerName
There is a program called xAFP. I did find that if you go to System Preferences--> Sharing --> File Sharing --> Options it will show how many clients...
 

Altemose

macrumors G3
Mar 26, 2013
9,171
478
Elkton, Maryland
No, but it's enough. It's a menubar app too so that makes it easy. That'll do.
I couldn't get it to work with xAFP. I pulled out my PowerBook and connected it to my PowerMac but xAFP didn't work.

I entered this into Terminal...

Code:
netstat -a -p tcp | grep afp | grep ESTABLISHED | awk {'print $5'}
and got a readout on the IP of just the PowerBook. Great! Now I need machine identifiers or you could assign static IPs to the machines and remember the addresses.

Let me know if xAFP works. If it doesn't I will keep coding a script.
 

eyoungren

macrumors Core
Original poster
Aug 31, 2011
21,954
14,583
ten-zero-eleven-zero-zero by zero-two
I couldn't get it to work with xAFP. I pulled out my PowerBook and connected it to my PowerMac but xAFP didn't work.

I entered this into Terminal...

Code:
netstat -a -p tcp | grep afp | grep ESTABLISHED | awk {'print $5'}
and got a readout on the IP of just the PowerBook. Great! Now I need machine identifiers or you could assign static IPs to the machines and remember the addresses.

Let me know if xAFP works. If it doesn't I will keep coding a script.
Well, every device on my network is assigned a static address by my router anyway and I generally recognize them. It's working for me and it's enough for a quick check. So, no worries.
 

Altemose

macrumors G3
Mar 26, 2013
9,171
478
Elkton, Maryland
Well, every device on my network is assigned a static address by my router anyway and I generally recognize them. It's working for me and it's enough for a quick check. So, no worries.
You sure? I could get it done. I just need to get a way to pull the host name from the IP. Unfortunately, most of the commands I am finding are designed for SMB transfer.
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.