From 777c371be9a4775262efdf74aaed470d7f9af6b8 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 9 May 1999 15:53:42 +0000 Subject: [PATCH] Added proclist. --- doc/libgtop.texi | 3 ++ doc/reference.texi | 119 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/doc/libgtop.texi b/doc/libgtop.texi index 45d91bca..a1bd028b 100644 --- a/doc/libgtop.texi +++ b/doc/libgtop.texi @@ -20,6 +20,8 @@ + + --- The Detailed Node Listing --- About LibGTop @@ -36,6 +38,7 @@ LibGTop Reference Manual * glibtop_swap:: Swap Usage. * glibtop_uptime:: System Uptime. * glibtop_loadavg:: Load Average. +* glibtop_proclist:: Process List. @end menu @include about.texi diff --git a/doc/reference.texi b/doc/reference.texi index 18c109c6..3c2dcbfb 100644 --- a/doc/reference.texi +++ b/doc/reference.texi @@ -7,6 +7,7 @@ * glibtop_swap:: Swap Usage. * glibtop_uptime:: System Uptime. * glibtop_loadavg:: Load Average. +* glibtop_proclist:: Process List. @end menu @node glibtop_cpu, glibtop_mem, Reference Manual, Reference Manual @@ -270,7 +271,7 @@ Time of last system boot in seconds since the epoch. @end table @page -@node glibtop_loadavg, , glibtop_uptime, Reference Manual +@node glibtop_loadavg, glibtop_proclist, glibtop_uptime, Reference Manual @section Load Average Library function @code{glibtop_get_loadavg}: @@ -321,4 +322,120 @@ Total number of tasks. Last PID. @end table +@page +@node glibtop_proclist, , glibtop_loadavg, Reference Manual +@section Process List +Library function @code{glibtop_get_proclist}: + +@example +@cartouche +unsigned * +glibtop_get_proclist (glibtop_proclist *buf, + int64_t which, int64_t arg); + +unsigned * +glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf, + int64_t which, int64_t arg); +@end cartouche +@end example + +Constants for the @code{which} argument: + +@example +@cartouche +#define GLIBTOP_KERN_PROC_ALL 0 +#define GLIBTOP_KERN_PROC_PID 1 +#define GLIBTOP_KERN_PROC_PGRP 2 +#define GLIBTOP_KERN_PROC_SESSION 3 +#define GLIBTOP_KERN_PROC_TTY 4 +#define GLIBTOP_KERN_PROC_UID 5 +#define GLIBTOP_KERN_PROC_RUID 6 + +#define GLIBTOP_KERN_PROC_MASK 15 + +#define GLIBTOP_EXCLUDE_IDLE 0x1000 +#define GLIBTOP_EXCLUDE_SYSTEM 0x2000 +#define GLIBTOP_EXCLUDE_NOTTY 0x4000 +@end cartouche +@end example + +Declaration of @code{glibtop_proclist} in @file{