Berkeley DB: DbMpool.stat
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
DbMpool.stat
import com.sleepycat.db.*;
public DbMpoolStat stat()
throws DbException;
public DbMpoolFStat fstat()
throws DbException;
Description
The DbMpool.stat and DbMpool.fstat methods create statistical
structures and return to the caller. The statistics include the number
of files participating in the pool, the active pages in the pool, and
information as to how effective the cache has been.
The DbMpool.stat method creates a DbMpoolStat object containing global
statistics. The following data fields are available:
- public int st_refcnt;
- The number of references to the region.
- public int st_regsize;
- The size of the region.
- public long st_cachesize;
- Cache size in bytes.
- public int st_cache_hit;
- Requested pages found in the cache.
- 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 no
available information as to whether or not this request caused disk I/O,
although examining the application page fault rate may be helpful).
- public int st_page_create;
- Pages created in the cache.
- public int st_page_in;
- Pages read into the cache.
- public int st_page_out;
- Pages written from the cache to the backing file.
- public int st_ro_evict;
- Clean pages forced from the cache.
- public int st_rw_evict;
- Dirty pages forced from the cache.
- public int st_hash_buckets;
- Number of hash buckets in buffer hash table.
- public int st_hash_searches;
- Total number of buffer hash table lookups.
- public int st_hash_longest;
- The longest chain ever encountered in buffer hash table lookups.
- public int st_hash_examined;
- Total number of hash elements traversed during hash table lookups.
- public int st_page_clean;
- Clean pages currently in the cache.
- public int st_page_dirty;
- Dirty pages currently in the cache.
- public int st_page_trickle;
- Dirty pages written using the DbMpool.trickle interface.
- public int st_region_wait;
- The number of times that a thread of control was forced to wait before
obtaining the region lock.
- public int st_region_nowait;
- The number of times that a thread of control was able to obtain
the region lock without waiting.
The DbMpool.fstat method creates an array of DbMpoolFStat objects
containing statistics for individual files in the pool. Each
DbMpoolFStat object contains statistics for an individual DbMpoolFile.
The following data fields are available for each DbMpoolFStat object:
- public String file_name;
- The name of the file.
- public long st_pagesize;
- Page size in bytes.
- public int st_cache_hit;
- Requested pages found in the cache.
- public int st_cache_miss;
- Requested pages not found in the cache.
- public int st_map;
- Requested pages mapped into the process' address space.
- public int st_page_create;
- Pages created in the cache.
- public int st_page_in;
- Pages read into the cache.
- public int st_page_out;
- Pages written from the cache to the backing file.
The DbMpool.stat
method throws an exception that encapsulates an errno on failure.
Errors
If 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 exception
for 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 exception
encapsulating errno
for the following conditions:
- EINVAL
- An invalid flag value or parameter was specified.
Class
DbMpool
See Also
DbMpool.fstat,
DbMpool.stat
and
DbMpool.trickle.
|