# DbEnv.memp_stat |

`

###

    import com.sleepycat.db.*;

    public DbMpoolStat memp_stat()
    	throws DbException;

    public DbMpoolFStat[] memp_fstat()
    	throws DbException;

# Description

The DbEnv.memp_stat and DbEnv.memp_fstat method 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 DbEnv.memp_stat method creates a DbMpoolStat object containing global statistics. The following data fields are available:

public long st_gbytes;
  Gigabytes of cache (total cache size is st_gbytes + st_bytes).
public long st_bytes;
  Bytes of cache (total cache size is st_gbytes + st_bytes).
public int st_ncache;
  Number of caches.
public int st_regsize;
  Individual cache size.
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 about 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 DbEnv.memp_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 DbEnv.memp_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 DbEnv.memp_stat method throws an exception that encapsulates a non-zero error value on failure.

# Errors

The DbEnv.memp_stat method may fail and throw an exception encapsulating a non-zero error for the following conditions:

EINVAL
  An invalid flag value or parameter was specified.

The DbEnv.memp_stat method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods. If a catastrophic error has occurred, the DbEnv.memp_stat method may fail and throw a DbRunRecoveryException, in which case all subsequent Berkeley DB calls will fail in the same way.

# Class

DbEnv

# See Also

DbEnv.memp_fstat, DbEnv.memp_stat, and DbEnv.memp_trickle.`

Copyright Sleepycat Software