READPROCTAB(3)

πŸ“¦ version 3.3.17, in centos-stream 9, ubuntu jammy

✨ NAME ✨

okay bestie, welcome to READPROCTAB(3) from the Linux Programmer's Manual πŸ’–

It's giving process-info power couple: readproctab, freeproctab β€” read information for all current processes at once.


πŸ¦‹ SYNOPSIS πŸ¦‹

First, include the header:

#include <proc/readproc.h>

proc_t** readproctab(int flags, ... );
void freeproctab(proc_t **p);

πŸ’– DESCRIPTION πŸ’–

readproctab is the main character here: it reads information on all processes matching the criteria from flags, allocating memory for everything as needed. Then it returns a NULL-terminated list of proc_t pointers. For more information on the arguments of readproctab, see openproc(3).

freeproctab is the cleanup bestie: it frees all memory allocated by readproctab.

The proc_t structure is defined in <proc/readproc.h>, please look there for a definition of all fields.


🌈 SEE ALSO 🌈


πŸŽ€ REPORTING BUGS πŸŽ€

Please send bug reports to procps@freelists.org


This page was brought to you by the Linux Manpage, dated 14 July 2014 πŸ’–βœ¨

πŸ“¦ where this page comes from