.\" (C) Copyright 2016-2017 Craig Small .\" .\" %%%LICENSE_START(LGPL_2.1+) .\" This manual is free software; you can redistribute it and/or .\" modify it under the terms of the GNU Lesser General Public .\" License as published by the Free Software Foundation; either .\" version 2.1 of the License, or (at your option) any later version. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU .\" Lesser General Public License for more details. .\" .\" You should have received a copy of the GNU Lesser General Public .\" License along with this library; if not, write to the Free Software .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" %%%LICENSE_END .\" .TH PROCPS_PIDS_REAP 3 2017-01-05 "libproc-2" .\" Please adjust this date whenever revising the manpage. .\" .SH NAME procps_pids_reap \- Harvest all the PIDS information structure. .SH SYNOPSIS .B #include .sp .BI "struct pids_fetch * procps_pids_reap(struct pids_info *" info ", enum pids_fetch_type " which ");" .sp Link with \fI\-lprocps\fP. .SH DESCRIPTION \fBprocps_pids_reap()\fR is the function that will load the various files in the .BR 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 \fIwhich\fR can be set to \fBPIDS_FETCH_TASKS_ONLY\fR or \fBPIDS_FETCH_THREADS_TOO\fR to determine what is collected. The info structure first needs to be initialised by .BR procps_pids_new (3). if \fBprocps_pids_reap()\fR returns successfully, a program can then iterate through a loop using the accessor methods described in .BR libproc (3). .SH RETURN VALUE \fBprocps_pids_reap()\fR returns a pointer to struct pids_fetch on success and NULL on failure. .SH VERSIONS \fBprocps_pids_reap()\fR first appeared in libproc-2 version 0.0. .SH SEE ALSO .BR libproc (3), .BR procps_pids_new (3), .BR procps_pids_unref (3), .BR proc (5).