1 /* This file contains procedures to dump RS data structures.
3 * The entry points into this file are
4 * rproc_dump: display RS system process table
7 * Oct 03, 2005: by Jorrit N. Herder
13 #include "../../kernel/priv.h"
14 #include "../rs/manager.h"
16 PUBLIC
struct rproc rproc
[NR_SYS_PROCS
];
18 FORWARD
_PROTOTYPE( char *s_flags_str
, (int flags
) );
20 /*===========================================================================*
22 *===========================================================================*/
23 PUBLIC
void rproc_dmp()
29 getsysinfo(RS_PROC_NR
, SI_PROC_TAB
, rproc
);
31 printf("Reincarnation Server (RS) system process table dump\n");
32 printf("-endpoint-flag--dev- -T---checked----alive-starts-backoff-label command-\n");
33 for (i
=prev_i
; i
<NR_SYS_PROCS
; i
++) {
35 if (! rp
->r_flags
& RS_IN_USE
) continue;
37 printf("%9d %s %3d/%2d %3u %8u %8u %4dx %3d %s %s",
39 s_flags_str(rp
->r_flags
),
40 rp
->r_dev_nr
, rp
->r_dev_style
,
42 rp
->r_check_tm
, rp
->r_alive_tm
,
43 rp
->r_restarts
, rp
->r_backoff
,
49 if (i
>= NR_SYS_PROCS
) i
= 0;
50 else printf("--more--\r");
55 PRIVATE
char *s_flags_str(int flags
)
58 str
[0] = (flags
& RS_IN_USE
) ? 'U' : '-';
59 str
[1] = (flags
& RS_EXITING
) ? 'E' : '-';