git: sbin/hammer: Add functions for zone statistics

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Jul 24 14:52:30 PDT 2015


commit 020339d5a1bcb0721d0f4bffd6bd4042617f7af4
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Wed Jul 22 04:15:06 2015 +0900

    sbin/hammer: Add functions for zone statistics
    
    - Add functions to init/cleanup/add/print zone statistics and
      make hammer checkmap's existing zone statistics use these.
    
    - hammer_print_zone_stat() shows something like this. Zones with
      0 blocks doesn't necessary mean it has 0 block in that zone.
      For example checkmap doesn't support zone4 (at this point) so
      the block count is 0, but each volume obviously does have at
      least 1 big-block that belongs to zone4.
    
      ==========
      HAMMER zone statistics
    	zone #  blocks       used[B]             used[%]
    	zone 0  0            0                   0
    	zone 1  0            0                   0
    	zone 2  0            0                   0
    	zone 3  63           528482304           100
    	zone 4  0            0                   0
    	zone 5  0            0                   0
    	zone 6  0            0                   0
    	zone 7  0            0                   0
    	zone 8  5            38313984            91.3477
    	zone 9  2            15776736            94.0367
    	zone 10 326          2731311104          99.8766
    	zone 11 23           166333072           86.2106
    	zone 12 0            0                   0
    	zone 13 0            0                   0
    	zone 14 0            0                   0
    	zone 15 0            0                   0
    	--------------------------------------------------
    	total   419          3480217200          99.0153
      ==========

Summary of changes:
 sbin/hammer/cmd_blockmap.c | 21 ++++++--------
 sbin/hammer/hammer_util.h  | 10 +++++++
 sbin/hammer/misc.c         | 68 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 86 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/020339d5a1bcb0721d0f4bffd6bd4042617f7af4


-- 
DragonFly BSD source repository



More information about the Commits mailing list