Coda Distributed File System
Macros | Functions | Variables
mond.c File Reference
#include <sys/types.h>
#include <sys/file.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include "coda_assert.h"
#include "lwp.h"
#include "rpc2.h"
#include "lock.h"
#include <new.h>
#include <stdarg.h>
#include <newplumb.h>
#include "mondgen.h"
#include "mond.h"
#include "report.h"
#include "vargs.h"
#include "data.h"
#include "bbuf.h"
#include "util.h"
#include "ohash.h"
#include "version.h"
#include "mondutil.h"
Include dependency graph for mond.c:

Macros

#define _BLURB_
 
#define UNWINDOBJ   "/usr/mond/bin/unwind"
 
#define STREQ(a, b)   (strcmp((a), (b)) == 0)
 

Functions

__cplusplus void SetMallocCheckLevel (int)
 
void Log_Done ()
 
void PutMagicNumber (void)
 
int main (int argc, char *argv[])
 
long VmonReportSession (RPC2_Handle cid, VmonVenusId *Venus, VmonSessionId Session, VolumeId Volume, UserId User, VmonAVSG *AVSG, RPC2_Unsigned StartTime, RPC2_Unsigned EndTime, RPC2_Unsigned CETime, long VSEA_size, VmonSessionEvent Events[], SessionStatistics *Stats, CacheStatistics *CacheStats)
 
long VmonReportCommEvent (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Unsigned ServerIPAddress, RPC2_Integer SN, RPC2_Unsigned Time, VmonCommEventType Type)
 
long VmonReportCallEvent (RPC2_Handle cid, VmonVenusId *Venus, long Time, long sc_size, CallCountEntry sc[])
 
long VmonReportMCallEvent (RPC2_Handle cid, VmonVenusId *Venus, long Time, long msc_size, MultiCallEntry msc[])
 
long VmonReportRVMStats (RPC2_Handle cid, VmonVenusId *Venus, long Time, RvmStatistics *stats)
 
long VmonReportVCBStats (RPC2_Handle cid, VmonVenusId *Venus, long VenusInit, long Time, VolumeId Volume, VCBStatistics *stats)
 
long VmonReportAdviceStats (RPC2_Handle cid, VmonVenusId *Venus, long Time, UserId User, AdviceStatistics *Stats, long Call_Size, AdviceCalls Call_Stats[], long Result_Size, AdviceResults Result_Stats[])
 
long VmonReportMiniCache (RPC2_Handle cid, VmonVenusId *Venus, long Time, long vn_size, VmonMiniCacheStat vn_stats[], long vfs_size, VmonMiniCacheStat vfs_stats[])
 
long VmonReportOverflow (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Unsigned VMStartTime, RPC2_Unsigned VMEndTime, RPC2_Integer VMCount, RPC2_Unsigned RVMStartTime, RPC2_Unsigned RVMEndTime, RPC2_Integer RVMCount)
 
long SmonReportCallEvent (RPC2_Handle cid, SmonViceId *Vice, RPC2_Unsigned Time, RPC2_Integer CBCount_size_, CallCountEntry CBCount[], RPC2_Integer ResCount_size_, CallCountEntry ResCount[], RPC2_Integer SmonCount_size_, CallCountEntry SmonCount[], RPC2_Integer VolDCount_size_, CallCountEntry VolDCount[], RPC2_Integer MultiCount_size_, MultiCallEntry MultiCount[], SmonStatistics *Stats)
 
long SmonReportResEvent (RPC2_Handle cid, SmonViceId *Vice, RPC2_Unsigned Time, VolumeId Volid, RPC2_Integer HighWaterMark, RPC2_Integer AllocNumber, RPC2_Integer DeallocNumber, RPC2_Integer ResOp_size_, ResOpEntry ResOp[])
 
long SmonReportOverflow (RPC2_Handle cid, SmonViceId *Vice, RPC2_Unsigned Time, RPC2_Unsigned StartTime, RPC2_Unsigned EndTime, RPC2_Integer Count)
 
long VmonReportIotInfo (RPC2_Handle cid, VmonVenusId *Venus, IOT_INFO *Info, RPC2_Integer AppNameLen, RPC2_String AppName)
 
long VmonReportIotStats (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Integer Time, IOT_STAT *Stats)
 
long VmonReportSubtreeStats (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Integer Time, LocalSubtreeStats *Stats)
 
long VmonReportRepairStats (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Integer Time, RepairSessionStats *Stats)
 
long VmonReportRwsStats (RPC2_Handle cid, VmonVenusId *Venus, RPC2_Integer Time, ReadWriteSharingStats *Stats)
 
long SmonNoop (RPC2_Handle cid)
 
long SmonReportRVMResStats (RPC2_Handle cid, SmonViceId *Vice, RPC2_Unsigned Time, RPC2_Integer VolID, FileResStats *FileRes, DirResStats *DirRes, RPC2_Integer LSH_size, HistoElem LogSizeHisto[], RPC2_Integer LMH_size, HistoElem LogMaxHisto[], ResConflictStats *Conflicts, RPC2_Integer SHH_size, HistoElem SuccHierHist[], RPC2_Integer FHH_size, HistoElem FailHierHist[], ResLogStats *ResLog, RPC2_Integer VLH_size, HistoElem VarLogHisto[], RPC2_Integer LS_size, HistoElem LogSize[])
 

Variables

char WorkingDir [256] = "/usr/mond/log"
 
char DataBaseName [256] = "codastats2"
 
int VmonPort = 1356
 
int LogLevel = 0
 
int BufSize = 50
 
int Listeners = 3
 
int LowWater = 0
 
int SleepTime = 60 * 60 * 2
 
int NoSpool = 0
 
char * RemoveOnDone = "-r"
 
int started = 0
 
int h_errno
 
FILE * LogFile = 0
 
FILE * DataFile = 0
 
bbufbuffer
 

Macro Definition Documentation

◆ _BLURB_

#define _BLURB_

◆ STREQ

#define STREQ (   a,
 
)    (strcmp((a), (b)) == 0)

◆ UNWINDOBJ

#define UNWINDOBJ   "/usr/mond/bin/unwind"

Function Documentation

◆ Log_Done()

void Log_Done ( )

◆ main()

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

◆ PutMagicNumber()

void PutMagicNumber ( void  )

◆ SetMallocCheckLevel()

__cplusplus void SetMallocCheckLevel ( int  foo)

◆ SmonNoop()

long SmonNoop ( RPC2_Handle  cid)

◆ SmonReportCallEvent()

long SmonReportCallEvent ( RPC2_Handle  cid,
SmonViceId *  Vice,
RPC2_Unsigned  Time,
RPC2_Integer  CBCount_size_,
CallCountEntry  CBCount[],
RPC2_Integer  ResCount_size_,
CallCountEntry  ResCount[],
RPC2_Integer  SmonCount_size_,
CallCountEntry  SmonCount[],
RPC2_Integer  VolDCount_size_,
CallCountEntry  VolDCount[],
RPC2_Integer  MultiCount_size_,
MultiCallEntry  MultiCount[],
SmonStatistics *  Stats 
)

◆ SmonReportOverflow()

long SmonReportOverflow ( RPC2_Handle  cid,
SmonViceId *  Vice,
RPC2_Unsigned  Time,
RPC2_Unsigned  StartTime,
RPC2_Unsigned  EndTime,
RPC2_Integer  Count 
)

◆ SmonReportResEvent()

long SmonReportResEvent ( RPC2_Handle  cid,
SmonViceId *  Vice,
RPC2_Unsigned  Time,
VolumeId  Volid,
RPC2_Integer  HighWaterMark,
RPC2_Integer  AllocNumber,
RPC2_Integer  DeallocNumber,
RPC2_Integer  ResOp_size_,
ResOpEntry  ResOp[] 
)

◆ SmonReportRVMResStats()

long SmonReportRVMResStats ( RPC2_Handle  cid,
SmonViceId *  Vice,
RPC2_Unsigned  Time,
RPC2_Integer  VolID,
FileResStats *  FileRes,
DirResStats *  DirRes,
RPC2_Integer  LSH_size,
HistoElem  LogSizeHisto[],
RPC2_Integer  LMH_size,
HistoElem  LogMaxHisto[],
ResConflictStats *  Conflicts,
RPC2_Integer  SHH_size,
HistoElem  SuccHierHist[],
RPC2_Integer  FHH_size,
HistoElem  FailHierHist[],
ResLogStats *  ResLog,
RPC2_Integer  VLH_size,
HistoElem  VarLogHisto[],
RPC2_Integer  LS_size,
HistoElem  LogSize[] 
)

◆ VmonReportAdviceStats()

long VmonReportAdviceStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  Time,
UserId  User,
AdviceStatistics *  Stats,
long  Call_Size,
AdviceCalls  Call_Stats[],
long  Result_Size,
AdviceResults  Result_Stats[] 
)

◆ VmonReportCallEvent()

long VmonReportCallEvent ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  Time,
long  sc_size,
CallCountEntry  sc[] 
)

◆ VmonReportCommEvent()

long VmonReportCommEvent ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Unsigned  ServerIPAddress,
RPC2_Integer  SN,
RPC2_Unsigned  Time,
VmonCommEventType  Type 
)

◆ VmonReportIotInfo()

long VmonReportIotInfo ( RPC2_Handle  cid,
VmonVenusId *  Venus,
IOT_INFO *  Info,
RPC2_Integer  AppNameLen,
RPC2_String  AppName 
)

◆ VmonReportIotStats()

long VmonReportIotStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Integer  Time,
IOT_STAT *  Stats 
)

◆ VmonReportMCallEvent()

long VmonReportMCallEvent ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  Time,
long  msc_size,
MultiCallEntry  msc[] 
)

◆ VmonReportMiniCache()

long VmonReportMiniCache ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  Time,
long  vn_size,
VmonMiniCacheStat  vn_stats[],
long  vfs_size,
VmonMiniCacheStat  vfs_stats[] 
)

◆ VmonReportOverflow()

long VmonReportOverflow ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Unsigned  VMStartTime,
RPC2_Unsigned  VMEndTime,
RPC2_Integer  VMCount,
RPC2_Unsigned  RVMStartTime,
RPC2_Unsigned  RVMEndTime,
RPC2_Integer  RVMCount 
)

◆ VmonReportRepairStats()

long VmonReportRepairStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Integer  Time,
RepairSessionStats *  Stats 
)

◆ VmonReportRVMStats()

long VmonReportRVMStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  Time,
RvmStatistics *  stats 
)

◆ VmonReportRwsStats()

long VmonReportRwsStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Integer  Time,
ReadWriteSharingStats *  Stats 
)

◆ VmonReportSession()

long VmonReportSession ( RPC2_Handle  cid,
VmonVenusId *  Venus,
VmonSessionId  Session,
VolumeId  Volume,
UserId  User,
VmonAVSG *  AVSG,
RPC2_Unsigned  StartTime,
RPC2_Unsigned  EndTime,
RPC2_Unsigned  CETime,
long  VSEA_size,
VmonSessionEvent  Events[],
SessionStatistics *  Stats,
CacheStatistics *  CacheStats 
)

◆ VmonReportSubtreeStats()

long VmonReportSubtreeStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
RPC2_Integer  Time,
LocalSubtreeStats *  Stats 
)

◆ VmonReportVCBStats()

long VmonReportVCBStats ( RPC2_Handle  cid,
VmonVenusId *  Venus,
long  VenusInit,
long  Time,
VolumeId  Volume,
VCBStatistics *  stats 
)

Variable Documentation

◆ buffer

◆ BufSize

int BufSize = 50

◆ DataBaseName

char DataBaseName[256] = "codastats2"

◆ DataFile

FILE* DataFile = 0

◆ h_errno

int h_errno
extern

◆ Listeners

int Listeners = 3

◆ LogFile

FILE* LogFile = 0

◆ LogLevel

int LogLevel = 0

◆ LowWater

int LowWater = 0

◆ NoSpool

int NoSpool = 0

◆ RemoveOnDone

char* RemoveOnDone = "-r"

◆ SleepTime

int SleepTime = 60 * 60 * 2

◆ started

int started = 0

◆ VmonPort

int VmonPort = 1356

◆ WorkingDir

char WorkingDir[256] = "/usr/mond/log"