Berkeley DB: DbLog.stat
Полезная информация

DbLog.stat


import com.sleepycat.db.*;

public DbLogStat stat() throws DbException;

Description

The DbLog.stat function creates a statistical structure and returns it to the caller. The log region statistics are stored in a DbLogStat object. The following DbLogStat data fields will be filled in:

public int st_magic;
The magic number that identifies a file as a log file.
public int st_version;
The version of the log file type.
public int st_refcnt;
The number of references to the region.
public int st_regsize;
The size of the region.
public int st_mode;
The mode of any created log files.
public int st_lg_max;
The maximum size of any individual file comprising the log.
public int st_w_mbytes;
The number of megabytes written to this log.
public int st_w_bytes;
The number of bytes over and above st_w_mbytes written to this log.
public int st_wc_mbytes;
The number of megabytes written to this log since the last checkpoint.
public int st_wc_bytes;
The number of bytes over and above st_wc_mbytes written to this log since the last checkpoint.
public int st_wcount;
The number of times the log has been written to disk.
public int st_scount;
The number of times the log has been flushed to disk.
public int st_cur_file;
The current log file number.
public int st_cur_offset;
The byte offset in the current log file.
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 DbLog.stat method throws an exception that encapsulates an errno on failure.

Errors

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

The DbLog.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), and memset(3).

Class

DbLog

See Also

DbLog.archive, DbLog.close, DbLog.compare, DbLog.file, DbLog.flush, DbLog.get, DbLog.open, DbLog.put, DbLog.db_register, DbLog.stat, DbLog.unlink and DbLog.db_unregister.