Added implementation of that feature.

1998-07-17  Martin Baulig  <baulig@Stud.Informatik.uni-trier.de>

	* sysdeps/sun4/proclist.c (glibtop_get_proclist_p): Added
	implementation of that feature.

	* sysdeps/sun4/proc_{uid,state}.c: Now working quite well.

	* sysdeps/sun4/proc_{mem,time,signal,kernel,segment}.c: Added
	some basic implementation; this isn't really working yet.
This commit is contained in:
Martin Baulig
1998-07-17 16:40:02 +00:00
committed by Martin Baulig
parent 74ca45f795
commit c41d6e5a77
13 changed files with 319 additions and 20 deletions

View File

@@ -19,16 +19,38 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <config.h>
#include <glibtop.h>
#include <glibtop/procsegment.h>
static const unsigned long _glibtop_sysdeps_proc_segment =
(1 << GLIBTOP_PROC_SEGMENT_TRS) + (1 << GLIBTOP_PROC_SEGMENT_DRS);
/* Provides detailed information about a process. */
void
glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
pid_t pid)
{
struct proc *pp;
glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_segment));
/* Read process table from kernel. */
_glibtop_read_proc_table (server);
/* Find the pid in the process table. */
pp = _glibtop_find_pid (server, pid);
if (pp == NULL) return;
/* Fill in data fields. */
buf->trs = pp->p_tsize;
buf->drs = pp->p_dsize;
buf->flags = _glibtop_sysdeps_proc_segment;
}