1

I'm looking to get a count of the number of artifacts in my repository. Is there a way to get an artifact count in Rational clearcase via cleartool?

Sneftel
  • 40,271
  • 12
  • 71
  • 104
user1366208
  • 23
  • 1
  • 4

3 Answers3

1

It depends what you consider an artifact. If you want to count the number of file elements without counting the versioned directories, the following cleartool find command will report that (assuming that you are on Unix and have the "wc" command for counting). Go to the root directory of the VOB and run:

cleartool find . -all -type f -print | wc -l

If you want all versioned elements including versioned directories, leave out the "-type f":

cleartool find . -all -print | wc -l

In any case you will also get the elements counted that are not visible in the current view, and the results will not include the view-private files and directories.

stm
  • 662
  • 1
  • 6
  • 23
1

Well, there's a faster way. Use the countdb tool in <ClearCase install dir>/etc/utils.

CD to the VOB's db directory and run:

<path to etc/utils dir>/countdb vob_db 

Look for the line starting "ELEMENT," that's the number of "artifacts" since for ClearCase, directories are also versionned objects.

You may need to lock the VOB before doing this, or run the check against a recent backup.

You can get a number of useful metrics out of this:

  • How deep are your version trees? (VERSION line / ELEMENT line)
  • How many labels are on the average version (VERSION_LABEL_LINK / VERSION)
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Brian Cowan
  • 1,048
  • 6
  • 7
0

Considering the artifacts are versioned, that depends on the version of the repository you are considering.

A simple dynamic view, you can easily select a version (in your config spec) and do a find

find . -type f | wc -l
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250