pmSetProgname(3)

pmSetProgname3

Application name services

C synopsis

#include <pcp/pmapi.h>

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

cc ... -lpcp

Overview

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.

Releases

5 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11–12
  3. 13
  4. Arch

From pcp 7.2.2-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.