Joe wrote:
Quote:
I have some question to ask. When I try to use
dbenv->memp_stat_print(0) to catch the usage of cache, the information
of databases associated with the environment is repetitively outputted
many times. Can anybody tell me the reason or how to avoid outputting
them? |
I am unable to reproduce this problem. A simple test:
int
main(int argc, char *argv[])
{
DB_ENV *dbenv;
DB *dbp;
(void)system("rm -rf TESTDIR; mkdir TESTDIR");
assert(db_env_create(&dbenv, 0) == 0);
dbenv->set_errfile(dbenv, stderr);
assert(dbenv->open(
dbenv, "TESTDIR", DB_CREATE | DB_INIT_MPOOL, 0666) == 0);
assert(db_create(&dbp, dbenv, 0) == 0);
assert(dbp->set_pagesize(dbp, 512) == 0);
assert(dbp->open(dbp, NULL,
"data1", NULL, DB_BTREE, DB_CREATE, 0666) == 0);
assert(db_create(&dbp, dbenv, 0) == 0);
assert(dbp->set_pagesize(dbp, 512) == 0);
assert(dbp->open(dbp, NULL,
"data2", NULL, DB_BTREE, DB_CREATE, 0666) == 0);
assert(db_create(&dbp, dbenv, 0) == 0);
assert(dbp->set_pagesize(dbp, 512) == 0);
assert(dbp->open(dbp, NULL,
"data3", NULL, DB_BTREE, DB_CREATE, 0666) == 0);
assert(dbenv->memp_stat_print(dbenv, 0) == 0);
return (0);
}
works correctly for me, displaying only the 3 open databases and then
exiting.
Can you email me any kind of reproducible test case so I could see this
problem happen?
Regards,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
Oracle Corporation
keith.bostic (AT) oracle (DOT) com
keithbosticim (Yahoo IM)