1PMCONNECTLOGGER(3)         Library Functions Manual         PMCONNECTLOGGER(3)
2
3
4

NAME

6       __pmConnectLogger  -  connect  to  a performance metrics logger control
7       port
8

C SYNOPSIS

10       #include "pmapi.h"
11       #include "libpcp.h"
12
13       int __pmConnectLogger(const char *hostname, int pid);
14
15       cc ... -lpcp
16

CAVEAT

18       This documentation is intended for internal Performance Co-Pilot  (PCP)
19       developer use.
20
21       These  interfaces  are  not part of the PCP APIs that are guaranteed to
22       remain fixed across releases, and they may not  work,  or  may  provide
23       different semantics at some point in the future.
24

DESCRIPTION

26       Each  instance of the Performance Co-Pilot (PCP) archive logger program
27       pmlogger(1) supports a control port on which __pmControlLog(3) requests
28       are received, and responses sent.  Optionally, the pmlogger(1) instance
29       may be designated the ``primary'' logger.
30
31       __pmConnectLogger may be used to establish a control port connection to
32       the pmlogger(1) instance identified by process id pid on the host host‐
33       name.
34
35       One  special  case  is  supported;  for  the  reserved  pid  value   of
36       PM_LOG_CONTROL_PORT the requested connection is to the control port for
37       the ``primary'' logger, whatever its process id might be.
38
39       On success, __pmConnectLogger returns a non-negative integer, that is a
40       file  descriptor  that may be used in subsequent communication with the
41       pmlogger(1) instance, e.g. for __pmControlLog(3).
42
43       As the control port to pmlogger(1)  is  not  mulitplexed,  applications
44       using __pmConnectLogger should use close(2) to terminate the connection
45       to pmlogger(1) as soon as they have finished communicating.
46
47       If the application connects, and the pmlogger(1) instance  subsequently
48       terminates, e.g. because the associated pmcd(1) instance is terminated,
49       the application will have to explicitly re-establish  connection  to  a
50       re-started pmlogger(1) instance by calling __pmConnectLogger again.
51

SEE ALSO

53       pmcd(1), pmlc(1), pmlogger(1), PMAPI(3) and __pmControlLog(3).
54

DIAGNOSTICS

56       PM_ERR_PERMISSION
57              no permission to connect to the specified pmlogger(1) instance
58
59       -ECONNREFUSED
60              the designated pmlogger(1) instance does not exist
61
62       -EEADDRINUSE
63              the requested control port is already in use
64
65
66
67Performance Co-Pilot                  PCP                   PMCONNECTLOGGER(3)
Impressum