OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright 2000, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 * 00005 * This software has been released under the terms of the IBM Public 00006 * License. For details, see the LICENSE file in the top-level source 00007 * directory or online at http://www.openafs.org/dl/license10.html 00008 */ 00009 00010 /* 00011 * Statistics gathering stuff for the AFS cache manager. 00012 */ 00013 /* 00014 * The remainder of this file contains the statistics gathering stuff. 00015 */ 00016 00017 #ifndef __OPENAFS_AFS_STATS_H__ 00018 #define __OPENAFS_AFS_STATS_H__ 00019 00020 #include "afs/param.h" 00021 00022 /* the following is to work around a VAX compiler limitation */ 00023 #if defined(vax) 00024 #undef AFS_NOSTATS 00025 #define AFS_NOSTATS 00026 #endif /* VAX environment */ 00027 00028 #ifdef AFS_NOSTATS 00029 00030 /* 00031 * The data collection routines are simply no-ops 00032 */ 00033 #define AFS_STATCNT(arg) 00034 #define AFS_MEANCNT(arg, value) 00035 #define AFS_STATS(arg) 00036 #define XSTATS_DECLS 00037 #define XSTATS_START_TIME(arg) 00038 #define XSTATS_START_CMTIME(arg) 00039 #define XSTATS_END_TIME 00040 00041 #else /* AFS_NOSTATS */ 00042 00043 #define AFS_STATS(arg) arg 00044 #ifndef KERNEL 00045 /* NOTE: Ensure this is the same size in user and kernel mode. */ 00046 typedef struct { 00047 afs_int32 tv_sec; 00048 afs_int32 tv_usec; 00049 } osi_timeval32_t; 00050 #endif /* !KERNEL */ 00051 00052 #define XSTATS_DECLS struct afs_stats_opTimingData *opP = NULL; \ 00053 osi_timeval_t opStartTime = { 0, 0}, opStopTime, elapsedTime 00054 00055 #define XSTATS_START_TIME(arg) \ 00056 opP = &(afs_stats_cmfullperf.rpc.fsRPCTimes[arg]); \ 00057 osi_GetuTime(&opStartTime); 00058 00059 #define XSTATS_START_CMTIME(arg) \ 00060 opP = &(afs_stats_cmfullperf.rpc.cmRPCTimes[arg]); \ 00061 osi_GetuTime(&opStartTime); 00062 00063 #define XSTATS_END_TIME osi_GetuTime(&opStopTime); \ 00064 (opP->numOps)++; \ 00065 if (!code) { (opP->numSuccesses)++; \ 00066 afs_stats_GetDiff(elapsedTime, opStartTime, opStopTime); \ 00067 afs_stats_AddTo((opP->sumTime), elapsedTime); \ 00068 afs_stats_SquareAddTo((opP->sqrTime), elapsedTime); \ 00069 if (afs_stats_TimeLessThan(elapsedTime, (opP->minTime))) { \ 00070 afs_stats_TimeAssign((opP->minTime), elapsedTime); \ 00071 } if (afs_stats_TimeGreaterThan(elapsedTime, (opP->maxTime))) { \ 00072 afs_stats_TimeAssign((opP->maxTime), elapsedTime); } } 00073 00074 #endif /* AFS_NOSTATS */ 00075 00076 00077 00078 struct afs_MeanStats { 00079 afs_int32 average; 00080 afs_int32 elements; 00081 }; 00082 00083 /* 00084 * struct afs_CMCallStats 00085 * This is the place where we keep records on each and every 00086 * function call. 00087 * 00088 * This structure is encoded as a binary blob and thrown at the client 00089 * for use by the xstat_cm interface. As the datastructure is unversioned, 00090 * some rules apply; 00091 * *) Never add elements to the middle of the list. Everything new 00092 * must go at the end 00093 * *) Never remove elements from the list. If a function dies, don't 00094 * remove it's entry here (by all means, flag it as dead, though) 00095 * *) Never make elements conditional on preprocessor symbols. Doing 00096 * this would mean that the client has to be built with exactly 00097 * the same options as you are. Which isn't a great idea. 00098 * 00099 */ 00100 struct afs_CMCallStats { 00101 afs_int32 C_afs_init; /* afs_aix_subr.c */ 00102 afs_int32 C_gop_rdwr; /* afs_aix_subr.c */ 00103 afs_int32 C_aix_gnode_rele; /* afs_aix_subr.c */ 00104 afs_int32 C_gettimeofday; /* afs_aix_subr.c */ 00105 afs_int32 C_m_cpytoc; /* afs_aix_subr.c */ 00106 afs_int32 C_aix_vattr_null; /* afs_aix_subr.c */ 00107 afs_int32 C_afs_gn_ftrunc; /* afs_aixops.c */ 00108 afs_int32 C_afs_gn_rdwr; /* afs_aixops.c */ 00109 afs_int32 C_afs_gn_ioctl; /* afs_aixops.c */ 00110 afs_int32 C_afs_gn_lockctl; /* afs_aixops.c */ 00111 afs_int32 C_afs_gn_readlink; /* afs_aixops.c */ 00112 afs_int32 C_afs_gn_readdir; /* afs_aixops.c */ 00113 afs_int32 C_afs_gn_select; /* afs_aixops.c */ 00114 afs_int32 C_afs_gn_strategy; /* afs_aixops.c */ 00115 afs_int32 C_afs_gn_symlink; /* afs_aixops.c */ 00116 afs_int32 C_afs_gn_revoke; /* afs_aixops.c */ 00117 afs_int32 C_afs_gn_link; /* afs_aixops.c */ 00118 afs_int32 C_afs_gn_mkdir; /* afs_aixops.c */ 00119 afs_int32 C_afs_gn_mknod; /* afs_aixops.c */ 00120 afs_int32 C_afs_gn_remove; /* afs_aixops.c */ 00121 afs_int32 C_afs_gn_rename; /* afs_aixops.c */ 00122 afs_int32 C_afs_gn_rmdir; /* afs_aixops.c */ 00123 afs_int32 C_afs_gn_fid; /* afs_aixops.c */ 00124 afs_int32 C_afs_gn_lookup; /* afs_aixops.c */ 00125 afs_int32 C_afs_gn_open; /* afs_aixops.c */ 00126 afs_int32 C_afs_gn_create; /* afs_aixops.c */ 00127 afs_int32 C_afs_gn_hold; /* afs_aixops.c */ 00128 afs_int32 C_afs_gn_close; /* afs_aixops.c */ 00129 afs_int32 C_afs_gn_map; /* afs_aixops.c */ 00130 afs_int32 C_afs_gn_rele; /* afs_aixops.c */ 00131 afs_int32 C_afs_gn_unmap; /* afs_aixops.c */ 00132 afs_int32 C_afs_gn_access; /* afs_aixops.c */ 00133 afs_int32 C_afs_gn_getattr; /* afs_aixops.c */ 00134 afs_int32 C_afs_gn_setattr; /* afs_aixops.c */ 00135 afs_int32 C_afs_gn_fclear; /* afs_aixops.c */ 00136 afs_int32 C_afs_gn_fsync; /* afs_aixops.c */ 00137 afs_int32 C_pHash; /* afs_buffer.c */ 00138 afs_int32 C_DInit; /* afs_buffer.c */ 00139 afs_int32 C_DRead; /* afs_buffer.c */ 00140 afs_int32 C_FixupBucket; /* afs_buffer.c */ 00141 afs_int32 C_afs_newslot; /* afs_buffer.c */ 00142 afs_int32 C_DRelease; /* afs_buffer.c */ 00143 afs_int32 C_DFlush; /* afs_buffer.c */ 00144 afs_int32 C_DFlushEntry; /* afs_buffer.c */ 00145 afs_int32 C_DVOffset; /* afs_buffer.c */ 00146 afs_int32 C_DZap; /* afs_buffer.c */ 00147 afs_int32 C_DNew; /* afs_buffer.c */ 00148 afs_int32 C_shutdown_bufferpackage; /* afs_buffer.c */ 00149 afs_int32 C_afs_CheckKnownBad; /* afs_cache.c */ 00150 afs_int32 C_afs_RemoveVCB; /* afs_cache.c */ 00151 afs_int32 C_afs_NewVCache; /* afs_cache.c */ 00152 afs_int32 C_afs_FlushActiveVcaches; /* afs_cache.c */ 00153 afs_int32 C_afs_VerifyVCache; /* afs_cache.c */ 00154 afs_int32 C_afs_WriteVCache; /* afs_cache.c */ 00155 afs_int32 C_afs_GetVCache; /* afs_cache.c */ 00156 afs_int32 C_afs_StuffVcache; /* afs_cache.c */ 00157 afs_int32 C_afs_FindVCache; /* afs_cache.c */ 00158 afs_int32 C_afs_PutDCache; /* afs_cache.c */ 00159 afs_int32 C_afs_PutVCache; /* afs_cache.c */ 00160 afs_int32 C_CacheStoreProc; /* afs_cache.c */ 00161 afs_int32 C_afs_FindDCache; /* afs_cache.c */ 00162 afs_int32 C_afs_TryToSmush; /* afs_cache.c */ 00163 afs_int32 C_afs_AdjustSize; /* afs_cache.c */ 00164 afs_int32 C_afs_CheckSize; /* afs_cache.c */ 00165 afs_int32 C_afs_StoreWarn; /* afs_cache.c */ 00166 afs_int32 C_CacheFetchProc; /* afs_cache.c */ 00167 afs_int32 C_UFS_CacheStoreProc; /* afs_cache.c */ 00168 afs_int32 C_UFS_CacheFetchProc; /* afs_cache.c */ 00169 afs_int32 C_afs_GetDCache; /* afs_cache.c */ 00170 afs_int32 C_afs_SimpleVStat; /* afs_cache.c */ 00171 afs_int32 C_afs_ProcessFS; /* afs_cache.c */ 00172 afs_int32 C_afs_InitCacheInfo; /* afs_cache.c */ 00173 afs_int32 C_afs_InitVolumeInfo; /* afs_cache.c */ 00174 afs_int32 C_afs_InitCacheFile; /* afs_cache.c */ 00175 afs_int32 C_afs_CacheInit; /* afs_cache.c */ 00176 afs_int32 C_afs_GetDSlot; /* afs_cache.c */ 00177 afs_int32 C_afs_WriteThroughDSlots; /* afs_cache.c */ 00178 afs_int32 C_afs_MemGetDSlot; /* afs_cache.c */ 00179 afs_int32 C_afs_UFSGetDSlot; /* afs_cache.c */ 00180 afs_int32 C_afs_StoreDCache; /* afs_cache.c */ 00181 afs_int32 C_afs_StoreMini; /* afs_cache.c */ 00182 afs_int32 C_shutdown_cache; /* afs_cache.c */ 00183 afs_int32 C_afs_StoreAllSegments; /* afs_cache.c */ 00184 afs_int32 C_afs_InvalidateAllSegments; /* afs_cache.c */ 00185 afs_int32 C_afs_TruncateAllSegments; /* afs_cache.c */ 00186 afs_int32 C_afs_CheckVolSync; /* afs_cache.c */ 00187 afs_int32 C_afs_wakeup; /* afs_cache.c */ 00188 afs_int32 C_afs_CFileOpen; /* afs_cache.c */ 00189 afs_int32 C_afs_CFileTruncate; /* afs_cache.c */ 00190 afs_int32 C_afs_GetDownD; /* afs_cache.c */ 00191 afs_int32 C_afs_WriteDCache; /* afs_cache.c */ 00192 afs_int32 C_afs_FlushDCache; /* afs_cache.c */ 00193 afs_int32 C_afs_GetDownDSlot; /* afs_cache.c */ 00194 afs_int32 C_afs_FlushVCache; /* afs_cache.c */ 00195 afs_int32 C_afs_GetDownV; /* afs_cache.c */ 00196 afs_int32 C_afs_QueueVCB; /* afs_cache.c */ 00197 afs_int32 C_afs_call; /* afs_call.c */ 00198 afs_int32 C_afs_syscall_call; /* afs_call.c */ 00199 afs_int32 C_syscall; /* afs_call.c */ 00200 afs_int32 C_lpioctl; /* afs_call.c */ 00201 afs_int32 C_lsetpag; /* afs_call.c */ 00202 afs_int32 C_afs_syscall; /* afs_call.c */ 00203 afs_int32 C_afs_CheckInit; /* afs_call.c */ 00204 afs_int32 C_afs_shutdown; /* afs_call.c */ 00205 afs_int32 C_shutdown_BKG; /* afs_call.c */ 00206 afs_int32 C_shutdown_afstest; /* afs_call.c */ 00207 afs_int32 C_SRXAFSCB_GetCE; /* afs_callback.c */ 00208 afs_int32 C_ClearCallBack; /* afs_callback.c */ 00209 afs_int32 C_SRXAFSCB_GetLock; /* afs_callback.c */ 00210 afs_int32 C_SRXAFSCB_CallBack; /* afs_callback.c */ 00211 afs_int32 C_SRXAFSCB_InitCallBackState; /* afs_callback.c */ 00212 afs_int32 C_SRXAFSCB_Probe; /* afs_callback.c */ 00213 afs_int32 C_afs_RXCallBackServer; /* afs_callback.c */ 00214 afs_int32 C_shutdown_CB; /* afs_callback.c */ 00215 afs_int32 C_afs_Chunk; /* afs_chunk.c */ 00216 afs_int32 C_afs_ChunkBase; /* afs_chunk.c */ 00217 afs_int32 C_afs_ChunkOffset; /* afs_chunk.c */ 00218 afs_int32 C_afs_ChunkSize; /* afs_chunk.c */ 00219 afs_int32 C_afs_ChunkToBase; /* afs_chunk.c */ 00220 afs_int32 C_afs_ChunkToSize; /* afs_chunk.c */ 00221 afs_int32 C_afs_SetChunkSize; /* afs_chunk.c */ 00222 00223 afs_int32 C_afs_config; /* afs_config.c */ 00224 afs_int32 C_mem_freebytes; /* afs_config.c */ 00225 afs_int32 C_mem_getbytes; /* afs_config.c */ 00226 afs_int32 C_fpalloc; /* afs_config.c */ 00227 afs_int32 C_kluge_init; /* afs_config.c */ 00228 afs_int32 C_ufdalloc; /* afs_config.c */ 00229 afs_int32 C_ufdfree; /* afs_config.c */ 00230 afs_int32 C_commit; /* afs_config.c */ 00231 afs_int32 C_dev_ialloc; /* afs_config.c */ 00232 afs_int32 C_ffree; /* afs_config.c */ 00233 afs_int32 C_iget; /* afs_config.c */ 00234 afs_int32 C_iptovp; /* afs_config.c */ 00235 afs_int32 C_ilock; /* afs_config.c */ 00236 afs_int32 C_irele; /* afs_config.c */ 00237 afs_int32 C_iput; /* afs_config.c */ 00238 00239 afs_int32 C_afs_Daemon; /* afs_daemons.c */ 00240 afs_int32 C_afs_CheckRootVolume; /* afs_daemons.c */ 00241 afs_int32 C_BPath; /* afs_daemons.c */ 00242 afs_int32 C_BPrefetch; /* afs_daemons.c */ 00243 afs_int32 C_BStore; /* afs_daemons.c */ 00244 afs_int32 C_afs_BBusy; /* afs_daemons.c */ 00245 afs_int32 C_afs_BQueue; /* afs_daemons.c */ 00246 afs_int32 C_afs_BRelease; /* afs_daemons.c */ 00247 afs_int32 C_afs_BackgroundDaemon; /* afs_daemons.c */ 00248 afs_int32 C_shutdown_daemons; /* afs_daemons.c */ 00249 afs_int32 C_exporter_add; /* afs_exporter.c */ 00250 afs_int32 C_exporter_find; /* afs_exporter.c */ 00251 afs_int32 C_afs_gfs_kalloc; /* afs_gfs_subr.c */ 00252 afs_int32 C_IsAfsVnode; /* afs_gfs_subr.c */ 00253 afs_int32 C_SetAfsVnode; /* afs_gfs_subr.c */ 00254 afs_int32 C_afs_gfs_kfree; /* afs_gfs_subr.c */ 00255 afs_int32 C_gop_lookupname; /* afs_gfs_subr.c */ 00256 afs_int32 C_gfsvop_getattr; /* afs_gfs_subr.c */ 00257 afs_int32 C_gfsvop_rdwr; /* afs_gfs_subr.c */ 00258 afs_int32 C_afs_uniqtime; /* afs_gfs_subr.c */ 00259 afs_int32 C_gfs_vattr_null; /* afs_gfs_subr.c */ 00260 afs_int32 C_afs_lock; /* afs_gfsops.c */ 00261 afs_int32 C_afs_unlock; /* afs_gfsops.c */ 00262 afs_int32 C_afs_update; /* afs_gfsops.c */ 00263 afs_int32 C_afs_gclose; /* afs_gfsops.c */ 00264 afs_int32 C_afs_gopen; /* afs_gfsops.c */ 00265 afs_int32 C_afs_greadlink; /* afs_gfsops.c */ 00266 afs_int32 C_afs_select; /* afs_gfsops.c */ 00267 afs_int32 C_afs_gbmap; /* afs_gfsops.c */ 00268 afs_int32 C_afs_getfsdata; /* afs_gfsops.c */ 00269 afs_int32 C_afs_gsymlink; /* afs_gfsops.c */ 00270 afs_int32 C_afs_namei; /* afs_gfsops.c */ 00271 afs_int32 C_printgnode; /* afs_gfsops.c */ 00272 afs_int32 C_HaveGFSLock; /* afs_gfsops.c */ 00273 afs_int32 C_afs_gmount; /* afs_gfsops.c */ 00274 afs_int32 C_AddGFSLock; /* afs_gfsops.c */ 00275 afs_int32 C_RemoveGFSLock; /* afs_gfsops.c */ 00276 afs_int32 C_afs_grlock; /* afs_gfsops.c */ 00277 afs_int32 C_afs_gumount; /* afs_gfsops.c */ 00278 afs_int32 C_afs_gget; /* afs_gfsops.c */ 00279 afs_int32 C_afs_glink; /* afs_gfsops.c */ 00280 afs_int32 C_afs_gmkdir; /* afs_gfsops.c */ 00281 afs_int32 C_afs_sbupdate; /* afs_gfsops.c */ 00282 afs_int32 C_afs_unlink; /* afs_gfsops.c */ 00283 afs_int32 C_afs_grmdir; /* afs_gfsops.c */ 00284 afs_int32 C_afs_makenode; /* afs_gfsops.c */ 00285 afs_int32 C_afs_grename; /* afs_gfsops.c */ 00286 afs_int32 C_afs_rele; /* afs_gfsops.c */ 00287 afs_int32 C_afs_syncgp; /* afs_gfsops.c */ 00288 afs_int32 C_afs_getval; /* afs_gfsops.c */ 00289 afs_int32 C_afs_gfshack; /* afs_gfsops.c */ 00290 afs_int32 C_afs_trunc; /* afs_gfsops.c */ 00291 afs_int32 C_afs_rwgp; /* afs_gfsops.c */ 00292 afs_int32 C_afs_stat; /* afs_gfsops.c */ 00293 afs_int32 C_afsc_link; /* afs_hp_subr.c */ 00294 afs_int32 C_hpsobind; /* afs_hp_subr.c */ 00295 afs_int32 C_hpsoclose; /* afs_hp_subr.c */ 00296 afs_int32 C_hpsocreate; /* afs_hp_subr.c */ 00297 afs_int32 C_hpsoreserve; /* afs_hp_subr.c */ 00298 afs_int32 C_afs_vfs_mount; /* afs_hp_subr.c */ 00299 afs_int32 C_devtovfs; /* afs_istuff.c */ 00300 afs_int32 C_igetinode; /* afs_istuff.c */ 00301 afs_int32 C_afs_syscall_iopen; /* afs_istuff.c */ 00302 afs_int32 C_iopen; /* afs_istuff.c */ 00303 afs_int32 C_afs_syscall_iincdec; /* afs_istuff.c */ 00304 afs_int32 C_afs_syscall_ireadwrite; /* afs_istuff.c */ 00305 afs_int32 C_iincdec; /* afs_istuff.c */ 00306 afs_int32 C_ireadwrite; /* afs_istuff.c */ 00307 afs_int32 C_oiread; /* afs_istuff.c */ 00308 afs_int32 C_AHash; /* afs_istuff.c */ 00309 afs_int32 C_QTOA; /* afs_istuff.c */ 00310 afs_int32 C_afs_FindPartByDev; /* afs_istuff.c */ 00311 afs_int32 C_aux_init; /* afs_istuff.c */ 00312 afs_int32 C_afs_GetNewPart; /* afs_istuff.c */ 00313 afs_int32 C_afs_InitAuxVolFile; /* afs_istuff.c */ 00314 afs_int32 C_afs_CreateAuxEntry; /* afs_istuff.c */ 00315 afs_int32 C_afs_GetAuxSlot; /* afs_istuff.c */ 00316 afs_int32 C_afs_GetDownAux; /* afs_istuff.c */ 00317 afs_int32 C_afs_FlushAuxCache; /* afs_istuff.c */ 00318 afs_int32 C_afs_GetAuxInode; /* afs_istuff.c */ 00319 afs_int32 C_afs_PutAuxInode; /* afs_istuff.c */ 00320 afs_int32 C_afs_ReadAuxInode; /* afs_istuff.c */ 00321 afs_int32 C_afs_WriteAuxInode; /* afs_istuff.c */ 00322 afs_int32 C_afs_auxcall; /* afs_istuff.c */ 00323 afs_int32 C_tmpdbg_auxtbl; /* afs_istuff.c */ 00324 afs_int32 C_tmpdbg_parttbl; /* afs_istuff.c */ 00325 afs_int32 C_idec; /* afs_istuff.c */ 00326 afs_int32 C_iinc; /* afs_istuff.c */ 00327 afs_int32 C_iread; /* afs_istuff.c */ 00328 afs_int32 C_iwrite; /* afs_istuff.c */ 00329 afs_int32 C_getinode; /* afs_istuff.c */ 00330 afs_int32 C_trygetfs; /* afs_istuff.c */ 00331 afs_int32 C_iforget; /* afs_istuff.c */ 00332 afs_int32 C_afs_syscall_icreate; /* afs_istuff.c */ 00333 afs_int32 C_icreate; /* afs_istuff.c */ 00334 afs_int32 C_Lock_Init; /* afs_lock.c */ 00335 afs_int32 C_Lock_Obtain; /* afs_lock.c */ 00336 afs_int32 C_Lock_ReleaseR; /* afs_lock.c */ 00337 afs_int32 C_Lock_ReleaseW; /* afs_lock.c */ 00338 afs_int32 C_afs_BozonLock; /* afs_lock.c */ 00339 afs_int32 C_afs_BozonUnlock; /* afs_lock.c */ 00340 afs_int32 C_osi_SleepR; /* afs_lock.c */ 00341 afs_int32 C_osi_SleepS; /* afs_lock.c */ 00342 afs_int32 C_osi_SleepW; /* afs_lock.c */ 00343 afs_int32 C_osi_Sleep; /* afs_lock */ 00344 afs_int32 C_afs_BozonInit; /* afs_lock.c */ 00345 afs_int32 C_afs_CheckBozonLock; /* afs_lock.c */ 00346 afs_int32 C_afs_CheckBozonLockBlocking; /* afs_lock.c */ 00347 afs_int32 C_xxxinit; /* afs_main.c */ 00348 afs_int32 C_KernelEntry; /* afs_main.c */ 00349 afs_int32 C_afs_InitMemCache; /* afs_memcache.c */ 00350 afs_int32 C_afs_LookupMCE; /* afs_memcache.c */ 00351 afs_int32 C_afs_MemReadBlk; /* afs_memcache.c */ 00352 afs_int32 C_afs_MemReadUIO; /* afs_memcache.c */ 00353 afs_int32 C_afs_MemWriteBlk; /* afs_memcache.c */ 00354 afs_int32 C_afs_MemCacheStoreProc; /* afs_memcache.c */ 00355 afs_int32 C_afs_MemCacheTruncate; /* afs_memcache.c */ 00356 afs_int32 C_afs_MemWriteUIO; /* afs_memcache.c */ 00357 afs_int32 C_afs_MemCacheFetchProc; /* afs_memcache.c */ 00358 afs_int32 C_afs_vnode_pager_create; /* afs_next_aux.c */ 00359 afs_int32 C_next_KernelEntry; /* afs_next_subr.c */ 00360 afs_int32 C_afs_GetNfsClientPag; /* afs_nfsclnt.c */ 00361 afs_int32 C_afs_FindNfsClientPag; /* afs_nfsclnt.c */ 00362 afs_int32 C_afs_PutNfsClientPag; /* afs_nfsclnt.c */ 00363 afs_int32 C_afs_nfsclient_reqhandler; /* afs_nfsclnt.c */ 00364 afs_int32 C_afs_nfsclient_GC; /* afs_nfsclnt.c */ 00365 afs_int32 C_afs_nfsclient_hold; /* afs_nfsclnt.c */ 00366 afs_int32 C_afs_nfsclient_stats; /* afs_nfsclnt.c */ 00367 afs_int32 C_afs_nfsclient_sysname; /* afs_nfsclnt.c */ 00368 afs_int32 C_afs_nfsclient_shutdown; /* afs_nfsclnt.c */ 00369 afs_int32 C_afs_rfs_readdir_fixup; /* afs_nfssrv.c */ 00370 afs_int32 C_afs_rfs_dispatch; /* afs_nfssrv.c */ 00371 afs_int32 C_afs_xnfs_svc; /* afs_nfssrv.c */ 00372 afs_int32 C_afs_xdr_putrddirres; /* afs_nfssrv.c */ 00373 afs_int32 C_afs_rfs_readdir; /* afs_nfssrv.c */ 00374 afs_int32 C_afs_rfs_rddirfree; /* afs_nfssrv.c */ 00375 afs_int32 C_rfs_dupcreate; /* afs_nfssrv.c */ 00376 afs_int32 C_rfs_dupsetattr; /* afs_nfssrv.c */ 00377 afs_int32 C_Nfs2AfsCall; /* afs_nfssrv.c */ 00378 afs_int32 C_afs_sun_xuntext; /* afs_osi.c */ 00379 afs_int32 C_osi_Active; /* afs_osi.c */ 00380 afs_int32 C_osi_FlushPages; /* afs_osi.c */ 00381 afs_int32 C_osi_FlushText; /* afs_osi.c */ 00382 afs_int32 C_osi_CallProc; /* afs_osi.c */ 00383 afs_int32 C_osi_CancelProc; /* afs_osi.c */ 00384 afs_int32 C_osi_Invisible; /* afs_osi.c */ 00385 afs_int32 C_osi_Time; /* afs_osi.c */ 00386 afs_int32 C_osi_Alloc; /* afs_osi.c */ 00387 afs_int32 C_osi_SetTime; /* afs_osi.c */ 00388 afs_int32 C_osi_Dump; /* afs_osi.c */ 00389 afs_int32 C_osi_Free; /* afs_osi.c */ 00390 afs_int32 C_shutdown_osi; /* afs_osi.c */ 00391 afs_int32 C_osi_UFSOpen; /* afs_osifile.c */ 00392 afs_int32 C_osi_Close; /* afs_osifile.c */ 00393 afs_int32 C_osi_Stat; /* afs_osifile.c */ 00394 afs_int32 C_osi_Truncate; /* afs_osifile.c */ 00395 afs_int32 C_osi_Read; /* afs_osifile.c */ 00396 afs_int32 C_osi_Write; /* afs_osifile.c */ 00397 afs_int32 C_osi_MapStrategy; /* afs_osifile.c */ 00398 afs_int32 C_shutdown_osifile; /* afs_osifile.c */ 00399 afs_int32 C_osi_FreeLargeSpace; /* afs_osinet.c */ 00400 afs_int32 C_osi_FreeSmallSpace; /* afs_osinet.c */ 00401 afs_int32 C_pkt_iodone; /* afs_osinet.c */ 00402 afs_int32 C_shutdown_osinet; /* afs_osinet.c */ 00403 afs_int32 C_afs_cs; /* afs_osinet.c */ 00404 afs_int32 C_osi_AllocLargeSpace; /* afs_osinet.c */ 00405 afs_int32 C_osi_AllocSmallSpace; /* afs_osinet.c */ 00406 afs_int32 C_osi_CloseToTheEdge; /* afs_osinet.c */ 00407 afs_int32 C_osi_xgreedy; /* afs_osinet.c */ 00408 afs_int32 C_osi_FreeSocket; /* afs_osinet.c */ 00409 afs_int32 C_osi_NewSocket; /* afs_osinet.c */ 00410 afs_int32 C_trysblock; /* afs_osinet.c */ 00411 afs_int32 C_osi_NetSend; /* afs_osinet.c */ 00412 afs_int32 C_WaitHack; /* afs_osinet.c */ 00413 afs_int32 C_osi_CancelWait; /* afs_osinet.c */ 00414 afs_int32 C_osi_InitWaitHandle; /* afs_osinet.c */ 00415 afs_int32 C_osi_Wakeup; /* afs_osinet.c */ 00416 afs_int32 C_osi_Wait; /* afs_osinet.c */ 00417 afs_int32 C_dirp_Read; /* afs_physio.c */ 00418 afs_int32 C_dirp_SetCacheDev; /* afs_physio.c */ 00419 afs_int32 C_Die; /* afs_physio.c */ 00420 afs_int32 C_dirp_Cpy; /* afs_physio.c */ 00421 afs_int32 C_dirp_Eq; /* afs_physio.c */ 00422 afs_int32 C_dirp_Write; /* afs_physio.c */ 00423 afs_int32 C_dirp_Zap; /* afs_physio.c */ 00424 afs_int32 C_PSetVolumeStatus; /* afs_pioctl.c */ 00425 afs_int32 C_PFlush; /* afs_pioctl.c */ 00426 afs_int32 C_PNewStatMount; /* afs_pioctl.c */ 00427 afs_int32 C_PGetTokens; /* afs_pioctl.c */ 00428 afs_int32 C_PUnlog; /* afs_pioctl.c */ 00429 afs_int32 C_PCheckServers; /* afs_pioctl.c */ 00430 afs_int32 C_PMariner; /* afs_pioctl.c */ 00431 afs_int32 C_PCheckAuth; /* afs_pioctl.c */ 00432 afs_int32 C_PCheckVolNames; /* afs_pioctl.c */ 00433 afs_int32 C_PFindVolume; /* afs_pioctl.c */ 00434 afs_int32 C_Prefetch; /* afs_pioctl.c */ 00435 afs_int32 C_PGetCacheSize; /* afs_pioctl.c */ 00436 afs_int32 C_PRemoveCallBack; /* afs_pioctl.c */ 00437 afs_int32 C_PSetCacheSize; /* afs_pioctl.c */ 00438 afs_int32 C_PViceAccess; /* afs_pioctl.c */ 00439 afs_int32 C_PListCells; /* afs_pioctl.c */ 00440 afs_int32 C_PNewCell; /* afs_pioctl.c */ 00441 afs_int32 C_PRemoveMount; /* afs_pioctl.c */ 00442 afs_int32 C_HandleIoctl; /* afs_pioctl.c */ 00443 afs_int32 C__AFSIOCTL; /* afs_pioctl.c */ 00444 afs_int32 C__VALIDAFSIOCTL; /* afs_pioctl.c */ 00445 afs_int32 C_PGetCellStatus; /* afs_pioctl.c */ 00446 afs_int32 C_PSetCellStatus; /* afs_pioctl.c */ 00447 afs_int32 C_PVenusLogging; /* afs_pioctl.c */ 00448 afs_int32 C_PFlushVolumeData; /* afs_pioctl.c */ 00449 afs_int32 C_PSetSysName; /* afs_pioctl.c */ 00450 afs_int32 C_PExportAfs; /* afs_pioctl.c */ 00451 afs_int32 C_HandleClientContext; /* afs_pioctl.c */ 00452 afs_int32 C_afs_ioctl; /* afs_pioctl.c */ 00453 afs_int32 C_afs_xioctl; /* afs_pioctl.c */ 00454 afs_int32 C_afs_pioctl; /* afs_pioctl.c */ 00455 afs_int32 C_afs_syscall_pioctl; /* afs_pioctl.c */ 00456 afs_int32 C_HandlePioctl; /* afs_pioctl.c */ 00457 afs_int32 C_PGetAcl; /* afs_pioctl.c */ 00458 afs_int32 C_PGetFID; /* afs_pioctl.c */ 00459 afs_int32 C_PSetAcl; /* afs_pioctl.c */ 00460 afs_int32 C_PBogus; /* afs_pioctl.c */ 00461 afs_int32 C_PGetFileCell; /* afs_pioctl.c */ 00462 afs_int32 C_PGetWSCell; /* afs_pioctl.c */ 00463 afs_int32 C_PNoop; /* afs_pioctl.c */ 00464 afs_int32 C_PGetUserCell; /* afs_pioctl.c */ 00465 afs_int32 C_PSetTokens; /* afs_pioctl.c */ 00466 afs_int32 C_PGetVolumeStatus; /* afs_pioctl.c */ 00467 afs_int32 C_afs_ResetAccessCache; /* afs_resource.c */ 00468 afs_int32 C_afs_FindUser; /* afs_resource.c */ 00469 afs_int32 C_afs_ResetUserConns; /* afs_resource.c */ 00470 afs_int32 C_afs_ResourceInit; /* afs_resource.c */ 00471 afs_int32 C_afs_GetCell; /* afs_resource.c */ 00472 afs_int32 C_afs_GetCellByIndex; /* afs_resource.c */ 00473 afs_int32 C_afs_GetCellByName; /* afs_resource.c */ 00474 afs_int32 C_afs_GetRealCellByIndex; /* afs_resource.c */ 00475 afs_int32 C_afs_NewCell; /* afs_resource.c */ 00476 afs_int32 C_afs_GetUser; /* afs_resource.c */ 00477 afs_int32 C_afs_PutUser; /* afs_resource.c */ 00478 afs_int32 C_afs_SetPrimary; /* afs_resource.c */ 00479 afs_int32 C_CheckVLDB; /* afs_resource.c */ 00480 afs_int32 C_afs_GetVolume; /* afs_resource.c */ 00481 afs_int32 C_afs_GetVolumeByName; /* afs_resource.c */ 00482 afs_int32 C_InstallVolumeEntry; /* afs_resource.c */ 00483 afs_int32 C_InstallVolumeInfo; /* afs_resource.c */ 00484 afs_int32 C_afs_FindServer; /* afs_resource.c */ 00485 afs_int32 C_afs_PutVolume; /* afs_resource.c */ 00486 afs_int32 C_afs_random; /* afs_resource.c */ 00487 afs_int32 C_ranstage; /* afs_resource.c */ 00488 afs_int32 C_RemoveUserConns; /* afs_resource.c */ 00489 afs_int32 C_afs_MarinerLog; /* afs_resource.c */ 00490 afs_int32 C_afs_vtoi; /* afs_resource.c */ 00491 afs_int32 C_afs_GetServer; /* afs_resource.c */ 00492 afs_int32 C_afs_SortServers; /* afs_resource.c */ 00493 afs_int32 C_afs_Conn; /* afs_resource.c */ 00494 afs_int32 C_afs_ConnByHost; /* afs_resource.c */ 00495 afs_int32 C_afs_ConnByMHosts; /* afs_resource.c */ 00496 afs_int32 C_afs_Analyze; /* afs_resource.c */ 00497 afs_int32 C_afs_PutConn; /* afs_resource.c */ 00498 afs_int32 C_afs_ResetVolumeInfo; /* afs_resource.c */ 00499 afs_int32 C_StartLogFile; /* afs_resource.c */ 00500 afs_int32 C_afs_SetLogFile; /* afs_resource.c */ 00501 afs_int32 C_EndLogFile; /* afs_resource.c */ 00502 afs_int32 C_afs_dp; /* afs_resource.c */ 00503 afs_int32 C_fprf; /* afs_resource.c */ 00504 afs_int32 C_fprint; /* afs_resource.c */ 00505 afs_int32 C_fprintn; /* afs_resource.c */ 00506 afs_int32 C_afs_CheckLocks; /* afs_resource.c */ 00507 afs_int32 C_puttofile; /* afs_resource.c */ 00508 afs_int32 C_shutdown_AFS; /* afs_resource.c */ 00509 afs_int32 C_afs_CheckCacheResets; /* afs_resource.c */ 00510 afs_int32 C_afs_GCUserData; /* afs_resource.c */ 00511 afs_int32 C_VSleep; /* afs_resource.c */ 00512 afs_int32 C_afs_CheckCode; /* afs_resource.c */ 00513 afs_int32 C_afs_CopyError; /* afs_resource.c */ 00514 afs_int32 C_afs_FinalizeReq; /* afs_resource.c */ 00515 afs_int32 C_afs_cv2string; /* afs_resource.c */ 00516 afs_int32 C_afs_FindVolCache; /* afs_resource.c */ 00517 afs_int32 C_afs_GetVolCache; /* afs_resource.c */ 00518 afs_int32 C_afs_GetVolSlot; /* afs_resource.c */ 00519 afs_int32 C_afs_WriteVolCache; /* afs_resource.c */ 00520 afs_int32 C_afs_UFSGetVolSlot; /* afs_resource.c */ 00521 afs_int32 C_afs_CheckVolumeNames; /* afs_resource.c */ 00522 afs_int32 C_afs_MemGetVolSlot; /* afs_resource.c */ 00523 afs_int32 C_print_internet_address; /* afs_resource.c */ 00524 afs_int32 C_CheckVLServer; /* afs_resource.c */ 00525 afs_int32 C_HaveCallBacksFrom; /* afs_resource.c */ 00526 afs_int32 C_ServerDown; /* afs_resource.c */ 00527 afs_int32 C_afs_CheckServers; /* afs_resource.c */ 00528 afs_int32 C_afs_AddToMean; /* afs_stat.c */ 00529 afs_int32 C_afs_GetCMStat; /* afs_stat.c */ 00530 afs_int32 C_afs_getpage; /* afs_sun_subr.c */ 00531 afs_int32 C_afs_putpage; /* afs_sun_subr.c */ 00532 afs_int32 C_afs_nfsrdwr; /* afs_sun_subr.c */ 00533 afs_int32 C_afs_map; /* afs_sun_subr.c */ 00534 afs_int32 C_afs_cmp; /* afs_sun_subr.c */ 00535 afs_int32 C_afs_cntl; /* afs_sun_subr.c */ 00536 afs_int32 C_afs_dump; /* afs_sun_subr.c */ 00537 afs_int32 C_afs_realvp; /* afs_sun_subr.c */ 00538 afs_int32 C_afs_PageLeft; /* afs_sun_subr.c */ 00539 afs_int32 C_afsinit; /* afs_vfsops.c */ 00540 afs_int32 C_afs_mount; /* afs_vfsops.c */ 00541 afs_int32 C_afs_unmount; /* afs_vfsops.c */ 00542 afs_int32 C_afs_root; /* afs_vfsops.c */ 00543 afs_int32 C_afs_statfs; /* afs_vfsops.c */ 00544 afs_int32 C_afs_sync; /* afs_vfsops.c */ 00545 afs_int32 C_afs_vget; /* afs_vfsops.c */ 00546 afs_int32 C_afs_mountroot; /* afs_vfsops.c */ 00547 afs_int32 C_afs_swapvp; /* afs_vfsops.c */ 00548 afs_int32 C_afs_AddMarinerName; /* afs_vnodeops.c */ 00549 afs_int32 C_afs_setpag; /* afs_vnodeops.c */ 00550 afs_int32 C_genpag; /* afs_vnodeops.c */ 00551 afs_int32 C_getpag; /* afs_vnodeops.c */ 00552 afs_int32 C_afs_GetMariner; /* afs_vnodeops.c */ 00553 afs_int32 C_afs_badop; /* afs_vnodeops.c */ 00554 afs_int32 C_afs_index; /* afs_vnodeops.c */ 00555 afs_int32 C_afs_noop; /* afs_vnodeops.c */ 00556 afs_int32 C_afs_open; /* afs_vnodeops.c */ 00557 afs_int32 C_afs_closex; /* afs_vnodeops.c */ 00558 afs_int32 C_afs_close; /* afs_vnodeops.c */ 00559 afs_int32 C_afs_MemWrite; /* afs_vnodeops.c */ 00560 afs_int32 C_afs_write; /* afs_vnodeops.c */ 00561 afs_int32 C_afs_UFSWrite; /* afs_vnodeops.c */ 00562 afs_int32 C_afs_rdwr; /* afs_vnodeops.c */ 00563 afs_int32 C_afs_MemRead; /* afs_vnodeops.c */ 00564 afs_int32 C_afs_read; /* afs_vnodeops.c */ 00565 afs_int32 C_FIXUPSTUPIDINODE; /* afs_vnodeops.c */ 00566 afs_int32 C_afs_UFSRead; /* afs_vnodeops.c */ 00567 afs_int32 C_afs_CopyOutAttrs; /* afs_vnodeops.c */ 00568 afs_int32 C_afs_getattr; /* afs_vnodeops.c */ 00569 afs_int32 C_afs_VAttrToAS; /* afs_vnodeops.c */ 00570 afs_int32 C_afs_setattr; /* afs_vnodeops.c */ 00571 afs_int32 C_EvalMountPoint; /* afs_vnodeops.c */ 00572 afs_int32 C_afs_access; /* afs_vnodeops.c */ 00573 afs_int32 C_ENameOK; /* afs_vnodeops.c */ 00574 afs_int32 C_HandleAtName; /* afs_vnodeops.c */ 00575 afs_int32 C_getsysname; /* afs_vnodeops.c */ 00576 afs_int32 C_strcat; /* afs_vnodeops.c */ 00577 afs_int32 C_afs_lookup; /* afs_vnodeops.c */ 00578 afs_int32 C_afs_create; /* afs_vnodeops.c */ 00579 afs_int32 C_afs_LocalHero; /* afs_vnodeops.c */ 00580 afs_int32 C_FetchWholeEnchilada; /* afs_vnodeops.c */ 00581 afs_int32 C_afs_remove; /* afs_vnodeops.c */ 00582 afs_int32 C_afs_link; /* afs_vnodeops.c */ 00583 afs_int32 C_afs_rename; /* afs_vnodeops.c */ 00584 afs_int32 C_afs_InitReq; /* afs_vnodeops.c */ 00585 afs_int32 C_afs_mkdir; /* afs_vnodeops.c */ 00586 afs_int32 C_BlobScan; /* afs_vnodeops.c */ 00587 afs_int32 C_afs_rmdir; /* afs_vnodeops.c */ 00588 afs_int32 C_RecLen; /* afs_vnodeops.c */ 00589 afs_int32 C_RoundToInt; /* afs_vnodeops.c */ 00590 afs_int32 C_afs_readdir_with_offlist; /* afs_vnodeops.c */ 00591 afs_int32 C_DIRSIZ_LEN; /* afs_vnodeops.c */ 00592 afs_int32 C_afs_readdir_move; /* afs_vnodeops.c */ 00593 afs_int32 C_afs_readdir_iter; /* afs_vnodeops.c */ 00594 afs_int32 C_HandleFlock; /* afs_vnodeops.c */ 00595 afs_int32 C_afs_readdir; /* afs_vnodeops.c */ 00596 afs_int32 C_afs_symlink; /* afs_vnodeops.c */ 00597 afs_int32 C_afs_HandleLink; /* afs_vnodeops.c */ 00598 afs_int32 C_afs_MemHandleLink; /* afs_vnodeops.c */ 00599 afs_int32 C_afs_UFSHandleLink; /* afs_vnodeops.c */ 00600 afs_int32 C_afs_readlink; /* afs_vnodeops.c */ 00601 afs_int32 C_afs_fsync; /* afs_vnodeops.c */ 00602 afs_int32 C_afs_inactive; /* afs_vnodeops.c */ 00603 afs_int32 C_afs_ustrategy; /* afs_vnodeops.c */ 00604 afs_int32 C_afs_bread; /* afs_vnodeops.c */ 00605 afs_int32 C_afs_brelse; /* afs_vnodeops.c */ 00606 afs_int32 C_afs_bmap; /* afs_vnodeops.c */ 00607 afs_int32 C_afs_fid; /* afs_vnodeops.c */ 00608 afs_int32 C_afs_strategy; /* afs_vnodeops.c */ 00609 afs_int32 C_afs_FakeClose; /* afs_vnodeops.c */ 00610 afs_int32 C_afs_FakeOpen; /* afs_vnodeops.c */ 00611 afs_int32 C_afs_StoreOnLastReference; /* afs_vnodeops.c */ 00612 afs_int32 C_afs_GetAccessBits; /* afs_vnodeops.c */ 00613 afs_int32 C_afs_AccessOK; /* afs_vnodeops.c */ 00614 afs_int32 C_shutdown_vnodeops; /* afs_vnodeops.c */ 00615 afs_int32 C_afsio_copy; /* afs_vnodeops.c */ 00616 afs_int32 C_afsio_trim; /* afs_vnodeops.c */ 00617 afs_int32 C_afs_page_read; /* afs_vnodeops.c */ 00618 afs_int32 C_afs_page_write; /* afs_vnodeops.c */ 00619 afs_int32 C_afsio_skip; /* afs_vnodeops.c */ 00620 afs_int32 C_afs_read1dir; /* afs_vnodeops.c */ 00621 afs_int32 C_afs_get_groups_from_pag; /* afs_vnodeops.c */ 00622 afs_int32 C_afs_get_pag_from_groups; /* afs_vnodeops.c */ 00623 afs_int32 C_PagInCred; /* afs_vnodeops.c */ 00624 afs_int32 C_afs_getgroups; /* afs_vnodeops.c */ 00625 afs_int32 C_setpag; /* afs_vnodeops.c */ 00626 afs_int32 C_afs_setgroups; /* afs_vnodeops.c */ 00627 afs_int32 C_afs_page_in; /* afs_vnodeops.c */ 00628 afs_int32 C_afs_page_out; /* afs_vnodeops.c */ 00629 afs_int32 C_AddPag; /* afs_vnodeops.c */ 00630 afs_int32 C_afs_AdvanceFD; /* afs_vnodeops.c */ 00631 afs_int32 C_afs_lockf; /* afs_vnodeops.c */ 00632 afs_int32 C_afs_xsetgroups; /* afs_vnodeops.c */ 00633 afs_int32 C_afs_nlinks; /* afs_vnodeops.c */ 00634 afs_int32 C_DoLockWarning; /* afs_vnodeops.c */ 00635 afs_int32 C_afs_lockctl; /* afs_vnodeops.c */ 00636 afs_int32 C_afs_xflock; /* afs_vnodeops.c */ 00637 afs_int32 C_PSetSPrefs; /* afs_pioctl.c */ 00638 afs_int32 C_PGetSPrefs; /* afs_pioctl.c */ 00639 afs_int32 C_afs_warn; /* afs_resource.c */ 00640 afs_int32 C_afs_warnuser; /* afs_resource.c */ 00641 afs_int32 C_afs_pagein; /* afs_hp_subr.c */ 00642 afs_int32 C_afs_pageout; /* afs_hp_subr.c */ 00643 afs_int32 C_afs_hp_strategy; /* afs_hp_subr.c */ 00644 afs_int32 C_PGetCPrefs; /* afs_pioctl.c */ 00645 afs_int32 C_PSetCPrefs; /* afs_pioctl.c */ 00646 afs_int32 C_SRXAFSCB_WhoAreYou; /* afs_callback.c */ 00647 afs_int32 C_afs_DiscardDCache; /* afs_dcache.c */ 00648 afs_int32 C_afs_FreeDiscardedDCache; /* afs_dcache.c */ 00649 afs_int32 C_afs_MaybeFreeDiscardedDCache; /* afs_dcache.c */ 00650 afs_int32 C_PFlushMount; /* afs_pioctl.c */ 00651 afs_int32 C_SRXAFSCB_GetServerPrefs; /* afs_callback.c */ 00652 afs_int32 C_SRXAFSCB_GetCellServDB; /* afs_callback.c */ 00653 afs_int32 C_SRXAFSCB_GetLocalCell; /* afs_callback.c */ 00654 afs_int32 C_afs_MarshallCacheConfig; /* afs_callback.c */ 00655 afs_int32 C_SRXAFSCB_GetCacheConfig; /* afs_callback.c */ 00656 afs_int32 C_SRXAFSCB_GetCE64; /* afs_callback.c */ 00657 afs_int32 C_SRXAFSCB_GetCellByNum; /* afs_callback.c */ 00658 afs_int32 C_BPrefetchNoCache; /* afs_daemons.c */ 00659 afs_int32 C_afs_ReadNoCache; /* osi_vnodeops.c */ 00660 afs_int32 C_PSetTokens2; /* afs_pioctl.c */ 00661 afs_int32 C_PPrefetchFromTape; /* afs_pioctl.c */ 00662 }; 00663 00664 struct afs_CMMeanStats { 00665 struct afs_MeanStats something; /* fill this in */ 00666 }; 00667 00668 struct afs_CMStats { 00669 struct afs_CMCallStats callInfo; 00670 struct afs_CMMeanStats meanInfo; 00671 }; 00672 00673 /* 00674 * This is the structure accessible by specifying the 00675 * AFSCB_XSTATSCOLL_CALL_INFO collection to the xstat package. 00676 */ 00677 extern struct afs_CMStats afs_cmstats; 00678 00679 /* 00680 * Constants to track downtime durations: 00681 * Bucket 0: dur <= 10 min 00682 * Bucket 1: 10 min < dur <= 30 min 00683 * Bucket 2: 30 min < dur <= 1 hour 00684 * Bucket 3: 1 hour < dur <= 2 hours 00685 * Bucket 4: 2 hours < dur <= 4 hours 00686 * Bucket 5: 4 hours < dur <= 8 hours 00687 * Bucket 6: dur >= 8 hours 00688 */ 00689 #define AFS_STATS_NUM_DOWNTIME_DURATION_BUCKETS 7 00690 00691 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET0 600 /*10 minutes */ 00692 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET1 1800 /*30 minutes */ 00693 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET2 3600 /*60 minutes */ 00694 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET3 7200 /*2 hours */ 00695 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET4 14400 /*4 hours */ 00696 #define AFS_STATS_MAX_DOWNTIME_DURATION_BUCKET5 28800 /*8 hours */ 00697 00698 /* 00699 * Constants to track downtime incidents: 00700 * Bucket 0: down = 0 times 00701 * Bucket 1: down = 1 time 00702 * Bucket 2: 1 time < down <= 5 times 00703 * Bucket 3: 5 times < down <= 10 times 00704 * Bucket 4: 10 times < down <= 50 times 00705 * Bucket 5: down > 50 times 00706 */ 00707 #define AFS_STATS_NUM_DOWNTIME_INCIDENTS_BUCKETS 6 00708 00709 #define AFS_STATS_MAX_DOWNTIME_INCIDENTS_BUCKET0 0 00710 #define AFS_STATS_MAX_DOWNTIME_INCIDENTS_BUCKET1 1 00711 #define AFS_STATS_MAX_DOWNTIME_INCIDENTS_BUCKET2 5 00712 #define AFS_STATS_MAX_DOWNTIME_INCIDENTS_BUCKET3 10 00713 #define AFS_STATS_MAX_DOWNTIME_INCIDENTS_BUCKET4 50 00714 00715 /* 00716 * Numbers used to track aggregate up/downtime stats for servers. We'll 00717 * keep these numbers separately for FS and VL server records, and then 00718 * again separately for servers in the same cell as this client machine 00719 * and those outside the client's cell. 00720 */ 00721 struct afs_stats_SrvUpDownInfo { 00722 afs_int32 numTtlRecords; /*# records, active or inactive */ 00723 afs_int32 numUpRecords; /*# (active) records currently marked up */ 00724 afs_int32 numDownRecords; /*# (active) records currently marked down */ 00725 afs_int32 sumOfRecordAges; /*Sum of server record lifetimes */ 00726 afs_int32 ageOfYoungestRecord; /*Age of youngest server record */ 00727 afs_int32 ageOfOldestRecord; /*Age of oldest server record */ 00728 afs_int32 numDowntimeIncidents; /*Number of (completed) downtime incidents */ 00729 afs_int32 numRecordsNeverDown; /*Number of server records never marked down */ 00730 afs_int32 maxDowntimesInARecord; /*Max downtimes seen by any record */ 00731 afs_int32 sumOfDowntimes; /*Sum of all (completed) downtimes, in seconds */ 00732 afs_int32 shortestDowntime; /*Shortest downtime, in seconds */ 00733 afs_int32 longestDowntime; /*Longest downtime, in seconds */ 00734 /* 00735 * Arrays keeping distributions on downtime durations and number of 00736 * downtime incidents. 00737 */ 00738 afs_int32 downDurations[AFS_STATS_NUM_DOWNTIME_DURATION_BUCKETS]; 00739 afs_int32 downIncidents[AFS_STATS_NUM_DOWNTIME_INCIDENTS_BUCKETS]; 00740 }; 00741 00742 /* 00743 * Define indices for the server up/downtime arrays below. 00744 */ 00745 #define AFS_STATS_UPDOWN_IDX_SAME_CELL 0 00746 #define AFS_STATS_UPDOWN_IDX_DIFF_CELL 1 00747 00748 /* 00749 * Performance numbers for the Cache Manager. 00750 */ 00751 struct afs_stats_CMPerf { 00752 afs_int32 numPerfCalls; /*# of performance calls rcvd */ 00753 00754 afs_int32 epoch; /*Cache Manager epoch time */ 00755 afs_int32 numCellsVisible; /*# cells we know about */ 00756 afs_int32 numCellsContacted; /*# cells corresponded with */ 00757 afs_int32 dlocalAccesses; /*# data accesses to files within cell */ 00758 afs_int32 vlocalAccesses; /*# stat accesses to files within cell */ 00759 afs_int32 dremoteAccesses; /*# data accesses to files outside of cell */ 00760 afs_int32 vremoteAccesses; /*# stat accesses to files outside of cell */ 00761 afs_int32 cacheNumEntries; /*# cache entries */ 00762 afs_int32 cacheBlocksTotal; /*# (1K) blocks configured for cache */ 00763 afs_int32 cacheBlocksInUse; /*# cache blocks actively in use */ 00764 afs_int32 cacheBlocksOrig; /*# cache blocks at bootup */ 00765 afs_int32 cacheMaxDirtyChunks; /*Max # dirty cache chunks tolerated */ 00766 afs_int32 cacheCurrDirtyChunks; /*Current # dirty cache chunks */ 00767 afs_int32 dcacheHits; /*# data files found in local cache */ 00768 afs_int32 vcacheHits; /*# stat entries found in local cache */ 00769 afs_int32 dcacheMisses; /*# data files NOT found in local cache */ 00770 afs_int32 vcacheMisses; /*# stat entries NOT found in local cache */ 00771 afs_int32 cacheFlushes; /*# files flushed from cache */ 00772 afs_int32 cacheFilesReused; /*# cache files reused */ 00773 afs_int32 ProtServerAddr; /*Addr of Protection Server used */ 00774 afs_int32 vcacheXAllocs; /* Additionally allocated vcaches */ 00775 afs_int32 dcacheXAllocs; /* Additionally allocated dcaches */ 00776 00777 /* 00778 * Some stats related to our buffer package 00779 */ 00780 afs_int32 bufAlloced; /* # of buffers allocated by afs */ 00781 afs_int32 bufHits; /* # of pages found on buffer cache */ 00782 afs_int32 bufMisses; /* # of pages NOT found on buffer cache */ 00783 afs_int32 bufFlushDirty; /* # of cached dirty bufs flushed because all busy */ 00784 00785 /* 00786 * Stats that keep track of all allocated/used objects in CM 00787 */ 00788 afs_int32 LargeBlocksActive; /* # of currently used large free pool entries */ 00789 afs_int32 LargeBlocksAlloced; /* # of allocated large free pool entries */ 00790 afs_int32 SmallBlocksActive; /* # of currently used small free pool entries */ 00791 afs_int32 SmallBlocksAlloced; /* # of allocated used small free pool entries */ 00792 afs_int32 MediumBlocksActive; /* # of currently used medium free pool entries */ 00793 afs_int32 MediumBlocksAlloced; /* # of allocated used medium free pool entries */ 00794 afs_int32 OutStandingMemUsage; /* # of alloced memory */ 00795 afs_int32 OutStandingAllocs; /* Outstanding osi_allocs (no osi_frees yet) */ 00796 afs_int32 CallBackAlloced; /* # callback structures allocated */ 00797 afs_int32 CallBackFlushes; /* # callback flush operations performed */ 00798 00799 /* 00800 * Accounting stats having to do with the server table & records. 00801 */ 00802 afs_int32 srvRecords; /*# of servers currently on record */ 00803 afs_int32 srvRecordsHWM; /* Server record high water mark */ 00804 afs_int32 srvNumBuckets; /* Num server hash chain buckets */ 00805 afs_int32 srvMaxChainLength; /* Max server hash chain length */ 00806 afs_int32 srvMaxChainLengthHWM; /* Server hash chain high water mark */ 00807 00808 /* 00809 * Stats having to do with the systype upon which the Cache Manager 00810 * is running. 00811 */ 00812 afs_int32 sysName_ID; /*Sysname ID for host hardware */ 00813 00814 /* 00815 * Stats recording downtime characteristics for each File Server and Volume 00816 * Location Server we've dealt with, both within the same cell and in 00817 * other cells. 00818 */ 00819 struct afs_stats_SrvUpDownInfo fs_UpDown[2]; 00820 struct afs_stats_SrvUpDownInfo vl_UpDown[2]; 00821 00822 afs_uint32 cbloops; 00823 afs_uint32 osiread_efaults; 00824 afs_int32 cacheBlocksDiscarded; /*# cache blocks free but not truncated */ 00825 afs_int32 cacheBucket0_Discarded; 00826 afs_int32 cacheBucket1_Discarded; 00827 afs_int32 cacheBucket2_Discarded; 00828 00829 /* 00830 * Spares for future expansion. 00831 */ 00832 afs_int32 spare[10]; /*Spares */ 00833 }; 00834 00835 00836 /* 00837 * Values denoting the File Server and Cache Manager opcodes. 00838 */ 00839 #define AFS_STATS_FS_RPCIDX_FETCHDATA 0 00840 #define AFS_STATS_FS_RPCIDX_FETCHACL 1 00841 #define AFS_STATS_FS_RPCIDX_FETCHSTATUS 2 00842 #define AFS_STATS_FS_RPCIDX_STOREDATA 3 00843 #define AFS_STATS_FS_RPCIDX_STOREACL 4 00844 #define AFS_STATS_FS_RPCIDX_STORESTATUS 5 00845 #define AFS_STATS_FS_RPCIDX_REMOVEFILE 6 00846 #define AFS_STATS_FS_RPCIDX_CREATEFILE 7 00847 #define AFS_STATS_FS_RPCIDX_RENAME 8 00848 #define AFS_STATS_FS_RPCIDX_SYMLINK 9 00849 #define AFS_STATS_FS_RPCIDX_LINK 10 00850 #define AFS_STATS_FS_RPCIDX_MAKEDIR 11 00851 #define AFS_STATS_FS_RPCIDX_REMOVEDIR 12 00852 #define AFS_STATS_FS_RPCIDX_SETLOCK 13 00853 #define AFS_STATS_FS_RPCIDX_EXTENDLOCK 14 00854 #define AFS_STATS_FS_RPCIDX_RELEASELOCK 15 00855 #define AFS_STATS_FS_RPCIDX_GETSTATISTICS 16 00856 #define AFS_STATS_FS_RPCIDX_GIVEUPCALLBACKS 17 00857 #define AFS_STATS_FS_RPCIDX_GETVOLUMEINFO 18 00858 #define AFS_STATS_FS_RPCIDX_GETVOLUMESTATUS 19 00859 #define AFS_STATS_FS_RPCIDX_SETVOLUMESTATUS 20 00860 #define AFS_STATS_FS_RPCIDX_GETROOTVOLUME 21 00861 #define AFS_STATS_FS_RPCIDX_CHECKTOKEN 22 00862 #define AFS_STATS_FS_RPCIDX_GETTIME 23 00863 #define AFS_STATS_FS_RPCIDX_NGETVOLUMEINFO 24 00864 #define AFS_STATS_FS_RPCIDX_BULKSTATUS 25 00865 #define AFS_STATS_FS_RPCIDX_XSTATSVERSION 26 00866 #define AFS_STATS_FS_RPCIDX_GETXSTATS 27 00867 #define AFS_STATS_FS_RPCIDX_XLOOKUP 28 00868 #define AFS_STATS_FS_RPCIDX_RESIDENCYRPCS 29 00869 00870 #define AFS_STATS_NUM_FS_RPC_OPS 29 00871 00872 #define AFS_STATS_FS_RPCIDXES_ISWRITE(X) (((X > AFS_STATS_FS_RPCIDX_FETCHSTATUS) && (X < AFS_STATS_FS_RPCIDX_GETSTATISTICS)) || (X == AFS_STATS_FS_RPCIDX_SETVOLUMESTATUS)) 00873 #define AFS_STATS_FS_RPCIDXES_WRITE_RETRIABLE(X) ((X >= AFS_STATS_FS_RPCIDX_STOREDATA) && (X <= AFS_STATS_FS_RPCIDX_STORESTATUS)) 00874 00875 #define AFS_STATS_FS_XFERIDX_FETCHDATA 0 00876 #define AFS_STATS_FS_XFERIDX_STOREDATA 1 00877 00878 #define AFS_STATS_NUM_FS_XFER_OPS 2 00879 00880 #define AFS_STATS_CM_RPCIDX_CALLBACK 0 00881 #define AFS_STATS_CM_RPCIDX_INITCALLBACKSTATE 1 00882 #define AFS_STATS_CM_RPCIDX_PROBE 2 00883 #define AFS_STATS_CM_RPCIDX_GETLOCK 3 00884 #define AFS_STATS_CM_RPCIDX_GETCE 4 00885 #define AFS_STATS_CM_RPCIDX_XSTATSVERSION 5 00886 #define AFS_STATS_CM_RPCIDX_GETXSTATS 6 00887 00888 #define AFS_STATS_NUM_CM_RPC_OPS 7 00889 00890 00891 /* 00892 * Record to track timing numbers for each Cache Manager RPC operation. 00893 */ 00894 struct afs_stats_opTimingData { 00895 afs_int32 numOps; /*Number of operations executed */ 00896 afs_int32 numSuccesses; /*Number of successful ops */ 00897 osi_timeval32_t sumTime; /*Sum of sample timings */ 00898 osi_timeval32_t sqrTime; /*Sum of squares of sample timings */ 00899 osi_timeval32_t minTime; /*Minimum timing value observed */ 00900 osi_timeval32_t maxTime; /*Minimum timing value observed */ 00901 }; 00902 00903 /* 00904 * We discriminate byte size transfers into this many buckets. 00905 */ 00906 #define AFS_STATS_NUM_XFER_BUCKETS 9 00907 00908 #define AFS_STATS_MAXBYTES_BUCKET0 128 00909 #define AFS_STATS_MAXBYTES_BUCKET1 1024 00910 #define AFS_STATS_MAXBYTES_BUCKET2 8192 00911 #define AFS_STATS_MAXBYTES_BUCKET3 16384 00912 #define AFS_STATS_MAXBYTES_BUCKET4 32768 00913 #define AFS_STATS_MAXBYTES_BUCKET5 131072 00914 #define AFS_STATS_MAXBYTES_BUCKET6 524288 00915 #define AFS_STATS_MAXBYTES_BUCKET7 1048576 00916 00917 /* 00918 * Record to track timings and byte sizes for data transfers. 00919 */ 00920 struct afs_stats_xferData { 00921 afs_int32 numXfers; /*Number of successful xfers */ 00922 afs_int32 numSuccesses; /*Number of successful xfers */ 00923 osi_timeval32_t sumTime; /*Sum of timing values */ 00924 osi_timeval32_t sqrTime; /*Sum of squares of timing values */ 00925 osi_timeval32_t minTime; /*Minimum xfer time recorded */ 00926 osi_timeval32_t maxTime; /*Maximum xfer time recorded */ 00927 afs_int32 sumBytes; /*Sum of KBytes transferred */ 00928 afs_int32 minBytes; /*Minimum value observed */ 00929 afs_int32 maxBytes; /*Maximum value observed */ 00930 afs_int32 count[AFS_STATS_NUM_XFER_BUCKETS]; /*Tally for each range of bytes */ 00931 }; 00932 00933 /* 00934 * Macros to operate on time values. 00935 * 00936 * afs_stats_TimeLessThan(t1, t2) Non-zero if t1 is less than t2 00937 * afs_stats_TimeGreaterThan(t1, t2) Non-zero if t1 is greater than t2 00938 * afs_stats_GetDiff(t3, t1, t2) Set t3 to the difference between 00939 * t1 and t2 (t1 is less than or 00940 * equal to t2). 00941 * afs_stats_AddTo(t1, t2) Add t2 to t1 00942 * afs_stats_TimeAssign(t1, t2) Assign time t2 to t1 00943 * afs_stats_SquareAddTo(t1,t2) Add square of t2 to t1 00944 */ 00945 #define afs_stats_TimeLessThan(t1, t2) \ 00946 ((t1.tv_sec < t2.tv_sec) ? 1 : \ 00947 (t1.tv_sec > t2.tv_sec) ? 0 : \ 00948 (t1.tv_usec < t2.tv_usec) ? 1 : \ 00949 0) 00950 00951 #define afs_stats_TimeGreaterThan(t1, t2) \ 00952 ((t1.tv_sec > t2.tv_sec) ? 1 : \ 00953 (t1.tv_sec < t2.tv_sec) ? 0 : \ 00954 (t1.tv_usec > t2.tv_usec) ? 1 : \ 00955 0) 00956 00957 #define afs_stats_GetDiff(t3, t1, t2) \ 00958 { \ 00959 /* \ 00960 * If the microseconds of the later time are smaller than \ 00961 * the earlier time, set up for proper subtraction (doing \ 00962 * the carry). \ 00963 */ \ 00964 if (t2.tv_usec < t1.tv_usec) { \ 00965 t2.tv_usec += 1000000; \ 00966 t2.tv_sec -= 1; \ 00967 } \ 00968 t3.tv_sec = t2.tv_sec - t1.tv_sec; \ 00969 t3.tv_usec = t2.tv_usec - t1.tv_usec; \ 00970 } 00971 00972 #define afs_stats_AddTo(t1, t2) \ 00973 { \ 00974 t1.tv_sec += t2.tv_sec; \ 00975 t1.tv_usec += t2.tv_usec; \ 00976 if (t1.tv_usec > 1000000) { \ 00977 t1.tv_usec -= 1000000; \ 00978 t1.tv_sec++; \ 00979 } \ 00980 } 00981 00982 #define afs_stats_TimeAssign(t1, t2) \ 00983 { \ 00984 t1.tv_sec = t2.tv_sec; \ 00985 t1.tv_usec = t2.tv_usec; \ 00986 } 00987 /* 00988 * We calculate the square of a timeval as follows: 00989 * 00990 * The timeval struct contains two ints - the number of seconds and the 00991 * number of microseconds. These two numbers together gives the correct 00992 * amount of time => t = t.tv_sec + (t.tv_usec / 1000000); 00993 * 00994 * if x = t.tv_sec and y = (t.tv_usec / 1000000) then the square is simply: 00995 * 00996 * x^2 + 2xy + y^2 00997 * 00998 * Since we are trying to avoid floating point math, we use the following 00999 * observations to simplify the above equation: 01000 * 01001 * The resulting t.tv_sec (x') only depends upon the x^2 + 2xy portion 01002 * of the equation. This is easy to see if you think about y^2 in 01003 * decimal notation. y^2 is always < 0 since y < 0. Therefore in calculating 01004 * x', we can ignore y^2 (we do need to take care of rounding which is 01005 * done below). 01006 * 01007 * Similarly, in calculating t.tv_usec (y') we can ignore x^2 and concentrate 01008 * on 2xy + y^2. 01009 * 01010 * You'll notice that both x' and y' depend upon 2xy. We can further 01011 * simplify things by realizing that x' depends on upon the integer 01012 * portion of the 2xy term. We can get part of this integer by 01013 * multiplying 2 * x * t.tv_usec and then truncating the result by 01014 * / 1000000. Similarly, we can get the decimal portion of this term 01015 * by performing the same multiplication and then % 1000000. It is 01016 * possible that the decimal portion will in fact contain some of the 01017 * integer portion (this will be taken care of when we ensure that y' 01018 * is less than 1000000). 01019 * 01020 * The only other non-obvious calculation involves y^2. The key to 01021 * understanding this part of the calculation is to expand y again 01022 * in a nonobvious manner. We do this via the following expansion: 01023 * 01024 * y = t.tv_usec / 1000000; 01025 * let abcdef represent the six digits of t.tv_usec then we have: 01026 * t.tv_usec / 1000000 = abc/1000 + def/1000000; 01027 * 01028 * squaring yields: 01029 * 01030 * y^2 = (abc/1000)^2 + 2 * (abc/1000) * (def/1000000) + (def/1000000)^2 01031 * 01032 * Examining this equation yields the following observations: 01033 * 01034 * The second term can be calculated by multiplying abc and def then 01035 * shifting the decimal correctly. 01036 * 01037 * (def/1000000)^2 contributes only to rounding and we only round up 01038 * if def > 707. 01039 * 01040 * These two observations are the basis for the somewhat cryptic 01041 * calculation of usec^2 (i.e. they are the "tricks"). 01042 */ 01043 01044 #define afs_stats_SquareAddTo(t1, t2) \ 01045 { \ 01046 /* \ 01047 * We use some tricks here to avoid floating point arithmetic \ 01048 */ \ 01049 if(t2.tv_sec > 0 ) \ 01050 { \ 01051 t1.tv_sec += t2.tv_sec * t2.tv_sec \ 01052 + 2 * t2.tv_sec * t2.tv_usec /1000000; \ 01053 t1.tv_usec += (2 * t2.tv_sec * t2.tv_usec) % 1000000 \ 01054 + (t2.tv_usec / 1000)*(t2.tv_usec / 1000) \ 01055 + 2 * (t2.tv_usec / 1000) * (t2.tv_usec % 1000) / 1000 \ 01056 + (((t2.tv_usec % 1000) > 707) ? 1 : 0); \ 01057 } \ 01058 else \ 01059 { \ 01060 t1.tv_usec += (t2.tv_usec / 1000)*(t2.tv_usec / 1000) \ 01061 + 2 * (t2.tv_usec / 1000) * (t2.tv_usec % 1000) / 1000 \ 01062 + (((t2.tv_usec % 1000) > 707) ? 1 : 0); \ 01063 } \ 01064 if (t1.tv_usec > 1000000) { \ 01065 t1.tv_usec -= 1000000; \ 01066 t1.tv_sec++; \ 01067 } \ 01068 } 01069 01070 01071 01072 01073 /* 01074 * Structure recording RPC outcomes. 01075 */ 01076 struct afs_stats_RPCErrors { 01077 afs_int32 err_Server; /*Server down error */ 01078 afs_int32 err_Network; /*Network error */ 01079 afs_int32 err_Protection; /*Protection violation */ 01080 afs_int32 err_Volume; /*Volume-related error */ 01081 afs_int32 err_VolumeBusies; /*"Volume busy conditions encountered */ 01082 afs_int32 err_Other; /*Misc other errors */ 01083 }; 01084 01085 01086 /* 01087 * Structure holding RPC interface opcode measurements for the Cache Manager. 01088 */ 01089 struct afs_stats_RPCOpInfo { 01090 struct afs_stats_opTimingData 01091 fsRPCTimes[AFS_STATS_NUM_FS_RPC_OPS]; /*Individual FS RPC op timings */ 01092 struct afs_stats_RPCErrors 01093 fsRPCErrors[AFS_STATS_NUM_FS_RPC_OPS]; /*Individual FS RPC op errors */ 01094 struct afs_stats_xferData 01095 fsXferTimes[AFS_STATS_NUM_FS_XFER_OPS]; /*Individual FS RPC xfer timings */ 01096 struct afs_stats_opTimingData 01097 cmRPCTimes[AFS_STATS_NUM_CM_RPC_OPS]; /*Individual CM RPC op timings */ 01098 }; 01099 01100 /* 01101 * Structure holding authentication info for the CM. 01102 */ 01103 struct afs_stats_AuthentInfo { 01104 /* 01105 * This first set of fields don't have any history - they are simply 01106 * snapshots of the system at the time of the probe. 01107 */ 01108 afs_int32 curr_PAGs; /*Current number of PAGs */ 01109 afs_int32 curr_Records; /*Current # of records in table */ 01110 afs_int32 curr_AuthRecords; /*Current # of authenticated 01111 * records (w/valid ticket) */ 01112 afs_int32 curr_UnauthRecords; /*Current # of unauthenticated 01113 * records (w/o any ticket at all) */ 01114 afs_int32 curr_MaxRecordsInPAG; /*Max records for a single PAG */ 01115 afs_int32 curr_LongestChain; /*Length of longest current hash chain */ 01116 01117 /* 01118 * This second set of fields are values accumulated over the lifetme 01119 * of the current CM incarnation. 01120 */ 01121 afs_int32 PAGCreations; /*# PAG creations */ 01122 afs_int32 TicketUpdates; /*# ticket additions/refreshes */ 01123 afs_int32 HWM_PAGs; /*High water mark - # PAGs */ 01124 afs_int32 HWM_Records; /* " - # records */ 01125 afs_int32 HWM_MaxRecordsInPAG; /* " - max records for a single PAG */ 01126 afs_int32 HWM_LongestChain; /* " - longest hash chain */ 01127 }; 01128 01129 /* 01130 * [Un]replicated file access. These count the number of RXAFS_FetchData 01131 * calls get accomplished, and their need to call upon other replicas in 01132 * case of failure. 01133 */ 01134 struct afs_stats_AccessInfo { 01135 afs_int32 unreplicatedRefs; /*# references to unreplicated data */ 01136 afs_int32 replicatedRefs; /*# references to replicated data */ 01137 afs_int32 numReplicasAccessed; /*# replicas accessed */ 01138 afs_int32 maxReplicasPerRef; /*Max # replicas accessed per ref */ 01139 afs_int32 refFirstReplicaOK; /*# references satisfied by 1st replica */ 01140 }; 01141 01142 /* 01143 * Structure holding authoring info for the CM. We keep track of 01144 * the results of writes on files and directories independently. 01145 * Results cover all objects in the cache uniformly. 01146 */ 01147 struct afs_stats_AuthorInfo { 01148 afs_int32 fileSameAuthor; /*File write by same author */ 01149 afs_int32 fileDiffAuthor; /*File write by diff author */ 01150 afs_int32 dirSameAuthor; /*Directory write by same author */ 01151 afs_int32 dirDiffAuthor; /*Directory write by diff author */ 01152 }; 01153 01154 /* 01155 * Structure holding ``full'' CM peformance measurements. 01156 */ 01157 struct afs_stats_CMFullPerf { 01158 afs_int32 numFullPerfCalls; /*Number of accesses */ 01159 struct afs_stats_CMPerf perf; /*General performance stats */ 01160 struct afs_stats_RPCOpInfo rpc; /*RPC op stats */ 01161 struct afs_stats_AuthentInfo authent; /*Authentication stats */ 01162 struct afs_stats_AccessInfo accessinf; /*Access stats */ 01163 struct afs_stats_AuthorInfo author; /*Authorship stats */ 01164 }; 01165 01166 /* 01167 * These are the storage declarations for the structures accessible 01168 * via the xstat package. 01169 */ 01170 /* extern struct afs_stats_CMPerf afs_stats_cmperf; */ 01171 /* extern struct afs_stats_CMFullPerf afs_stats_cmfullperf; */ 01172 /* extern afs_int32 afs_stats_XferSumBytes[]; */ 01173 01174 #ifndef AFS_NOSTATS 01175 /* 01176 * We define routines to keep running counts and means. For the 01177 * running count, we have to concatenate the ``C_'' prefix on to 01178 * the routine name passed in as an argument to get the right 01179 * field name. 01180 */ 01181 #define AFS_STATCNT(arg) ((afs_cmstats.callInfo.C_ ## arg)++) 01182 01183 #define AFS_MEANCNT(arg, value) \ 01184 (afs_AddToMean(((afs_cmstats.meanInfo).(arg)),value)) 01185 01186 #endif /* AFS_NOSTATS */ 01187 01188 01189 #endif /* __OPENAFS_AFS_STATS_H__ */