pmsetprogname(3) — Linux manual page

NAME | C SYNOPSIS | DESCRIPTION | SEE ALSO | COLOPHON

PMSETPROGNAME(3)        Library Functions Manual        PMSETPROGNAME(3)

NAME         top

       pmSetProgname, pmGetProgname - application name services

C SYNOPSIS         top

       #include <pcp/pmapi.h>

       void pmSetProgname(const char *program);
       char *pmGetProgname(void);

       cc ... -lpcp

DESCRIPTION         top

       Within the Performance Co-Pilot (PCP) run-time libraries the name
       of a running application is maintained to be used in error and
       diagnostic messages.

       The default application name is pcp.

       pmSetProgname may be used to set the application name to program
       after stripping any leading components that begin with the
       filesystem path name separator (``/'' for Unix-like systems).

       It is the callers responsibility to ensure the memory pointed to
       by program remains available for the life of the application.
       Typically, the value passed as program for a C program would be
       argv[0].  If program is NULL, the default application name is
       restored.

       pmGetProgname may be used to return the current application name.

SEE ALSO         top

       PMAPI(3).

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨http://www.pcp.io/⟩.  If you have a bug report for this manual
       page, send it to pcp@groups.io.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2021-08-27.
       (At that time, the date of the most recent commit that was found
       in the repository was 2021-08-27.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

Performance Co-Pilot               PCP                  PMSETPROGNAME(3)

Pages that refer to this page: pmnotifyerr(3)pmrecord(3)