2005-05-13 11:00:59 +02:00
|
|
|
/* This file contains procedures to dump to PM' data structures.
|
|
|
|
*
|
|
|
|
* The entry points into this file are
|
2005-06-07 16:43:35 +02:00
|
|
|
* mproc_dmp: display PM process table
|
2005-05-13 11:00:59 +02:00
|
|
|
*
|
|
|
|
* Created:
|
|
|
|
* May 11, 2005: by Jorrit N. Herder
|
|
|
|
*/
|
|
|
|
|
2005-06-07 16:43:35 +02:00
|
|
|
#include "is.h"
|
|
|
|
#include "../pm/mproc.h"
|
2005-07-14 17:16:12 +02:00
|
|
|
#include <timers.h>
|
2005-05-13 11:00:59 +02:00
|
|
|
|
|
|
|
|
2005-06-07 16:43:35 +02:00
|
|
|
PUBLIC struct mproc mproc[NR_PROCS];
|
2005-05-13 11:00:59 +02:00
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* mproc_dmp *
|
|
|
|
*===========================================================================*/
|
2005-06-07 16:43:35 +02:00
|
|
|
PUBLIC void mproc_dmp()
|
2005-05-13 11:00:59 +02:00
|
|
|
{
|
|
|
|
struct mproc *mp;
|
|
|
|
int i, n=0;
|
2005-06-07 16:43:35 +02:00
|
|
|
static int prev_i = 0;
|
|
|
|
|
|
|
|
printf("Process manager (PM) process table dump\n");
|
|
|
|
|
|
|
|
getsysinfo(PM_PROC_NR, SI_PROC_TAB, mproc);
|
2005-05-13 11:00:59 +02:00
|
|
|
|
2005-07-04 11:36:16 +02:00
|
|
|
printf("-process- -nr-prnt- -pid/ppid/grp --uid--gid- -flags- --ignore--catch--block--\n");
|
2005-05-13 11:00:59 +02:00
|
|
|
for (i=prev_i; i<NR_PROCS; i++) {
|
|
|
|
mp = &mproc[i];
|
2005-06-24 18:21:21 +02:00
|
|
|
if (mp->mp_pid == 0 && i != PM_PROC_NR) continue;
|
2005-05-13 11:00:59 +02:00
|
|
|
if (++n > 22) break;
|
2005-07-04 11:36:16 +02:00
|
|
|
printf("%8.8s %4d%4d %4d%4d%4d ",
|
|
|
|
mp->mp_name, i, mp->mp_parent, mp->mp_pid, mproc[mp->mp_parent].mp_pid, mp->mp_procgrp);
|
|
|
|
printf("%d(%d) %d(%d) ",
|
2005-05-13 11:00:59 +02:00
|
|
|
mp->mp_realuid, mp->mp_effuid, mp->mp_realgid, mp->mp_effgid);
|
|
|
|
printf("0x%04x ",
|
|
|
|
mp->mp_flags);
|
2005-06-07 16:43:35 +02:00
|
|
|
printf("0x%05x 0x%05x 0x%05x",
|
2005-05-13 11:00:59 +02:00
|
|
|
mp->mp_ignore, mp->mp_catch, mp->mp_sigmask);
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
if (i >= NR_PROCS) i = 0;
|
|
|
|
else printf("--more--\r");
|
|
|
|
prev_i = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* ...._dmp *
|
|
|
|
*===========================================================================*/
|
|
|
|
|
|
|
|
|