,I(Berkeley DB: DbMpool.stat[P

DbMpool.stat





import com.sleepycat.db.*;

public DbMpoolStat stat() throws DbException;

public DbMpoolFStat fstat() throws DbException;





Description



lThe DbMpool.stat and DbMpool.fstat methods create statisticalGstructures and return to the caller. The statistics include the numberEof files participating in the pool, the active pages in the pool, and3information as to how effective the cache has been.

FThe DbMpool.stat method creates a DbMpoolStat object containing global5statistics. The following data fields are available:

D
public int st_refcnt;
The number of references to the region.5
public int st_regsize;
The size of the region.5
public long st_cachesize;
Cache size in bytes.C
public int st_cache_hit;
Requested pages found in the cache.H
public int st_cache_miss;
Requested pages not found in the cache.]
public int st_map;
Requested pages mapped into the process' address space (there is noHavailable information as to whether or not this request caused disk I/O,Calthough examining the application page fault rate may be helpful).=
public int st_page_create;
Pages created in the cache.8
public int st_page_in;
Pages read into the cache.P
public int st_page_out;
Pages written from the cache to the backing file.A
public int st_ro_evict;
Clean pages forced from the cache.A
public int st_rw_evict;
Dirty pages forced from the cache.O
public int st_hash_buckets;
Number of hash buckets in buffer hash table.N
public int st_hash_searches;
Total number of buffer hash table lookups.c
public int st_hash_longest;
The longest chain ever encountered in buffer hash table lookups.f
public int st_hash_examined;
Total number of hash elements traversed during hash table lookups.D
public int st_page_clean;
Clean pages currently in the cache.D
public int st_page_dirty;
Dirty pages currently in the cache.
public int st_page_trickle;
Dirty pages written using the DbMpool.trickle interface.h
public int st_region_wait;
The number of times that a thread of control was forced to wait beforeobtaining the region lock.c
public int st_region_nowait;
The number of times that a thread of control was able to obtain the region lock without waiting.
pThe DbMpool.fstat method creates an array of DbMpoolFStat objects=containing statistics for individual files in the pool. EachFDbMpoolFStat object contains statistics for an individual DbMpoolFile.EThe following data fields are available for each DbMpoolFStat object:
5
public String file_name;
The name of the file.3
public long st_pagesize;
Page size in bytes.C
public int st_cache_hit;
Requested pages found in the cache.H
public int st_cache_miss;
Requested pages not found in the cache.Q
public int st_map;
Requested pages mapped into the process' address space.=
public int st_page_create;
Pages created in the cache.8
public int st_page_in;
Pages read into the cache.P
public int st_page_out;
Pages written from the cache to the backing file.


The DbMpool.statHmethod throws an exception that encapsulates an errno on failure.



Errors

TIf a fatal error occurs in Berkeley DB, the DbMpool.stat method may fail and throw a}DbRunRecoveryException, at which point all subsequent database%calls will also fail in the same way.

The DbMpool.stat&method may fail and throw an exceptionKfor any of the errors specified for the following Berkeley DB and C library functions: abort(3), fcntl(3), fprintf(3), getpid(3), malloc(3), memcpy(3), memset(3),and strlen(3).In addition, the DbMpool.stat&method may fail and throw an exceptionencapsulating errnofor the following conditions:

B

EINVAL
An invalid flag value or parameter was specified.







Class

7DbMpool



See Also

=DbMpool.fstat, DbMpool.statandBDbMpool.trickle.