Coda Distributed File System
Classes | Macros | Enumerations | Functions | Variables
cmon.cc File Reference
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <time.h>
#include "coda_string.h"
#include <errno.h>
#include <curses.h>
#include <lwp/lwp.h>
#include <lwp/timer.h>
#include <rpc2/rpc2.h>
#include <rpc2/rpc2_addrinfo.h>
#include <rpc2/se.h>
#include <rpc2/sftp.h>
#include <signal.h>
#include "vice.h"
#include <coda_getservbyname.h>
#include <coda_getaddrinfo.h>
Include dependency graph for cmon.cc:

Classes

struct  server
 
struct  printvals
 

Macros

#define MAXSRV   16
 
#define SRVCOLWIDTH   9 /* width of each server's window */
 
#define SRVCOLDECML   999999
 
#define FIRSTSRVCOL   7 /* index of first server's column */
 
#define SDNLEN   (SRVCOLWIDTH - 3) /* length of short disk names */
 
#define HOME()
 
#define QROWS(n)
 
#define WPRINT(x)
 
#define DIFF(x)   (s->newvs.x - s->oldvs.x)
 

Enumerations

enum  SrvState { DEAD , NEWBORN , ALIVE }
 

Functions

void cleanup_and_go (int ignored)
 
int main (int argc, char *argv[])
 
char * when (time_t now, time_t then)
 

Variables

struct server srv [MAXSRV]
 
int SrvCount = 0
 
struct timeval ProbeInterval
 
int AbsFlag = 0
 
int CpuFlag = 0
 
WINDOW * curWin
 
FILE * rpc2_logfile
 
FILE * dbg
 
char Dummy
 

Macro Definition Documentation

◆ DIFF

#define DIFF (   x)    (s->newvs.x - s->oldvs.x)

◆ FIRSTSRVCOL

#define FIRSTSRVCOL   7 /* index of first server's column */

◆ HOME

#define HOME ( )
Value:
wmove(curWin, 0, 0); \
wclear(curWin); \
wrefresh(curWin);
WINDOW * curWin
Definition: cmon.cc:120

◆ MAXSRV

#define MAXSRV   16

◆ QROWS

#define QROWS (   n)
Value:
for (i = 0; i < n; i++) \
wprintw(w, "%*s\n", SRVCOLWIDTH, "???");
#define SRVCOLWIDTH
Definition: cmon.cc:98
@ w
Definition: rvm_private.h:415

◆ SDNLEN

#define SDNLEN   (SRVCOLWIDTH - 3) /* length of short disk names */

◆ SRVCOLDECML

#define SRVCOLDECML   999999

◆ SRVCOLWIDTH

#define SRVCOLWIDTH   9 /* width of each server's window */

◆ WPRINT

#define WPRINT (   x)
Value:
do { \
if (pv.x == 0xffffffff) \
wprintw(w, "%*s\n", SRVCOLWIDTH, "***"); \
else if (pv.x > SRVCOLDECML) \
wprintw(w, "%*luM\n", SRVCOLWIDTH - 1, pv.x / (SRVCOLDECML + 1)); \
else \
wprintw(w, "%*lu\n", SRVCOLWIDTH, pv.x); \
} while (0)
#define SRVCOLDECML
Definition: cmon.cc:99

Enumeration Type Documentation

◆ SrvState

enum SrvState
Enumerator
DEAD 
NEWBORN 
ALIVE 

Function Documentation

◆ cleanup_and_go()

void cleanup_and_go ( int  ignored)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ when()

char * when ( time_t  now,
time_t  then 
)

Variable Documentation

◆ AbsFlag

int AbsFlag = 0

◆ CpuFlag

int CpuFlag = 0

◆ curWin

WINDOW* curWin

◆ dbg

FILE* dbg

◆ Dummy

char Dummy

◆ ProbeInterval

struct timeval ProbeInterval
Initial value:
= {
60, 0
}

◆ rpc2_logfile

FILE* rpc2_logfile
extern

◆ srv

struct server srv[MAXSRV]

◆ SrvCount

int SrvCount = 0