PROCPS_PIDS_REAP(3)

NAME
procps_pids_reap - Harvest all the PIDS information structure.

SYNOPSIS
#include <proc/procps.h>

struct pids_fetch * procps_pids_reap(struct pids_info *info, enum pids_fetch_type which);

Link with -lprocps.

DESCRIPTION
procps_pids_reap() is the function that will load the various files in the proc(5) filesystem and fill the returned structure with the parsed values as well as a summary of the information gathered. The function is able to parse only processes or also include threads, the option which can be set to PIDS_FETCH_TASKS_ONLY or PIDS_FETCH_THREADS_TOO to determine what is collected. The info structure first needs to be initialised by procps_pids_new(3). if procps_pids_reap() returns successfully, a program can then iterate through a loop using the accessor methods described in libproc(3).

RETURN VALUE
procps_pids_reap() returns a pointer to struct pids_fetch on success and NULL on failure.

VERSIONS
procps_pids_reap() first appeared in libproc-2 version 0.0.

SEE ALSO
libproc(3), procps_pids_new(3), procps_pids_unref(3), proc(5).