PMSOCKS(1) | General Commands Manual | PMSOCKS(1) |
pmsocks - shell wrapper for performance monitoring across firewalls
pmsocks path [args ...]
pmsocks allows Performance Co-Pilot (PCP) clients running on hosts located on the internal side of a TCP/IP firewall to monitor remote hosts on the other side of the firewall. This assumes the firewall has been configured with a compliant sockd daemon and the necessary access controls are satisfied.
pmsocks uses the tsocks(5) library, which is not included with PCP. You can get tsocks from http://www.progsoc.uts.edu.au/~delius/.
On IRIX, pmsocks is simply a shell wrapper that sets the appropriate environment variables and then executes the path program with args arguments (if any). pmsocks works by setting the _RLD_LIST environment variable (see rld(1)) to load a dynamic shared library (see dso(5)) containing stubs for ``socksified'' network library functions; This ``socksified'' library is installed at /usr/pcp/lib/libpcp_socks.so.
There are a number of conditions required for this to be successful and the user is strongly advised to read this whole manual page (in particular the CAVEAT section below) before attempting to use pmsocks.
When pmsocks is installed, the /etc/pcp_socks.conf configuration file is also installed with minimum default settings. These settings specify that socket connections to the local host should be made directly, without contacting any socks server daemon. This is necessary so that PCP clients will be able to establish a local connection to the X(1) server, and use PCP connections, possibly via a sockd daemon, to monitor remote hosts. In the present implementation of pmsocks, non-direct connections to the X(1) server do not work, hence if the display is remote, then the remote host must be on the same side of the firewall and /etc/pcp_socks.conf must be configured to connect directly to that host.
The format of /etc/pcp_socks.conf is identical to
/etc/socks.conf as documented in the CSTC-4.2 socks
distribution. This distribution may be obtained via information contained in
the socks FAQ at
ftp://coast.cs.purdue.edu/pub/tools/unix/socks/
If other socks clients are being used, then it is generally safe to remove /etc/pcp_socks.conf and instead make a symbolic link to /etc/socks.conf. The file formats are identical.
The default configuration should be customized to suit the local environment so that connections to hosts located on the same side of the firewall as the local host do not use the socks daemon unnecessarily. The default configuration is
direct LOCALHOSTNAME 255.255.255.255 # direct localhost
sockd 0.0.0.0 0.0.0.0 # contact sockd everywhere else
Note that the string LOCALHOSTNAME is dynamically substituted at run time with the name of the local host, as obtained by a call to gethostname(2). Assuming the real IP address of the local host is 1.2.3.4 and that a normal class-c subnet is used locally, the most common customization would be to specify direct connections for all hosts on the local subnet, by inserting another ``direct'' line as follows:
direct LOCALHOSTNAME 255.255.255.255 # direct localhost
direct 1.2.3.0 255.255.255.0 # direct on local subnet
sockd 0.0.0.0 0.0.0.0 # contact sockd everywhere else
The order of lines is important - the first line matching the requested destination IP address during a connect(2) call (after the requested IP address has been masked by the third parameter of the /etc/pcp_socks.conf line), specifies via the first parameter whether to contact the socks daemon or whether to attempt a direct connection.
There are several environment variables used by pmsocks as follows:
The following notes should be considered carefully:
tsocks is covered by the GPL license and is copyright Shaun Clowes (delius@progsoc.org).
pmcd(1), pminfo(1), pmlogger(1), pmval(1), X(1), PMAPI(3), resolver(5), and tsocks(5).
PCP | Performance Co-Pilot |