pmgetusername(3) — Linux manual page

NAME | C SYNOPSIS | DESCRIPTION | SEE ALSO | COLOPHON

PMGETUSERNAME(3)        Library Functions Manual        PMGETUSERNAME(3)

NAME         top

       pmGetUsername - fetch special PCP username

C SYNOPSIS         top

       #include <pcp/pmapi.h>

       int pmGetUsername(char **username);

       cc ... -lpcp

DESCRIPTION         top

       Within the Performance Co-Pilot (PCP) some applications use a
       special (non-root) username to allow access, e.g. to write log
       files into protected directories.

       pmGetUsername returns the name via username.

       The variable name PCP_USER is fetched using
       pmGetOptionalConfig(3).  If this succeeds, pmGetUsername returns
       1.  Otherwise.  username is set to the default value of pcp and
       pmGetUsername returns 0.

       pmGetUsername is most often used in conjunction with
       pmSetProcessIdentity(3) at process start up.

SEE ALSO         top

       PMAPI(3), pmGetOptionalConfig(3) and pmSetProcessIdentity(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 2024-06-14.
       (At that time, the date of the most recent commit that was found
       in the repository was 2024-06-14.)  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                  PMGETUSERNAME(3)

Pages that refer to this page: pmsetprocessidentity(3)