The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/servers/is/dmp_rs.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* This file contains procedures to dump RS data structures.
    2  *
    3  * The entry points into this file are
    4  *   rproc_dump:        display RS system process table   
    5  *
    6  * Created:
    7  *   Oct 03, 2005:      by Jorrit N. Herder
    8  */
    9 
   10 #include "inc.h"
   11 #include "../rs/manager.h"
   12 
   13 PUBLIC struct rproc rproc[NR_SYS_PROCS];
   14 
   15 FORWARD _PROTOTYPE( char *s_flags_str, (int flags)              );
   16 
   17 /*===========================================================================*
   18  *                              rproc_dmp                                    *
   19  *===========================================================================*/
   20 PUBLIC void rproc_dmp()
   21 {
   22   struct rproc *rp;
   23   int i,j, n=0;
   24   static int prev_i=0;
   25 
   26   getsysinfo(RS_PROC_NR, SI_PROC_TAB, rproc);
   27 
   28   printf("Reincarnation Server (RS) system process table dump\n");
   29   printf("-proc-pid-flag--dev- -T--checked--alive- -starts-backoff- -command (argc)-\n");
   30   for (i=prev_i; i<NR_SYS_PROCS; i++) {
   31         rp = &rproc[i];
   32         if (! rp->r_flags & RS_IN_USE) continue;
   33         if (++n > 22) break;
   34         printf("%3d %5d %s %3d/%2d %3u %8u %8u  %3dx %3d %s (%d)",
   35                 rp->r_proc_nr, rp->r_pid, 
   36                 s_flags_str(rp->r_flags),
   37                 rp->r_dev_nr, rp->r_dev_style,
   38                 rp->r_period, 
   39                 rp->r_check_tm, rp->r_alive_tm,
   40                 rp->r_restarts, rp->r_backoff,
   41                 rp->r_cmd,
   42                 rp->r_argc
   43         );
   44         printf("\n");
   45   }
   46   if (i >= NR_SYS_PROCS) i = 0;
   47   else printf("--more--\r");
   48   prev_i = i;
   49 }
   50 
   51 
   52 PRIVATE char *s_flags_str(int flags)
   53 {
   54         static char str[5];
   55         str[0] = (flags & RS_IN_USE)     ? 'U' : '-';
   56         str[1] = (flags & RS_EXITING)    ? 'E' : '-';
   57         str[2] = '-';
   58         str[3] = '\0';
   59 
   60         return(str);
   61 }
   62 

Cache object: 325f59198f898f361b11ac4b95fba175


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.