[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: mdb_stat question



Roman Rybalko wrote:
17.10.2012 04:19, Howard Chu ÐÐÑÐÑ:
Have a look at mdb_stat in git mdb.master commit
617769bce5bcac809791adb11301e40d27c31566

Use options -e and -f, that should give you everything you want.
Feedback appreciated, I doubt this is its final form yet.

Thanks!
Nice tool!

But how would I determine storage usage percent?
((Number of pages used)-(Free pages))/(Max pages)*100

Yes.

or just
(Number of pages used)/(Max pages)*100
?

No.

I mean is there possible a situation when (Number of pages used)==(Max
pages) and (Free pages)!=0 ?

Yes.


root@log:~# mdb_stat -e /mnt/data/ldap/2
Environment Info
   Map address: (nil)
   Map size: 15032385536
   Page size: 4096
   Max pages: 3670016
   Number of pages used: 1042935
   Last transaction ID: 2802459
   Max readers: 126
   Number of readers used: 18
Status of Main DB
   Tree depth: 1
   Branch pages: 0
   Leaf pages: 1
   Overflow pages: 0
   Entries: 12
root@log:~# mdb_stat -f /mnt/data/ldap/2
Freelist Status
   Tree depth: 3
   Branch pages: 7
   Leaf pages: 673
   Overflow pages: 1
   Entries: 2745
   Free pages: 140824
Status of Main DB
   Tree depth: 1
   Branch pages: 0
   Leaf pages: 1
   Overflow pages: 0
   Entries: 12
root@log:~#



--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/