IBM Support

About the ClearCase database utility countdb

Question & Answer


Question

What is the IBM® Rational® ClearCase® countdb utility used for and where can it be found on Microsoft® Windows®, Linux® and UNIX®?

Answer




Introduction to countdb

The countdb utility is a read only tool that reports the count of the various objects and records in the VOB database.

The countdb utility is useful for analyzing VOB databases to determine how space is being used within it. The countdb utility is sometimes used in conjunction with the string_report utility.

The output will show how full a database is and what needs to be scrubbed if it is reaching the disk maximum capacity, or the maximum number of database records (schema 53 VOBs only).

Depending on what is filling up the database, there are various actions that can be taken to make space.

Examples:

  • High number of OPLOG_ENTRY or EVENT records:
    ** Run the vob_scrubber with appropriate vob_scrubber_params file settings.
  • High number of DERIVED_OBJECT/CONFIG_REC_DERIVED_OBJECT/STRING objects:
    ** Remove derived objects and run scrubber -e
  • High number of VERSION_LABEL_LINK records:
    ** Remove instances of this item. (rmlabel unneeded element versions or rmtype -rmall label types)
  • High number of NAMESPACE_DIR_VERSION records:
    ** Remove instances of this item. (remove directory versions)


Location of countdb

The countdb utility comes installed with ClearCase and was introduced in release 4.1 patch 7. The countdb utility is stored in the etc-utils directory.

UNIX and Linux:

2003.06 and later:

/opt/rational/clearcase/etc/utils

2002.05.00 and earlier

/var/adm/atria/etc/utils

Windows

C:\Program Files\Rational\ClearCase\etc\utils



Instructions

1. Change to the db directory of the VOB to be checked.
2. Run the command countdb vob_db

Example:

C:\ClearCase_Storage\VOBs\clearimport.vbs\db>C:\atria\etc\utils\countdb vob_db
********************************
Data file name : vob_db.d01
********************************
.25%50%75%100%
Record size : 74
Page size : 4096
File size in bytes : 626688
File size in pages : 153
File size in records : 8360
Total records in use : 8084
Maximum records possible : 72057594037927935

********************************
Data file name : vob_db.d02
********************************
.25%50%75%100%
Record size : 132
Page size : 4096
File size in bytes : 598016
File size in pages : 146
File size in records : 4495
Total records in use : 4443
Maximum records possible : 69805794224242626

********************************
Data file name : vob_db.d03
********************************
.25%50%100%
Record size : 54
Page size : 4096
File size in bytes : 8192
File size in pages : 2
File size in records : 75
Total records in use : 1
Maximum records possible : 72057594037927935

********************************
Record Distribution
********************************
TID_THE_USUAL : 1
TID_DO_LINK_COUNTS : 1
MASTER : 1
SYSTEM : 1
STRING_FREE : 6
STRING : 889
OBJECT : 2129
WELL_KNOWN_OBJECT_ENTRY : 35
ELEMENT : 439
BRANCH : 498
VERSION : 1095
CONTAINER : 492
EVENT : 3323
DOT_DOT : 1408
NAMESPACE_DIR_VERSION : 252
NAMESPACE_DIR_VERSION_ENTRY : 1408
TYPE : 48
SUPERTYPE_LINK : 12
ATTRIBUTE_TYPE : 7
ATTRIBUTE_TYPE_ENUM : 5
ATTRIBUTE_TYPE_INTERVAL : 1
ATTRIBUTE : 16
VERSION_LABEL_LINK : 397
HLINK_TYPE : 9
HARROW : 43
POOL : 3
TRIGGER_TYPE : 1
OBJECT_TRIGGER_TYPE_LINK : 1
REPLICA_TYPE : 1
REPLICA : 2
EPOCH_TABLE_ENTRY : 3
OPLOG_ENTRY : 1



About countdb output

The countdb output reports the following for each data file in a VOB:

********************************
Data file name : vob_db.d01
********************************
Record size : 52
Page size : 4096
File size in bytes : 129245184
File size in pages : 31554
File size in records : 2461134
Total records in use : 2164730
Maximum records possible : 16777215
% of maximum records used : 12.90%

where

Record size:the record size (in bytes) for this data file
Page size:the page size (in bytes) for this data file
File size in bytes:the file size (in bytes)
File size in pages:the file size (in pages)
File size in records:the file size (in records)
Total records in use:the number of records in use

Note:
Total records in use does not include deleted records, or those unused records on the last data page.

Maximum records possible : the maximum number of records that this data file can have.
% of maximum records used: the ratio of records in use to maximum records possible as a percentage.

The countdb utility then reports the number of each type of record it encounters in the data files (Record Distribution section). Review the glossary below for a break down of the record distribution types.

How much space does each record type take up in the database?

For those interested in reducing VOB database size by a specific amount, it can be a frustrating effort removing unnecessary objects or events and then not gaining the space back that was anticipated. To more accurately forecast gained space, it is useful to know how much space each record type is allocated (version, label type, label instance, etc...).

For instance, applying this information one would know at the outset that it would require the removal of roughly 5200 unshared derived objects to yield a 10MB reduction in database size.

RECORD TYPE AND SPACE:

  • All values are in bytes.
  • All (except the oplog) assume no replication.
  • For all numbers the size can increase depending on comments used.
  • For derived objects, the size is greatly determined by the size of the config record.


Note:
These numbers are an average value. Rational cannot say for certain what these values will be because the database key files which store this information frequently change.


Element with one version

schema 53: 2770
schema 54: 3970

Each additional version of an element (assuming the branch already exists)

schema 53: 446
schema 54: 642

Unshared derived object

schema 53: 1356
schema 54: 1924

Shared derived object

schema 53: 80 + config rec size
schema 54: 118 + config rec size

Label type

schema 53: 490
schema 54: 708

Label on a version

schema 53: 228
schema 54: 320

Branch type

schema 53: 438
schema 54: 634

Branch (includes creation of zero element on branch)

schema 53: 1566
schema 54: 2246

Oplog

schema 53: 88
schema 54: 126

Attribute type (integer)

schema 53: 826
schema 54: 1200

Attribute instance (integer)

schema 53: 356
schema 54: 504

Merge hlink

schema 53: 732
schema 54: 1044



Glossary

tid_the_usual
One of these per database - keeps track of transactions.

tid_do_link_counts
One of these per database - keeps track of transactions.

master
One of these per database - keeps track of global identifier information.

string_free
Keeps track of gaps internal to the strings file.

Note: These can be consolidated into one string_free record by running reformatvob.

string
Comments, usernames, hostnames, etc.

Note: Part of this record may be stored in the strings file.

object
Versions, elements, branches, attributes, etc...

Note: If it has a dbid, then it's an object.

well_known_object_entry
A subset of important object records for quick lookup (i.e., the object for the VOB itself).

object_lock
One created for every lock operation (e.g. branch, VOB, etc...).

element
Every element in the VOB has one of these.

branch
Every instance of a branch has one of these.

version
Every version has one of these.

check_out
One is created for every checkout.

container
One per source container (so, one per element for text_file_delta or one per version for binary information).

event
Created every time something is written to the VOB (e.g. checkout, checkin, mkelem, mkbranch, etc...).

dot_dot
The parent directory for each listing in a VOB

Note: There can be a lot of these which would indicate too many directory versions. This increases in conjunction with namespace_dir_version_entry

namespace_dir_version
Version of directories

namespace_dir_version_entry
One created for every version of a directory. Stores the listing of the directory contents.

Note: This can fill up quickly if lots of directory versions are created.

namespace_soft_link
Links.

type
Various types (labels, branches, etc...).

supertype_link
Various type information.

attribute_type
Attribute types.

attribute_type_enum
Listing of values for attribute types.

attribute_type_interval
Listing of values for attribute types.


type_attribute_type_link
Created when an attribute is associated with a version.

attribute
Instances of attributes.

derived_object
Derived Objects - shared/unshared/versioned

derived_object_tag
One per DO.

derived_object_link_count
How many references a DO has from all views.

derived_object_link_count_view
How many references a DO has from a specific view.

config_rec
One per configuration record.

config_rec_derived_object
The DO associated with a configuration record.

version_label_link
Created each time a label is attached to a version.

Note: If this fills up, remove labels.

hlink_type
Hyperlink types.

harrow
Hyperlink existence in this VOB.

oarrow
Hyperlink existence in another VOB that points into this VOB.

view
View records that reference info in this VOB.

view_db
View database pointers.

pool
Source, cleartext, and derived object.

trigger_type
Triggers.

object_trigger_type_link
Triggers.

replica_type
Don't worry about this one.

replica
List of all replicas in the family.

epoch_table_entry
MultiSite sync information.

export_table_entry
MultiSite sync information.

oplog_entry
The actual stuff that MultiSite sends across the wire.

activity_type
UCM.

activity
UCM.

activity_aux
UCM.

activity_user
UCM.

domain
UCM.

user
UCM.

user_cred
UCM.

work_table_entry
UCM.

state
UCM.

role
UCM.

role_map
UCM.

procdef
UCM.

procdef_subr_lib
UCM.

proc_rule
UCM.

proc_wac_sel
UCM.

proc_action
UCM.

proc_var
UCM.

checkpoint
UCM.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Utilities and Tools","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2002.05.00;2003.06.00;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Utilities and Tools","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21126456