__pmCleanMapDir - Man Page

remove old files from a map directory

C Synopsis

#include "pmapi.h"
#include "libpcp.h"

int __pmCleanMapDir(const char *dirname, const char * special);

cc ... -lpcp

Caveat

This documentation is intended for internal Performance Co-Pilot (PCP) developer use.

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics at some point in the future.

Description

pmlogger(1) and pmie(1) maintain directories of map files that provide a mapping from a pmlogger(1) or pmie(1) process id (PID) to important parameters of those processes.

__pmCleanMapDir removes “dead” files in these directories, specifically the directory entries in dirname should follow these rules, else __pmCleanMapDir will remove them:

Before any of these checks are done, __pmCleanMapDir checks that dirname is indeed a directory, and the user id and group id of the caller match the user id and group id of dirname.

Return Values

If a serious error occurs, __pmCleanMapDir returns a negative value suitable for reporting with pmErrStr(3). Otherwise the return value is the number of entries that have been removed.

Diagnostics

Verbose diagnostics describing the actions of __pmCleanMapDir will be reported on standard error of the debug option appl9 is set, e.g. via -Dappl9 from the command line.

See Also

pmdbg(1), PMAPI(3) and pmErrStr(3).

Info

PCP Performance Co-Pilot