Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At our office we have a netgear router,

I'd like to poll it to see who's in the office (preferably on the command line) because i'm weird like that..

Is their a standard way of doing this? is it possible to do on all routers or does your router need to have an API for this?

I should also mention i'm on a mac

share|improve this question
up vote 2 down vote accepted

"Standard" would be SNMP MIB entry . (

$ snmpwalk -v 2c fog.home .
IP-MIB::ipNetToMediaIfIndex. = INTEGER: 1
IP-MIB::ipNetToMediaPhysAddress. = STRING: 0:13:d4:f4:2b:c4
IP-MIB::ipNetToMediaNetAddress. = IpAddress:
IP-MIB::ipNetToMediaType. = INTEGER: dynamic(3)

If your router does not support SNMP, your next option would be to connect using SSH or Telnet, run ip neigh or arp -n, then parse the output. (The "expect" tool is useful for automating Telnet logins and subsequent command-line interaction.)

If that isn't available either, you'll have to hack something up to scrape the web interface.

share|improve this answer
Thanks :) Thats probably a much better solution than what i came up with.. Our network is reasonably small (about 10 machines) do you think i'd get away with this instead (just seems a bit simpler)? arp -a | grep 192 | awk '{print $4}' – Daniel Upton Sep 27 '11 at 15:50
If you execute it on the router - yes. On your Mac - no, usually not. – grawity Sep 27 '11 at 16:19
Okay.. what would it normally do on the mac? seems to get everyone in my office when i run it.. (sorry for my network noobness!) – Daniel Upton Sep 27 '11 at 16:22
The ARP cache generally only contains devices you recently communicated with. The exact criteria depends on the network setup. If every machine sends periodic broadcasts - such as for name resolution - their addresses might be cached by your Mac, which would be fine for you. But that's not always the case - larger corporate networks might use only unicast DNS. – grawity Sep 27 '11 at 16:32
Thanks.. looks like a screen scrape.. No SSH or SNMP, drat! – Daniel Upton Sep 27 '11 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.