ClearCase

From DigitalOps.Org Wiki

Jump to: navigation, search

Contents

Links

Sites

Technotes

ClearCase Tips & Tricks

Admin console for a remote ClearCase host (Windows)

To run the ClearCase admin console for a remote host use this command:

> cchostadmin.msc /host:hostname

Typically you would create a shortcut on the Windows desktop to do this.

Allow a Windows domain user to edit or update the ClearCase schedule

Make sure you have added the user to the ClearCase server's scheduler ACL:

cleartool schedule -edit -acl

Include something like this:

User:DOMAIN\USERNAME Full

Where DOMAIN is the Windows domain name and USERNAME is the Windows username. This should work on a UNIX or Windows ClearCase server.

How to force scrubbing of cleartext storage pools?

You can temporarily free some storage by running the scrubber in -e (everything goes mode). Invoke like this example, must be run as the VOB owner:

$ /opt/rational/clearcase/etc/scrubber -e -k cltxt /path/to/vob/storage/vobdir.vbs

Which views are using the most space?

On *NIX use a combination of the space and the sort command like this to see the top consumers:

$ cleartool space -view -host <hostname> | grep "Total usage" | sort -k8,8 -n | tail

Convert a ClearCase path to a regular path

This bit of Perl code will convert a ClearCase extended pathname into a "regular" pathname. Not a lot of use as the extended pathname is the real path in a ClearCase context, but useful when generating reports and such for non-techie types.

sub xpn {
        my $path = shift @_;
        my $sfx = $ENV{CLEARCASE_XN_SFX} || '@@';
        while (  $path =~ s/($sfx)*[\/\\]main([\/\\]\w+)*?[\/\\](\d+|LATEST|CHECKEDOUT\.\d+)([\/\\]|$)/$4/ ) {}
        return $path;
}

For example this will turn /dir1@@/main/branch1/branch2/7/file@@/main/branch1/8 into the more readable (though less useful!) /dir1/file.

JVM terminated. Exit code=160 when starting ClearCase Remote Client

This appears to be something to do with xulrunner. Add the following lines to the global ccrc.ini to avoid (typically found in /opt/ibm/RationalSDLC/clearcase/RemoteClient)

-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=/dev/null

Works with 7.1.x.x, not tried with other versions.

Sending a specific oplog range to a remote replica

When you only require an update packet within a narrow oplog range you can use the new -oprange option added in 7.1.1.

$ multitool syncreplica -export -out bangkok.packet -oprange melbourne=228050:228197 bangkok@/vobs/projectx
Generating synchronization packet /backup/bangkok.packet

Change columns for CLI diff

Use the -options parameter to cleartool diff, for example:

$ diff -options "-columns $COLUMNS" -pred file.c

Generate export packets for all VOBs on a Windows host

Use a for loop like this (assuming the destination replicas are called destrep):

> for /f "tokens=1 delims=\" %v in ('cleartool lsvob -s') do multitool syncreplica -export -compress -out destrep_%v destrep@\%v