table of contents
TELNET-PROBE(1) | General Commands Manual | TELNET-PROBE(1) |
NAME¶
telnet-probe - lightweight telnet-like port probe
SYNOPSIS¶
$PCP_BINADM_DIR/telnet-probe [-cv?] host port
DESCRIPTION¶
telnet-probeallows thepmdashping(1)daemons to establish connections to arbitrary local and remoteservice-providing daemons so that response time and serviceavailability information can be obtained.
The requiredhostandportnumber arguments have the same meaning as theirtelnet(1)equivalents.
The-coption causestelnet-probeto perform aconnect(2)only.This skips theread(2)andwrite(2)exercise that would otherwise be done after connecting (see below).
Once the telnet connection has been established,telnet-probereads fromstdinuntil end-of-file, and writes all the input data to thetelnet connection.Next,telnet-probewill read from the telnet connection until end-of-file,discarding whatever data it receives.Thentelnet-probeexits.
To operate successfully, the input passed viatelnet-probeto the remote service must be sufficient to cause the remote service toclose the connection when the last line of input has been processed,e.g. ending with ``quit'' when probing SMTP on port 25.
By defaulttelnet-probewill not produce any output, unless there is an error in which casea diagnostic message can be displayed (in verbose mode only) and theexit status will be non-zero indicating a failure.
OPTIONS¶
The available command line options are:
DIAGNOSTICS¶
Iftelnet-probesucceeds, then 0 will be returned.If the attempt to establish a connection fails or is terminated, thena non-zero exit status is returned.
PCPENVIRONMENT¶
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).
SEEALSO¶
PCPIntro(1),pmdashping(1),pmie(1),telnet(1),connect(2),read(2)andwrite(2).
PCP | Performance Co-Pilot |