Apple Enterprise - NeXTanswers Support Archive
Enterprise
[Index]
[Download]


Search NeXTanswers for:

Using ni_connections

It's sometimes useful to be able to determine the active NetInfo connections on a machine. Alhough this information is available, it's difficult to get and sometimes hard to understand.

The shell script ni_connections examines the existing network connections and determines whether each one is a connection to a netinfod. If it is, the script determines the tag of the database being served for the connection. The output reports the extant connections. Here's some sample output:

nescorna [~]-204% ni_connections
connected to network on cadet via tcp port 696
connected to network on cadet via tcp port 696
connected to network on cadet via tcp port 696
connected to network on cadet via tcp port 696
connected to network on cadet via tcp port 696
connected to Rhino on exec via tcp port 697
connected to Rhino on exec via tcp port 697
connected to Rhino on exec via tcp port 697
connected to network on exec via tcp port 678


The output shows six connections to netinfod network (five on cadet, one on exec), and three connections to netinfod Rhino (all on exec).

The command has two options, as described in the following help message:

nescorna [~]-205% ni_connections -help
Usage: ni_connections [-l] [-n] [host]
Use ni_connections -help for details
Arguments:
-l Show connections to the local domain
-n Use and show numeric addresses, instead of names
host Name of host whose connections should be checked

Defaults: localhost
Examples: ni_connections
ni_connections -l rhino

Use -n either to save time (translating names into addresses takes some time), to find out what host is involved if a host name is being truncated, and to connect to a netinfod somewhere outside your domain.

ni_connections uses netstat to obtain information about the active connections on a machine. If you use the optional host argument, ni_connections uses snmpnetstat to obtain the connection information from the remote machine, using the default SNMP community.

To install ni_connections, copy the file to an appropriate place on your system. We recommend using some place like /usr/local/bin; ideally, it should be in a directory in your UNIX search path.

Note: This software is unsupported by NeXT Computer, Inc.


OpenStep | Alliances | Training | Tech Support | Where to Buy