Showing posts with label Views. Show all posts
Showing posts with label Views. Show all posts

Thursday, December 9, 2010

Delete ClearCase Views Script

I mentioned a script a little bit verbose, but which won't remove any local storage and won't either clean the CCRC session.dat:

nuke_view.pl: you can use it to remove all views from a workstation (which may not be available anymore)

cleartool lsview -host myHostname -quick | xargs ccperl nuke_view.pl

The -quick option is very important to quickly get the list of views for a given workstation.

## This script should be used to cleanup a view when 'ct rmview' will not## work (such as when the viewstore directory has been deleted.#### Note: The view storage directory will have to manually deleted if it still exists.use strict;#sub NukeView();#sub DoIt();foreach(@ARGV) { NukeView($_);}##############################################################sub NukeView { my $view2del = $_[0]; print "Processing $view2del...\n"; my @lines = `cleartool lsview -l $view2del`; my $tag; my $uuid; foreach(@lines) { chomp; $tag = $1 if /^Tag: (\S+)/; $uuid = $1 if /^View uuid: (\S+)/; s/^/\t/; print "$_\n"; } if ( $tag eq '' or $uuid eq '' ) { print "Error! $view2del: unable to get tag and/or uuid\n"; return 0; } my $err_count = 0; print "\tremoving tag...\n"; my $cmd = "cleartool rmtag -view $tag"; $err_count += 1 if DoIt($cmd); print "\tunregistering view storage...\n"; $cmd = "cleartool unreg -view -uuid $uuid"; $err_count += 1 if DoIt($cmd); print "\tremoving view references...\n"; $cmd = "cleartool rmview -force -avobs -uuid $uuid"; $err_count += 1 if DoIt($cmd); if ( $err_count == 0 ) { print "Success! removed view $view2del\n"; } else { print "Error! errors occured while removing $view2del\n"; }}#############################################sub DoIt { my $ret = system($_[0]) / 256; print "Error! cmd failed: $_[0]\n" if $ret != 0; return $ret;}

The extra steps needed for removing CCWeb Views are described in this IBM technote:

Note: For ClearCase 7.1.1.1 or 7.1.1.2 the session.dat file is no longer generated from ClearCase 7.1.1.1 as a result of APAR PM03334: session.dat no longer need to be cleaned.

By default, view.stg (CCRC / CCWeb view storage), view.dat and VOB's cached files are stored in the following location:

Windows®: C:\Program Files\Rational\ClearCase\var\ccweb\\UNIX® / Linux®: /var/adm/rational/clearcase/ccweb//

Remove the folder located in the location above. This will remove view's storage files, view.dat and VOB's cached files and will let the user create a new view using the same / original view's name.

Note: It may also be necessary to manually remove the view workspace if the view is still present on the CCRC client. This can done by navigating to the defined workspace on the client system (by default C:\Documents and Settings\\view_tag) and removing the view workspace.
This path to the workspace is listed in the session .dat file. The entry looks like this: -workroot "c:/web_dev2". This may become useful in a case where the user did not use the default location.

CCRC view roots are also cached in a file on the client in the User Profile.
Check the following file and remove the already removed view from that list as well.

C:\Documents and Settings\\.ccase_wvreg

View the original article here

Tuesday, December 7, 2010

Re: Removing Contrib files in Views.



Posts: 60
Registered: Jul 06, 2007 02:02:51 AM Removing Contrib files in Views.
Posted: Nov 10, 2010 01:12:59 AM Hello Friends,

I want *.contrib files in my views. Our CC admin everytime warning us to remove view private files. If anybody have the single and simple command, please do let me know.

Also my dynamic views are occupying a lot of space in fileservers. I want to free some of the space. What can I do?

Thanks!!!

BR,
NeThA.


Posts: 60
Registered: Jul 06, 2007 02:02:51 AM Re: Removing Contrib files in Views.
Posted: Nov 10, 2010 01:20:56 AM   in response to: Mr.India in response to: Mr.India's post Errata: I want to remove *.contrib files in my views.
Posts: 38
Registered: Aug 16, 2010 10:26:56 AM Re: Removing Contrib files in Views.
Posted: Nov 15, 2010 01:48:40 PM   in response to: Mr.India in response to: Mr.India's post Hello Mr.India,

A view private file is not a clearcase entity. So you can delete the files the way you would delete any file that is outside of a ClearCase environment. In unix/linux, you would use rm, in Windows, either use Windows explorer or, at the command line, the 'delete' command.

If your '.contrib' files are actually under source control, this means they are not view privates, and would need to be removed with something like 'rmelem'.

As far as dynamic views occupying a lot of space, don't be fooled by doing any unix or Windows tools to get their total space -- most of the items that show up in a view aren't actually really there, they exist within the VOB and are only presented to you as existing within your view, but aren't really there. If you want to know how much space your view is taking up, make use of the 'cleartool space' command, for example:

H:\>cleartool space -view a812953_A2234_2_int
Use(Mb) %Use Directory
0.4 0% View private storage e:\ClearCase_Storage\views\AETH\a812953\a81
2953_A2234_2_int.vws\.s
0.1 0% View administration data e:\ClearCase_Storage\views\AETH\a812953
\a812953_A2234_2_int.vws\admin
0.2 0% View database e:\ClearCase_Storage\views\AETH\a812953\a812953_A2
234_2_int.vws\db
---- 0.6 0% Subtotal
17285.8 63% Filesystem AVSP059:e:\ (capacity 27627.4 Mb)

Total usage 2010-10-23T05:06:43-04:00 for view "a812953_A2234_2_int" is 0.6 Mb

However, if I navigate to this view and do a recursive directory listing to show its size, it shows up as containing over 197mb of data. This is what the operating system sees, but does -not- reflect actual space being taken up..it will include all files in the view that are not checked out, non-view private files, etc. If you deleted the above view, it would not free up 197Mb, but only .6Mb. If you have a lot of .contrib files, this number may be far higher.

Note that if this information isn't available to you, the nightly job that is supposed to calculate space might not be running correctly. See the man pages for cleartool space for more information about this.

Does this help at all?

-Chris Moir
Inventa Technologies (at Aetna Insurance)


Posts: 60
Registered: Jul 06, 2007 02:02:51 AM Re: Removing Contrib files in Views.
Posted: Nov 30, 2010 06:56:18 AM   in response to: ChrisMoir in response to: ChrisMoir's post Hello Chris,

Thanks for your detailed information about space occupied by views and view private files.

Thanks,
Mr.India.


Posts: 426
Registered: Mar 15, 2005 04:40:07 AM Re: Removing Contrib files in Views.
Posted: Nov 30, 2010 10:48:01 AM   in response to: ChrisMoir in response to: ChrisMoir's post ChrisMoir wrote:
> If your '.contrib' files are actually under source control,
> this means they are not view privates, and would need to be
> removed with something like 'rmelem'.

But this shouldn't be the case.
.contrib files are left as view private by ct merge and ct findmerge.
They are copies of versions, and there is thus no reason to check them in!
I must admit that I have never seen as them as anything else than a nuisance.

Marc

Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess 
Point your RSS reader here for a feed of the latest messages in all forums

View the original article here

Monday, November 15, 2010

Re: Removing Contrib files in Views.

This question is not answered.
Permlink Replies: 1 - Pages: 1 - Last Post: Nov 10, 2010 1:20 AM Last Post By: Mr.India Threads: [ Previous | Next ]
Posts: 57
Registered: Jul 06, 2007 02:02:51 AM Removing Contrib files in Views.
Posted: Nov 10, 2010 01:12:59 AM Hello Friends,

I want *.contrib files in my views. Our CC admin everytime warning us to remove view private files. If anybody have the single and simple command, please do let me know.

Also my dynamic views are occupying a lot of space in fileservers. I want to free some of the space. What can I do?

Thanks!!!

BR,
NeThA.


Posts: 57
Registered: Jul 06, 2007 02:02:51 AM Re: Removing Contrib files in Views.
Posted: Nov 10, 2010 01:20:56 AM   in response to: Mr.India in response to: Mr.India's post Errata: I want to remove *.contrib files in my views.Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess 
Point your RSS reader here for a feed of the latest messages in all forums

View the original article here

Sunday, November 14, 2010

Removing Contrib files in Views.

This question is not answered.
Permlink Replies: 1 - Pages: 1 - Last Post: Nov 10, 2010 1:20 AM Last Post By: Mr.India Threads: [ Previous | Next ]
Posts: 57
Registered: Jul 06, 2007 02:02:51 AM Removing Contrib files in Views.
Posted: Nov 10, 2010 01:12:59 AM Hello Friends,

I want *.contrib files in my views. Our CC admin everytime warning us to remove view private files. If anybody have the single and simple command, please do let me know.

Also my dynamic views are occupying a lot of space in fileservers. I want to free some of the space. What can I do?

Thanks!!!

BR,
NeThA.


Posts: 57
Registered: Jul 06, 2007 02:02:51 AM Re: Removing Contrib files in Views.
Posted: Nov 10, 2010 01:20:56 AM   in response to: Mr.India in response to: Mr.India's post Errata: I want to remove *.contrib files in my views.Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess 
Point your RSS reader here for a feed of the latest messages in all forums

View the original article here