PMDAOPENLOG(3)
π PMDAOPENLOG π
okay bestie, welcome to PMDAOPENLOG(3), part of the Library Functions Manual β yes it's a section 3 page, yes we're gonna make it cute, yes every single fact is staying. π
β¨ NAME β¨
pmdaOpenLog β redirect stderr to a logfile
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
#include <pcp/pmda.h>
void pmdaOpenLog(pmdaInterface * dispatch);
cc ... -lpcp_pmda -lpcp
π¦ DESCRIPTION π¦
So what does this lil function do? pmdaOpenLog redirects stderr to the logfile specified in the dispatch structure β and that logfile got set by the previous call to pmdaDaemon(3) or pmdaGetOpt(3). Like, it's the glow-up your error output has been waiting for. β¨
The first line of the log file will detail the name of the calling process, the host the process is running on, and the current time. Receipts, basically. π
On top of that, the log is appended with the exit time of the process by a routine registered with atexit(3). So it says hi and it says bye. iconic behavior honestly. π
π CAVEAT π
The PMDA must be usingPMDA_INTERFACE_2or later, as specified in the call topmdaDSO(3)orpmdaDaemon(3). no cap, this is not optional, if you're on an older interface it's giving β¨not supportedβ¨.
π PCP ENVIRONMENT π
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). π
Values for these variables may be obtained programmatically using the pmGetConfig(3) function. iykyk. π«Ά
β SEE ALSO β
pmcd(1)atexit(2)PMAPI(3)PMDA(3)pmdaDaemon(3)pmdaGetOpt(3)
and that's the whole page bestie!! this one shipped as part of Performance Co-Pilot (that's the PCP girlies π), and the page itself is dated/labelled PMDAOPENLOG(3) β so yeah, same name top and bottom, we love a symmetrical moment. mwah, go log something πβ¨
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp-pmda3-dev 7.1.1-1
- ubuntu stonking: libpcp-pmda3-dev 7.2.1-2build1
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms