pmSetProgname(3) — Linux manual page


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

       pmGetProgname may be used to return the current application name.

SEE ALSO         top


COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at ⟨⟩.
       If you have a bug report for this manual page, send it to  This page was obtained from the project's upstream
       Git repository ⟨⟩ on
       2020-09-18.  (At that time, the date of the most recent commit that
       was found in the repository was 2020-09-18.)  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

Performance Co-Pilot                 PCP                    PMSETPROGNAME(3)