X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2FClearcase%2FServer.pm;h=c47e32148f47fb44b0265dac2c4b470a25a19608;hb=3cbf08c8117a1747f73cfbb12c3de6a7062c88c4;hp=436df28537cb158fd62889949dac303f9232fb68;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/lib/Clearcase/Server.pm b/lib/Clearcase/Server.pm index 436df28..c47e321 100644 --- a/lib/Clearcase/Server.pm +++ b/lib/Clearcase/Server.pm @@ -29,6 +29,7 @@ $Date: 2011/01/02 04:59:36 $ =head2 SYNOPSIS Provides access to information about a Clearcase Server. + =head2 DESCRIPTION This module implements an object oriented interface to a Clearcase @@ -92,6 +93,8 @@ sub new ($;$) { my $self = bless { name => $name }, $class; + $self->updateServerInfo($name); + return $self; } # new @@ -143,11 +146,11 @@ sub mvfsBlocksPerDirectory () { return $self->{mvfsBlocksPerDirectory}; } # mvfsBlocksPerDirectory -sub mvfsCleartextMnodes () { +sub mvfsFreeMnodesCleartext() { my ($self) = @_; - return $self->{mvfsCleartextMnodes}; -} # mvfsCleartextMnodes + return $self->{mvfsFreeMnodesCleartext}; +} # mvfsFreeMnodesCleartext sub mvfsDirectoryNames () { my ($self) = @_; @@ -245,13 +248,73 @@ sub processHashTableSize () { return $self->{processHashTableSize}; } # processHashTableSize +sub updateServerInfo($) { + my ($self, $host) = @_; + + my ($status, @output) = $Clearcase::CC->execute( + "hostinfo -long -properties -full $host" + ); + + for (@output) { + if (/Product: ClearCase (.*)/) { + $self->{ccVer} = $1; + } elsif (/Operating system: (.*)/) { + $self->{osVer} = $1; + } elsif (/Hardware type: (.*)/) { + $self->{hardware} = $1; + } elsif (/License host: (.*)/) { + $self->{licenseHost} = $1; + } elsif (/Registry host: (.*)/) { + $self->{registryHost} = $1; + } elsif (/Registry region: (.*)/) { + $self->{registryRegion} = $1; + } elsif (/Blocks per directory: (.*)/) { + $self->{mvfsBlocksPerDirectory} = $1; + } elsif (/Free mnodes for cleartext: (.*)/) { + $self->{mvfsFreeMnodesCleartext} = $1; + } elsif (/Directory names: (.*)/) { + $self->{mvfsDirectoryNames} = $1; + } elsif (/File names: (.*)/) { + $self->{mvfsFileNames} = $1; + } elsif (/Free mnodes: (.*)/) { + $self->{mvfsFreeMnodes} = $1; + } elsif (/Initial mnode table size: (.*)/) { + $self->{mvfsInitialMnodeTableSize} = $1; + } elsif (/Minimum free mnodes for cleartext: (.*)/) { + $self->{mvfsMinCleartextMnodes} = $1; + } elsif (/Mimimum free mnodes: (.*)/) { + $self->{mvfsMinFreeMnodes} = $1; + } elsif (/Names not found: (.*)/) { + $self->{mvfsNamesNotFound} = $1; + } elsif (/RPC handles: (.*)/) { + $self->{mvfsRPCHandles} = $1; + } elsif (/Scaling factor to initialize MVFS cache sizes: (.*)/) { + $self->{scalingFactor} = $1; + } elsif (/Cleartext idle lifetime: (.*)/) { + $self->{cleartextIdleLifetime} = $1; + } elsif (/VOB hash table size: (.*)/) { + $self->{vobHashTableSize} = $1; + } elsif (/Cleartext hash table size: (.*)/) { + $self->{cleartextHashTableSize} = $1; + } elsif (/Thread hash table size: (.*)/) { + $self->{threadHashTableSize} = $1; + } elsif (/DNC hash table size: (.*)/) { + $self->{dncHashTableSize} = $1; + } elsif (/Process hash table size: (.*)/) { + $self->{processHashTableSize} = $1; + } # if + } # for + + return; +} # updateServerInfo + 1; =pod =head2 DEPENDENCIES -=for html
+=for html =head2 INCOMPATABILITIES