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

NAME

6       pmGetUsername - fetch special PCP username
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmGetUsername(char **username)
12
13       cc ... -lpcp
14

DESCRIPTION

16       Within  the  Performance Co-Pilot (PCP) some applications use a special
17       (non-root) username to allow access, e.g. to write log files into  pro‐
18       tected directories.
19
20       pmGetUsername returns the name via username.
21
22       The variable name PCP_USER is fetched using pmGetOptionalConfig(3).  If
23       this succeeds, pmGetUsername returns 1.  Otherwise.  username is set to
24       the default value of pcp and pmGetUsername returns 0.
25
26       pmGetUsername  is most often used in conjunction with pmSetProcessIden‐
27       tity(3) at process start up.
28

SEE ALSO

30       PMAPI(3), pmGetOptionalConfig(3) and pmSetProcessIdentity(3).
31
32
33
34Performance Co-Pilot                  PCP                     PMGETUSERNAME(3)
Impressum