Merge branch 'master' of https://github.com/adefaria/clearscm
authorAndrew DeFaria <Andrew@DeFaria.com>
Fri, 1 Mar 2019 00:12:03 +0000 (17:12 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Fri, 1 Mar 2019 00:12:03 +0000 (17:12 -0700)
42 files changed:
clearadm/clearadmscrub.pl
clearadm/clearagent.pl
clearadm/clearexec.pl
clearadm/cleartasks.pl
clearadm/discovery.pl
clearadm/index.cgi
clearadm/lib/Clearadm.pm
clearadm/lib/ClearadmWeb.pm
clearadm/lib/Clearexec.pm
clearadm/lib/clearadm.sql
clearadm/plot.cgi
clearadm/plotfs.cgi
clearadm/plotloadavg.cgi
clearadm/plotstorage.cgi
clearadm/processrunning.pl
clearadm/readme.cgi
clearadm/setup.pl
clearadm/systems.cgi
clearadm/test.pl
clearadm/updateccfs.pl
clearadm/updatefs.pl
clearadm/updatela.pl
clearadm/updatesystem.pl
clearadm/viewager.cgi [changed mode: 0755->0644]
clearadm/viewdetails.cgi
clearadm/viewservers.cgi
clearadm/vobdetails.cgi
clearadm/vobservers.cgi
lib/Clearcase/View.pm
lib/Clearcase/Vob.pm
lib/DateUtils.pm
web/Resumes/Andrew/Resume.doc [deleted symlink]
web/Resumes/Andrew/Resume.docx [deleted symlink]
web/Resumes/Andrew/ResumeLong.doc [deleted file]
web/Resumes/Andrew/ResumeLong.docx [deleted file]
web/Resumes/Andrew/ResumeLong.odt [new file with mode: 0644]
web/Resumes/Andrew/ResumeLong.php [deleted file]
web/Resumes/Andrew/ResumeShort.doc [deleted file]
web/Resumes/Andrew/ResumeShort.docx [deleted file]
web/Resumes/Andrew/ResumeShort.odt [new file with mode: 0644]
web/Resumes/Andrew/ResumeShort.php [deleted file]
web/Resumes/Andrew/index.php [changed from symlink to file mode: 0644]

index f8b558e..1b8a6a4 100755 (executable)
@@ -66,43 +66,47 @@ my $clearadm  = Clearadm->new;
 
 my ($host, $fs);
 
+my %opts = (
+  scrubdays => $Clearadm::CLEAROPTS{CLEARADM_SCRUBDAYS}
+);
+
 # Main
-GetOptions (
-  'usage'   => sub { Usage },
-  'verbose' => sub { set_verbose },
-  'debug'   => sub { set_debug },
+GetOptions(
+  \%opts,
+  'usage'    => sub { Usage },
+  'verbose'  => sub { set_verbose },
+  'debug'    => sub { set_debug },
+  "scrubdays=i",
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 # Announce ourselves
 verbose "$FindBin::Script V$VERSION";
 
 my ($err, $msg);
 
-for my $system ($clearadm->FindSystem ($host)) {
-  ($err, $msg) = $clearadm->TrimLoadavg ($$system{name});
+for my $system ($clearadm->FindSystem($host)) {
+  ($err, $msg) = $clearadm->TrimLoadavg($system->{name});
   
   if ($msg eq 'Records deleted' or $msg eq '') {
-    verbose "Scrub loadavg $$system{name}: $err $msg:";
+    verbose "Scrub loadavg $system->{name}: $err $msg:";
   } else {
     error "#$err: $msg";
   } # if
   
-  for my $filesystem ($clearadm->FindFilesystem ($$system{name}, $fs)) {
-    ($err, $msg) = $clearadm->TrimFS ($$system{name}, $$filesystem{filesystem});
+  for my $filesystem ($clearadm->FindFilesystem($system->{name}, $fs)) {
+    ($err, $msg) = $clearadm->TrimFS($system->{name}, $filesystem->{filesystem});
     
     if ($msg eq 'Records deleted' or $msg eq '') {
-      verbose "Scrub filesystem $$system{name}:$$filesystem{filesystem}: $err $msg";
+      verbose "Scrub filesystem $system->{name}:$filesystem->{filesystem}: $err $msg";
     } else {
       error "#$err: $msg";
     } # if
   } # for
 } # for
 
-# TODO: These should be configurable
-my $sixMonthsAgo = SubtractDays (Today2SQLDatetime, 180);
+my $scrubdate = SubtractDays(Today2SQLDatetime, $opts{scrubdays});
 
 my %runlog = (
   task    => 'Scrub',
@@ -110,9 +114,44 @@ my %runlog = (
   system  => hostname(),
 );
 
+# Scrub view and vob storage records
+for ($clearadm->FindVob) {
+  ($err, $msg) = $clearadm->TrimStorage('vob', $_->{tag}, $_->{region});
+
+  if ($msg eq 'Records deleted' or $msg eq '') {
+    verbose "Scub VOB $_->{tag} $err $msg";
+  } else {
+    error "#$err: $msg";
+  } # if
+} # for
+
+for ($clearadm->FindView) {
+  ($err, $msg) = $clearadm->TrimStorage('view', $_->{tag}, $_->{region});
+
+  if ($msg eq 'Records deleted' or $msg eq '') {
+    verbose "Scub View $_->{tag} $err $msg";
+  } else {
+    error "#$err: $msg";
+  } # if
+} # for
+
+# Make sure the Clearcase objects we have in Clearadm are still valid
+my ($views, $vobs) = $clearadm->ValidateCCObjects;
+
+if ($vobs !~ /^\d+/) {
+  error "Unable to validate Clearcase objects: $vobs", $views;
+} else {
+  $runlog{status} = 0;
+
+  $runlog{message}  = "Deleted $views views\n" if $views;
+  $runlog{message} .= "Deleted $vobs vobs"     if $vobs;
+
+  $clearadm->AddRunlog(%runlog);
+} # if
+
 # Scrub old alertlogs
 ($runlog{status}, $runlog{message}) = 
-  $clearadm->DeleteAlertlog ("timestamp<='$sixMonthsAgo'");
+  $clearadm->DeleteAlertlog ("timestamp<='$scrubdate'");
 
 verbose "$runlog{task} alertlog: $runlog{status} $runlog{message}";
 
@@ -122,11 +161,11 @@ $runlog{started} = Today2SQLDatetime;
 
 # Scrub old runlogs
 ($runlog{status}, $runlog{message}) = 
-  $clearadm->DeleteRunlog ("started<='$sixMonthsAgo'");
+  $clearadm->DeleteRunlog ("started<='$scrubdate'");
   
 verbose "$runlog{task} runlog: $runlog{status} $runlog{message}";
 
-$clearadm->AddRunlog (%runlog);
+$clearadm->AddRunlog(%runlog);
 
 =pod
 
index fae4519..95b0571 100755 (executable)
@@ -80,7 +80,7 @@ my $clearexec;
 my $multithreaded = $Clearexec::CLEAROPTS{CLEAREXEC_MULTITHREADED};
 my $daemon        = 1;
 
-GetOptions (
+GetOptions(
   'usage'           => sub { Usage },
   'verbose'         => sub { set_verbose },
   'debug'           => sub { set_debug },
@@ -94,14 +94,13 @@ Usage 'Extraneous options: ' . join ' ', @ARGV
 
 $clearexec = Clearexec->new;
 
-$clearexec->setMultithreaded ($multithreaded);
+$clearexec->setMultithreaded($multithreaded);
 
 my $logfile  = "$Clearexec::CLEAROPTS{CLEAREXEC_LOGDIR}/$FindBin::Script";
    $logfile =~ s/\.pl$//;
    $logfile .= '.' . hostname() . '.log';
 
-EnterDaemonMode $logfile, $logfile, $pidfile
-  if $daemon;
+EnterDaemonMode $logfile, $logfile, $pidfile if $daemon;
   
 display "$FindBin::Script V$VERSION started at " . localtime;
 
index cd593e5..057caab 100755 (executable)
@@ -55,7 +55,7 @@ use warnings;
 
 use Getopt::Long;
 use FindBin;
-use Term::ANSIColor qw (color);
+use Term::ANSIColor qw(color);
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
 
@@ -77,18 +77,18 @@ my $port = $Clearexec::CLEAROPTS{CLEAREXEC_PORT};
 
 my $clearexec;
 
-sub CmdLoop () {
+sub CmdLoop() {
   my ($line, $result);
 
-  my $prompt = color ('BOLD YELLOW') . "$me->$host:" . color ('RESET');
+  my $prompt = color('BOLD YELLOW') . "$me->$host:" . color('RESET');
   
-  $CmdLine::cmdline->set_prompt ($prompt);
+  $CmdLine::cmdline->set_prompt($prompt);
     
-  while (($line, $result) = $CmdLine::cmdline->get ()) {
+  while (($line, $result) = $CmdLine::cmdline->get()) {
     last unless defined $line;
     last if $line =~ /exit|quit/i;
     
-    my ($status, @output) = $clearexec->execute ($line);
+    my ($status, @output) = $clearexec->execute($line);
     
     last if $line =~ /stopserver/i;
     
@@ -105,7 +105,7 @@ sub CmdLoop () {
 } # CmdLoop
 
 # Main
-GetOptions (
+GetOptions(
   'usage'   => sub { Usage },
   'verbose' => sub { set_verbose },
   'debug'   => sub { set_debug },
@@ -117,20 +117,19 @@ my $cmd = join ' ', @ARGV;
 
 verbose "$FindBin::Script V$VERSION";
 
-$clearexec =Clearexec->new;
+$clearexec = Clearexec->new;
 
 my ($status, @output);
 
-$status = $clearexec->connectToServer ($host, $port);
+$status = $clearexec->connectToServer($host, $port);
 
-error "Unable to connect to $host:$port", 1
-  unless $status;
+error "Unable to connect to $host:$port", 1 unless $status;
 
 if ($cmd ne '') {
-  ($status, @output) = $clearexec->execute ($cmd);
+  ($status, @output) = $clearexec->execute($cmd);
 
   if ($status) {
-    error "Unable to execute $cmd (Status: $status)\n" . join ("\n", @output), 1;
+    error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), 1;
   } else {
     display join "\n", @output;
     display "Status: $status";
index 25a297b..7e36b82 100755 (executable)
@@ -95,7 +95,7 @@ sub ToggleVerbose() {
 
 $SIG{USR1} = \&ToggleVerbose;
 
-sub HandleSystemNotCheckingIn (%) {
+sub HandleSystemNotCheckingIn(%) {
   my (%system) = @_;
    
   my $startTime = time;
@@ -110,7 +110,7 @@ sub HandleSystemNotCheckingIn (%) {
     system   => $system{name},
   );
 
-  my ($err, $msg, $lastid) = $clearadm->AddRunlog (%runlog);
+  my ($err, $msg, $lastid) = $clearadm->AddRunlog(%runlog);
   
   $clearadm->Error ("Unable to add to runlog (Status: $err)\n$msg") if $err;
    
@@ -123,8 +123,8 @@ sub HandleSystemNotCheckingIn (%) {
      $systemLink     .= "/systemdetails.cgi?system=$system{name}";
   my $runlogLink      = $Clearadm::CLEAROPTS{CLEARADM_WEBBASE};
      $runlogLink     .= "/runlog.cgi?id=$lastid";
-   my $subject         = "System is not responding (Is clearagent running?)";
-     $message = <<"END";      
+  my $subject         = "System is not responding (Is clearagent running?)";
+     $message         = <<"END";      
 <center>
 <h1><font color="red">Alert</font> System not responding!</h1>
 </center>
@@ -134,7 +134,7 @@ href="$runlogLink">not responding</a> to clearagent requests. This can happen if
 clearagent is not setup and running on the system.</p> 
 END
      
-  $clearadm->Notify (
+  $clearadm->Notify(
     $notification{name},
     $subject,
     $message,
@@ -149,7 +149,7 @@ END
   return;
 } # HandleSystemNotCheckingIn
 
-sub SystemsCheckin () {
+sub SystemsCheckin() {
   for ($clearadm->FindSystem) {
     my %system = %$_;
     
@@ -159,10 +159,7 @@ sub SystemsCheckin () {
     
     my $startTime = time;
     
-    my $status = $clearexec->connectToServer (
-      $system{name},
-      $system{port}
-    );
+    my $status = $clearexec->connectToServer($system{name}, $system{port});
     
     unless ($status) {
       HandleSystemNotCheckingIn %system;
@@ -175,10 +172,7 @@ sub SystemsCheckin () {
           . "$system{name}:$system{port}";
     
     display __FILE__ . " DEBUG: System undefined 1" unless $system{name};
-    $clearadm->UpdateSystem (
-      $system{name},
-      (lastheardfrom => Today2SQLDatetime)
-    );
+    $clearadm->UpdateSystem($system{name}, (lastheardfrom => Today2SQLDatetime));
   
     $clearadm->ClearNotifications ($system{name})
       if $system{notification} and $system{notification} eq 'Heartbeat';
@@ -187,7 +181,7 @@ sub SystemsCheckin () {
   return;
 } # SystemsCheckin
 
-sub UpdateRunlog ($$$$) {
+sub UpdateRunlog($$$$) {
   my ($status, $startTime, $task, $output) = @_;
   
   my %runlog = (
@@ -215,28 +209,28 @@ sub UpdateRunlog ($$$$) {
     } # if
   } # if
     
-  my ($err, $msg, $lastid) = $clearadm->AddRunlog (%runlog);
+  my ($err, $msg, $lastid) = $clearadm->AddRunlog(%runlog);
     
-  $clearadm->Error ($msg, $err) if $err;
+  $clearadm->Error($msg, $err) if $err;
 
   return $lastid;
 } # UpdateRunlog
 
-sub MakeSystemLink ($) {
+sub MakeSystemLink($) {
   my ($system) = @_;
   
   return "$Clearadm::CLEAROPTS{CLEARADM_WEBBASE}/systemdetails.cgi?system="
        . $system;
 } # MakeSystemLink
 
-sub MakeLoadavgLink ($) {
+sub MakeLoadavgLink($) {
   my ($system) = @_;
 
   return "$Clearadm::CLEAROPTS{CLEARADM_WEBBASE}/plot.cgi?type=loadavg&system="
        . "$system&scaling=Hour&points=24";
 } # MakeLoadavgLink
 
-sub ProcessLoadavgErrors ($$$$@) {
+sub ProcessLoadavgErrors($$$$@) {
   # TODO: Also need to handle the case where the error was something other
   # than "Load average over threshold". Perhaps by having different return
   # status. Also, runlog entry #22169 never reported!
@@ -290,12 +284,12 @@ END
 END
       $message .= join "\n", @output;
       $message .= "</pre>";
-      $clearadm->Error ($message, -1);
+      $clearadm->Error($message, -1);
       
       last;
     } # if
 
-    $clearadm->Notify (
+    $clearadm->Notify(
       $notification,
       $subject,
       $message,
@@ -309,7 +303,7 @@ END
   return;
 } # ProcessLoadAvgErrors
 
-sub ProcessFilesystemErrors ($$$$@) {
+sub ProcessFilesystemErrors($$$$@) {
   # TODO: Also need to handle the case where the error was something other
   # than "Filesystem over threshold". Perhaps by having different return
   # status.
@@ -347,7 +341,7 @@ sub ProcessFilesystemErrors ($$$$@) {
        push @fsinfo, @{$system{$systemName}};
     } # if
 
-    my $systemLink = MakeSystemLink ($systemName);
+    my $systemLink = MakeSystemLink($systemName);
     my $subject    = 'Filesystem has exceeded threshold';
     my $message = <<"END";      
 <center>
@@ -372,7 +366,7 @@ END
       
     $message .= "</ul>";
     
-    $clearadm->Notify (
+    $clearadm->Notify(
       $notification,
       $subject,
       $message,
@@ -386,7 +380,7 @@ END
   return;
 } # ProcessFilesystemErrors
 
-sub NonZeroReturn ($$$$$$) {
+sub NonZeroReturn($$$$$$) {
   my ($system, $notification, $status, $lastid, $output, $task) = @_;
 
   my @output = @{$output};
@@ -424,7 +418,7 @@ END
 
   $message .= "</pre></blockquote>";
   
-  $clearadm->Notify (
+  $clearadm->Notify(
     $notification,
     $subject,
     $message,
@@ -437,7 +431,7 @@ END
   return;   
 } # NonZeroReturn
 
-sub ExecuteTask ($%) {
+sub ExecuteTask($%) {
   my ($sleep, %task) = @_;
   
   my ($status, @output, %system, $subject, $message);
@@ -466,7 +460,7 @@ sub ExecuteTask ($%) {
                  . "execute $task{command}";
       $status = -1;
     } else {
-      ($status, @output) = $clearexec->execute ($task{command});
+      ($status, @output) = $clearexec->execute($task{command});
       
       $output[0] = "Unable to exec $task{command} on $system{name}"
         if $status == -1;
@@ -480,7 +474,7 @@ sub ExecuteTask ($%) {
   if ($status != 0) {
     if ($notification{cond}
       and $notification{cond} =~ /non zero return/i) {
-      NonZeroReturn (
+      NonZeroReturn(
         $system{name},
         $notification{name},
         $status,
@@ -489,20 +483,20 @@ sub ExecuteTask ($%) {
         \%task
       );
     } elsif ($notification{cond} =~ /loadavg over threshold/i) {
-      ProcessLoadavgErrors ($notification{name}, $task{name}, $system{name}, $lastid, @output);
+      ProcessLoadavgErrors($notification{name}, $task{name}, $system{name}, $lastid, @output);
     } elsif ($notification{cond} =~ /filesystem over threshold/i) {
-      ProcessFilesystemErrors ($notification{name}, $task{name}, $system{name}, $lastid, @output);
+      ProcessFilesystemErrors($notification{name}, $task{name}, $system{name}, $lastid, @output);
     } # if
   } else {
-    $clearadm->ClearNotifications ($task{system});
+    $clearadm->ClearNotifications($task{system});
   } # if
         
-  my ($err, $msg) = $clearadm->UpdateSchedule (
+  my ($err, $msg) = $clearadm->UpdateSchedule(
     $task{schedulename},
     ( 'lastrunid' => $lastid ),
   );
     
-  $clearadm->Error ($msg, $err) if $err;  
+  $clearadm->Error($msg, $err) if $err;
   
   $sleep -= time - $startTime;
   
@@ -510,7 +504,7 @@ sub ExecuteTask ($%) {
 } # ExecuteTask
 
 # Main
-GetOptions (
+GetOptions(
   'usage'     => sub { Usage },
   'verbose'   => sub { set_verbose },
   'debug'     => sub { set_debug },
@@ -518,11 +512,9 @@ GetOptions (
   'pidfile=s' => \$pidfile,
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
-EnterDaemonMode $logfile, $logfile, $pidfile
-  if $daemon;
+EnterDaemonMode $logfile, $logfile, $pidfile if $daemon;
 
 display "$FindBin::Script V$VERSION started at " . localtime;
 
index 49b4b3f..d765363 100755 (executable)
@@ -72,7 +72,7 @@ my $clearadm = Clearadm->new;
 
 my $broadcastTime = 10;
 
-sub discover ($) {
+sub discover($) {
   my ($broadcast) = @_;
   
   my $startTime = time;
@@ -96,8 +96,7 @@ sub discover ($) {
       } # unless
     } # if
   
-    last
-      if (time () - $startTime) > $broadcastTime;
+    last if (time() - $startTime) > $broadcastTime;
   } # while
 
   verbose "$broadcastTime seconds has elapsed - discovery complete";
@@ -106,9 +105,9 @@ sub discover ($) {
 } # discover
 
 # Main
-my $broadcastAddress = inet_ntoa (INADDR_BROADCAST);
+my $broadcastAddress = inet_ntoa(INADDR_BROADCAST);
 
-GetOptions (
+GetOptions(
   usage             => sub { Usage },
   verbose           => sub { set_verbose },
   debug             => sub { set_debug },
@@ -116,8 +115,7 @@ GetOptions (
   'broadcastAddr=s' => \$broadcastAddress,  
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 # Announce ourselves
 verbose "$FindBin::Script V$VERSION";
@@ -147,17 +145,15 @@ verbose_nolf "Found $nbrHosts host";
 verbose_nolf 's' if $nbrHosts != 1;
 verbose      " on subnet $broadcastAddress";
 
-foreach (sort values %hosts) {
-  my $verbose = get_verbose () ? '-verbose' : '';
+for (sort values %hosts) {
+  my $verbose = get_verbose() ? '-verbose' : '';
   
   my ($status, @output) = Execute "updatesystem.pl -host $_ $verbose";
 
-  error "Unable to update host $_ (Status: $status)\n"
-      . join ("\n", @output), 1
-    if $status;
+  error "Unable to update host $_ (Status: $status)\n" . join ("\n", @output), 1 if $status;
     
   verbose join "\n", @output;
-} # foreach
+} # for
 
 =pod
 
index 76d3724..df9a74a 100755 (executable)
@@ -42,7 +42,7 @@ use warnings;
 use FindBin;
 use Getopt::Long;
 
-use CGI qw (:standard *table start_Tr end_Tr);
+use CGI qw(:standard *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 use Convert::Base64;
 
@@ -58,7 +58,7 @@ use Utils;
 my $clearadm = Clearadm->new;
 
 # Main
-GetOptions (
+GetOptions(
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
   'debug'        => sub { set_debug },
index afda2ae..a9bcb36 100644 (file)
@@ -38,7 +38,7 @@ specifics about the method you are envoking.
  my $clearadm = new Clearadm;
 
  # Add a new system
- my %system = (
+ my %system =(
   name          => 'jupiter',
   alias         => 'defaria.com',
   admin         => 'Andrew DeFaria',
@@ -47,13 +47,13 @@ specifics about the method you are envoking.
   description   => 'Home server',
  );
 
- my ($err, $msg) = $clearadm->AddSystem (%system);
+ my ($err, $msg) = $clearadm->AddSystem(%system);
 
  # Find systems matching 'jup'
- my @systems = $clearadm->FindSystem ('jup');
+ my @systems = $clearadm->FindSystem('jup');
 
  # Get a system by name
- my %system = $clearadm->GetSystem ('jupiter');
+ my %system = $clearadm->GetSystem('jupiter');
 
  # Update system
  my %update = (
@@ -64,7 +64,7 @@ specifics about the method you are envoking.
 
  # Delete system (Warning: will delete all related records regarding this
  # system).
- my ($err, $msg) = $clearadm->DeleteSystem ('jupiter');
+ my ($err, $msg) = $clearadm->DeleteSystem('jupiter');
 
 =head1 DESCRIPTION
 
@@ -98,6 +98,8 @@ use DateUtils;
 use Display;
 use GetConfig;
 use Mail;
+use Clearcase::Vob;
+use Clearcase::View;
 
 my $conf = dirname(__FILE__) . '/../etc/clearadm.conf';
 
@@ -155,8 +157,7 @@ sub _formatValues(@) {
   my @returnValues;
 
   # Quote data values
-  push @returnValues, $_ eq '' ? 'null' : $self->{db}->quote($_)
-    for (@values);
+  push @returnValues, $_ eq '' ? 'null' : $self->{db}->quote($_) for (@values);
 
   return @returnValues;
 } # _formatValues
@@ -166,8 +167,7 @@ sub _formatNameValues(%) {
 
   my @nameValueStrs;
 
-  push @nameValueStrs, "$_=" . $self->{db}->quote($rec{$_})
-    for (keys %rec);
+  push @nameValueStrs, "$_=" . $self->{db}->quote($rec{$_}) for (keys %rec);
 
   return @nameValueStrs;
 } # _formatNameValues
@@ -194,8 +194,7 @@ sub _deleteRecord($;$) {
   my $count;
 
   my $statement  = "select count(*) from $table ";
-     $statement .= "where $condition"
-      if $condition;
+     $statement .= "where $condition" if $condition;
 
   my $sth = $self->{db}->prepare($statement)
     or return $self->_dberror('Unable to prepare statement', $statement);
@@ -213,12 +212,10 @@ sub _deleteRecord($;$) {
     $count = 0;
   } # if
 
-  return ($count, 'Records deleted')
-    if $count == 0;
+  return ($count, 'Records deleted') if $count == 0;
 
   $statement  = "delete from $table ";
-  $statement .= "where $condition"
-    if $condition;
+  $statement .= "where $condition" if $condition;
 
   $self->{db}->do($statement);
 
@@ -234,8 +231,7 @@ sub _updateRecord($$%) {
 
   my $statement  = "update $table set ";
      $statement .= join ',', $self->_formatNameValues(%rec);
-     $statement .= " where $condition"
-       if $condition;
+     $statement .= " where $condition" if $condition;
 
   $self->{db}->do($statement);
 
@@ -255,8 +251,7 @@ sub _checkRequiredFields($$) {
       } # if
     } # for
 
-    return "$fieldname is required"
-      unless $found;
+    return "$fieldname is required" unless $found;
   } # for
 
   return;
@@ -337,7 +332,7 @@ sub _aliasSystem($) {
   if ($system{name}) {
     return $system{name};
   } else {
-       return;
+    return;
   } # if
 } # _aliasSystem
 
@@ -444,8 +439,7 @@ sub AddSystem(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%system;
 
-  return -1, "AddSystem: $result"
-    if $result;
+  return -1, "AddSystem: $result" if $result;
 
   $system{loadavgHist} ||= $defaultLoadavgHist;
 
@@ -467,8 +461,7 @@ sub UpdateSystem ($%) {
 sub GetSystem($) {
   my ($self, $system) = @_;
 
-  return
-    unless $system;
+  return unless $system;
 
   my @records = $self->_getRecords(
     'system',
@@ -478,7 +471,7 @@ sub GetSystem($) {
   if ($records[0]) {
     return %{$records[0]};
   } else {
-       return;
+    return;
   } # if
 } # GetSystem
 
@@ -511,8 +504,7 @@ sub AddPackage(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%package;
 
-  return -1, "AddPackage: $result"
-    if $result;
+  return -1, "AddPackage: $result" if $result;
 
   return $self->_addRecord('package', %package);
 } # AddPackage
@@ -530,8 +522,7 @@ sub UpdatePackage($$%) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   return $self->_updateRecord('package', "system='$system'", %update);
 } # UpdatePackage
@@ -541,11 +532,8 @@ sub GetPackage($$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
-
-  return
-    unless $name;
+  return unless $system;
+  return unless $name;
 
   my @records = $self->_getRecords(
     'package',
@@ -555,7 +543,7 @@ sub GetPackage($$) {
   if ($records[0]) {
     return %{$records[0]};
   } else {
-       return;
+    return;
   } # if
 } # GetPackage
 
@@ -566,8 +554,7 @@ sub FindPackage($;$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   my $condition = "system='$system' and name like '%$name%'";
 
@@ -585,8 +572,7 @@ sub AddFilesystem(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%filesystem;
 
-  return -1, "AddFilesystem: $result"
-    if $result;
+  return -1, "AddFilesystem: $result" if $result;
 
   # Default filesystem threshold
   $filesystem{threshold} ||= $defaultFilesystemThreshold;
@@ -599,8 +585,7 @@ sub DeleteFilesystem($$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   return $self->_deleteRecord(
     'filesystem',
@@ -613,8 +598,7 @@ sub UpdateFilesystem($$%) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   return $self->_updateRecord(
     'filesystem',
@@ -628,11 +612,8 @@ sub GetFilesystem($$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
-
-  return
-    unless $filesystem;
+  return unless $system;
+  return unless $filesystem;
 
   my @records = $self->_getRecords(
     'filesystem',
@@ -653,8 +634,7 @@ sub FindFilesystem($;$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   my $condition = "system='$system' and filesystem like '%$filesystem%'";
 
@@ -700,6 +680,14 @@ sub GetVob($$) {
   } # if
 } # GetVob
 
+<<<<<<< HEAD
+sub FindVobStorage(;$$) {
+  my ($self, $tag, $region) = @_;
+
+  $tag    ||= '';
+  $region ||= '';
+
+=======
 sub FindVob($;$) {
   my ($self, $tag, $region) = @_;
 
@@ -711,6 +699,23 @@ sub FindVob($;$) {
   
   $condition .= " and region='$region'" if $region;
 
+  return $self->_getRecords('vobstorage', $condition);
+} # FindVobStorage
+
+sub FindVob(;$$) {
+  my ($self, $tag, $region) = @_;
+
+  $tag    ||= '';
+  $region ||= '';
+
+  # Windows vob tags begin with "\", which is problematic. The solution is to
+  # escape the "\"
+  $tag =~ s/^\\/\\\\/;
+
+  my $condition = "tag like '%$tag%'";
+  
+  $condition .= " and region='$region'" if $region;
+
   return $self->_getRecords('vob', $condition);
 } # FindVob
 
@@ -736,8 +741,7 @@ sub AddView(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%view;
 
-  return -1, "AddView: $result"
-    if $result;
+  return -1, "AddView: $result" if $result;
 
   return $self->_addRecord('view', %view);
 } # AddView
@@ -769,22 +773,16 @@ sub GetView($$) {
 } # GetView
 
 sub FindView(;$$$$) {
-  my ($self, $system, $region, $tag, $ownerName) = @_;
-
-  $system    ||= '';
-  $region    ||= '';
-  $tag       ||= '';
-  $ownerName ||= '';
+  my ($self, $tag, $region, $ownerName) = @_;
 
   my $condition;
+  my @conditions;
 
-  $condition  = "system like '%$system%'";
-  $condition .= ' and ';
-  $condition  = "region like '%$region%'";
-  $condition .= ' and ';
-  $condition .= "tag like '%$tag'";
-  $condition .= ' and ';
-  $condition .= "ownerName like '%$ownerName'";
+  push @conditions, "tag like '%$tag%'"           if $tag;
+  push @conditions, "region = '$region'"          if $region;
+  push @conditions, "ownerName like '$ownerName'" if $ownerName;
+
+  $condition = join " and ", @conditions if @conditions;
 
   return $self->_getRecords('view', $condition);
 } # FindView
@@ -813,8 +811,7 @@ sub TrimFS($$) {
 
   my %filesystem = $self->GetFilesystem($system, $filesystem);
 
-  return
-    unless %filesystem;
+  return unless %filesystem;
 
   my %task = $self->GetTask('scrub');
 
@@ -839,8 +836,7 @@ sub TrimFS($$) {
   );
 
   if ($dbmsg eq 'Records deleted') {
-    return (0, $dbmsg)
-      if $dberr == 0;
+    return (0, $dbmsg) if $dberr == 0;
 
     my %runlog;
 
@@ -863,8 +859,7 @@ sub TrimLoadavg($) {
 
   my %system = $self->GetSystem($system);
 
-  return
-    unless %system;
+  return unless %system;
 
   my %task = $self->GetTask('loadavg');
 
@@ -889,8 +884,7 @@ sub TrimLoadavg($) {
   );
 
   if ($dbmsg eq 'Records deleted') {
-    return (0, $dbmsg)
-      if $dberr == 0;
+    return (0, $dbmsg) if $dberr == 0;
 
     my %runlog;
 
@@ -908,16 +902,111 @@ sub TrimLoadavg($) {
   return ($dberr, $dbmsg);
 } # TrimLoadavg
 
+sub TrimStorage($$$) {
+  my ($self, $type, $tag, $region) = @_;
+
+  my $today = Today2SQLDatetime;
+
+  my $oldage = SubtractDays $today, $Clearadm::CLEAROPTS{CLEARADM_SCRUBDAYS};
+
+  my $table = $type =~ /vob/i
+            ? 'vobstorage'
+           : 'viewstorage';
+
+  my ($dberr, $dbmsg) = $self->_deleteRecord(
+    $table,
+    "tag='$tag' and region='$region' and timestamp<='$oldage'"
+  );
+
+  if ($dbmsg eq 'Records deleted') {
+    return (0, $dbmsg) if $dberr == 0;
+
+    my %runlog;
+
+    $runlog{task}    = 'Scrub';
+    $runlog{started} = $today;
+    $runlog{status}  = 0;
+    $runlog{message} =
+      "Scrubbed $dberr ${type}storage records";
+
+    my ($err, $msg) = $self->AddRunlog(%runlog);
+
+    $self->Error("Unable to add runload (Error: $err)\n$msg") if $err;
+  } # if
+
+  return ($dberr, $dbmsg);
+} # TrimStorage
+
+sub ValidateCCObjects() {
+  my ($self) = @_;
+
+  my $vobRecordsDeleted  = 0;
+  my $viewRecordsDeleted = 0;
+
+  for my $region ($Clearcase::CC->regions) {
+    for my $type (qw(vob view)) {
+      my @ccobjs;
+      verbose "Processing ${type}s in $region";
+
+      if ($type eq 'vob') {
+        verbose "Finding all vobs in region $region";
+       @ccobjs = $self->FindVob(undef, $region);
+       verbose 'Found ' . scalar @ccobjs . ' vobs to process';
+      } elsif ($type eq 'view') {
+        verbose "Finding all views in region $region";
+       @ccobjs = $self->FindView(undef, $region);
+       verbose 'Found ' . scalar @ccobjs . ' views to process';
+      } # if
+
+      for my $object (@ccobjs) {
+        my %ccobjrec = %$object;
+
+       verbose "Processing $ccobjrec{tag}:$ccobjrec{region}";
+
+       my $ccobj;
+
+       if ($type eq 'vob') {
+         $ccobj = Clearcase::Vob->new($ccobjrec{tag}, $ccobjrec{region});
+       } else {
+         $ccobj = Clearcase::View->new($ccobjrec{tag}, $ccobjrec{region});
+       } # if 
+
+       verbose_nolf 'Checking if ' . $ccobj->{tag} . ':' . $ccobj->{region} . ' exists anymore...';
+
+       if ($ccobj->exists) {
+         verbose ' it does! Skipping...';
+         next;
+       } else {
+         verbose ' it doesn\'t!';
+       } # if
+
+       #next if $ccobj->exists;
+
+       verbose "Deleting $type $ccobjrec{tag}:$ccobjrec{region}";
+
+       my ($recordsDeleted, $msg) = $self->_deleteRecord($type, 
+         "tag='$ccobjrec{tag}' and region='$ccobjrec{region}'");
+
+       if ($msg ne 'Records deleted') {
+         return ($recordsDeleted, $msg);
+       } else {
+         $viewRecordsDeleted += $recordsDeleted if $type eq 'view';
+         $vobRecordsDeleted  += $recordsDeleted if $type eq 'vob';
+       } # if
+      } # for
+    } # for
+  } # for
+
+  return ($viewRecordsDeleted, $vobRecordsDeleted);
+} # ValidateCCObjects
+
 sub GetFS($$;$$$$) {
   my ($self, $system, $filesystem, $start, $end, $count, $interval) = @_;
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
-
-  return
-    unless $filesystem;
+  return unless $system;
+  return unless $filesystem;
 
   $interval ||= 'Minute';
 
@@ -1001,11 +1090,8 @@ sub GetLatestFS($$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
-
-  return
-    unless $filesystem;
+  return unless $system;
+  return unless $filesystem;
 
   my @records = $self->_getRecords(
     'fs',
@@ -1014,9 +1100,9 @@ sub GetLatestFS($$) {
   );
 
   if ($records[0]) {
-       return %{$records[0]};
+    return %{$records[0]};
   } else {
-       return;
+    return;
   } # if
 } # GetLatestFS
 
@@ -1029,8 +1115,7 @@ sub AddLoadavg() {
 
   my $result = _checkRequiredFields \@requiredFields, \%loadavg;
 
-  return -1, "AddLoadavg: $result"
-    if $result;
+  return -1, "AddLoadavg: $result" if $result;
 
   # Timestamp record
   $loadavg{timestamp} = Today2SQLDatetime;
@@ -1043,8 +1128,7 @@ sub GetLoadavg($;$$$$) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   $interval ||= 'Minute';
 
@@ -1077,8 +1161,7 @@ sub GetLoadavg($;$$$$) {
     my $offset  = $nbrRecs - $count;
 
     # Offsets of < 0 are not allowed.
-    $offset = 0
-      if $offset < 0;
+    $offset = 0 if $offset < 0;
 
     $condition .= " limit $offset, $count";
   } # if
@@ -1127,8 +1210,7 @@ sub GetLatestLoadavg($) {
 
   $system = $self->_aliasSystem($system);
 
-  return
-    unless $system;
+  return unless $system;
 
   my @records = $self->_getRecords(
     'loadavg',
@@ -1143,7 +1225,7 @@ sub GetLatestLoadavg($) {
   } # if
 } # GetLatestLoadavg
 
-sub GetStorage($$$;$$$$$) {
+sub GetStoragePool($$$;$$$$$) {
   my ($self, $type, $tag, $storage, $region, $start, $end, $count, $interval) = @_;
 
   $interval ||= 'Day';
@@ -1226,7 +1308,7 @@ END
   } # while
 
   return @records;
-} # GetStorage
+} # GetStoragePool
 
 sub AddTask(%) {
   my ($self, %task) = @_;
@@ -1238,8 +1320,7 @@ sub AddTask(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%task;
 
-  return -1, "AddTask: $result"
-    if $result;
+  return -1, "AddTask: $result" if $result;
 
   return $self->_addRecord('task', %task);
 } # AddTask
@@ -1263,8 +1344,7 @@ sub FindTask($) {
 sub GetTask($) {
   my ($self, $name) = @_;
 
-  return
-    unless $name;
+  return unless $name;
 
   my @records = $self->_getRecords('task', "name='$name'");
 
@@ -1290,8 +1370,7 @@ sub AddSchedule(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%schedule;
 
-  return -1, "AddSchedule: $result"
-    if $result;
+  return -1, "AddSchedule: $result" if $result;
 
   return $self->_addRecord('schedule', %schedule);
 } # AddSchedule
@@ -1306,7 +1385,7 @@ sub FindSchedule(;$$) {
   my ($self, $name, $task) = @_;
 
   $name ||= '';
-  $task||= '';
+  $task ||= '';
 
   my $condition  = "name like '%$name%'";
      $condition .= ' and ';
@@ -1342,8 +1421,7 @@ sub AddRunlog(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%runlog;
 
-  return -1, "AddRunlog: $result"
-    if $result;
+  return -1, "AddRunlog: $result" if $result;
 
   $runlog{ended} = Today2SQLDatetime;
 
@@ -1405,8 +1483,7 @@ sub FindRunlog(;$$$$$$) {
 sub GetRunlog($) {
   my ($self, $id) = @_;
 
-  return
-    unless $id;
+  return unless $id;
 
   my @records = $self->_getRecords('runlog', "id=$id");
 
@@ -1629,8 +1706,7 @@ sub AddAlert(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%alert;
 
-  return -1, "AddAlert: $result"
-    if $result;
+  return -1, "AddAlert: $result" if $result;
 
   return $self->_addRecord('alert', %alert);
 } # AddAlert
@@ -1878,8 +1954,7 @@ sub Notify($$$$$$) {
     # If you want to fake an alert in the debugger just change $diff accordingly
     my $diff = Compare($today, $lastnotified);
 
-    return
-      if $diff <= 0;
+    return if $diff <= 0;
   } # if
 
   my $when       = Today2SQLDatetime;
@@ -1962,8 +2037,7 @@ sub ClearNotifications($$;$) {
 
     my %system = $self->GetSystem($system);
 
-    return
-      unless $system;
+    return unless $system;
 
     if ($system{notification}                 and
         $system{notification} eq 'Filesystem' and
@@ -1989,13 +2063,11 @@ sub SystemAlive(%) {
   # If we've never heard from this system then we will assume that the system
   # has not been set up to run clearagent and has never checked in. In any event
   # we cannot say the system died because we've never known it to be alive!
-  return 1
-    unless $system{lastheardfrom};
+  return 1 unless $system{lastheardfrom};
 
   # If a system is not active (may have been temporarily been deactivated) then
   # we don't want to turn on the bells and whistles alerting people it's down.
-  return 1
-    if $system{active} eq 'false';
+  return 1 if $system{active} eq 'false';
 
   my $today         = Today2SQLDatetime;
   my $lastheardfrom = $system{lastheardfrom};
@@ -2044,8 +2116,7 @@ sub AddAlertlog(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%alertlog;
 
-  return -1, "AddAlertlog: $result"
-    if $result;
+  return -1, "AddAlertlog: $result" if $result;
 
   # Timestamp record
   $alertlog{timestamp} = Today2SQLDatetime;
@@ -2080,10 +2151,10 @@ sub FindAlertlog(;$$$$$) {
      $condition .= "notification like '%$notification%'";
      $condition .= " order by timestamp desc";
 
-     if (defined $start) {
-       $page ||= 10;
-       $condition .= " limit $start, $page";
-     } # unless
+  if (defined $start) {
+    $page ||= 10;
+    $condition .= " limit $start, $page";
+  } # unless
 
   return $self->_getRecords('alertlog', $condition);
 } # FindAlertLog
@@ -2091,8 +2162,7 @@ sub FindAlertlog(;$$$$$) {
 sub GetAlertlog($) {
   my ($self, $alert) = @_;
 
-  return
-    unless $alert;
+  return unless $alert;
 
   my @records = $self->_getRecords('alertlog', "alert='$alert'");
 
@@ -2124,8 +2194,7 @@ sub AddNotification(%) {
 
   my $result = _checkRequiredFields \@requiredFields, \%notification;
 
-  return -1, "AddNotification: $result"
-    if $result;
+  return -1, "AddNotification: $result" if $result;
 
   return $self->_addRecord('notification', %notification);
 } # AddNotification
@@ -2151,8 +2220,7 @@ sub FindNotification(;$$) {
 sub GetNotification($) {
   my ($self, $name) = @_;
 
-  return
-    unless $name;
+  return unless $name;
 
   my @records = $self->_getRecords('notification', "name='$name'");
 
index c776c82..e5848b0 100644 (file)
@@ -47,7 +47,7 @@ use strict;
 
 use base 'Exporter';
 
-use CGI qw (
+use CGI qw(
   :standard
    start_a
    end_a
@@ -85,7 +85,7 @@ our $APPNAME= 'Clearadm';
 our $VERSION  = '$Revision: 1.46 $';
    ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
 
-our @EXPORT = qw (
+our @EXPORT = qw(
   autoScale
   displayError
   displayAlert
@@ -165,7 +165,7 @@ our @PREDEFINED_MULTIPLIERS = (
   'Days',
 );
 
-sub dbug ($) {
+sub dbug($) {
   my ($msg) = @_;
 
   display font ({-class => 'error'}, '<br>DEBUG: '). $msg;
@@ -173,7 +173,7 @@ sub dbug ($) {
   return;
 } # dbug
 
-sub displayError ($) {
+sub displayError($) {
   my ($msg) = @_;
 
   display font ({-class => 'error'}, 'Error: ') . $msg;
@@ -181,7 +181,7 @@ sub displayError ($) {
   return
 } # displayError;
 
-sub setField ($;$) {
+sub setField($;$) {
   my ($field, $label) = @_;
 
   $label ||= 'Unknown';
@@ -191,7 +191,7 @@ sub setField ($;$) {
   return defined $field ? $field : $undef;
 } # setField
 
-sub setFields ($%) {
+sub setFields($%) {
   my ($label, %rec) = @_;
 
   $rec{$_} = setField ($rec{$_}, $label)
@@ -200,7 +200,7 @@ sub setFields ($%) {
   return %rec;
 } # setFields;
 
-sub dumpVars (%) {
+sub dumpVars(%) {
   my (%vars) = @_;
 
   for (keys %vars) {
@@ -210,7 +210,7 @@ sub dumpVars (%) {
   return;
 } # dumpVars
 
-sub graphError ($) {
+sub graphError($) {
   my ($msg) = @_;
 
   use GD;
@@ -240,7 +240,7 @@ sub graphError ($) {
   exit;
 } # graphError
 
-sub autoScale ($) {
+sub autoScale($) {
   my ($amount) = @_;
 
   my $kbyte = 1024;
@@ -256,7 +256,7 @@ sub autoScale ($) {
   return $size;
 } # autoScale
 
-sub _makeAlertlogSelection ($$) {
+sub _makeAlertlogSelection($$) {
   my ($name, $default) = @_;
 
   $default ||= 'All';
@@ -278,7 +278,7 @@ sub _makeAlertlogSelection ($$) {
   return $dropdown;
 } # _makeAlertlogSelection
 
-sub _makeRunlogSelection ($$) {
+sub _makeRunlogSelection($$) {
   my ($name, $default) = @_;
 
   $default ||= 'All';
@@ -308,7 +308,7 @@ sub _makeRunlogSelection ($$) {
   return $dropdown;
 } # _makeRunlogSelection
 
-sub _makeRunlogSelectionNumeric ($$) {
+sub _makeRunlogSelectionNumeric($$) {
   my ($name, $default) = @_;
 
   $default ||= 'All';
@@ -327,15 +327,14 @@ sub _makeRunlogSelectionNumeric ($$) {
   return $dropdown;
 } # _makeRunlogSelection
 
-sub makeAlertDropdown (;$$) {
+sub makeAlertDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
 
   my @values;
 
-  push @values, $$_{name}
-    for ($clearadm->FindAlert);
+  push @values, $$_{name} for ($clearadm->FindAlert);
 
   my $dropdown  = "$label ";
      $dropdown .= popup_menu {
@@ -348,7 +347,7 @@ sub makeAlertDropdown (;$$) {
   return $dropdown;
 } # makeAlertDropdown
 
-sub makeMultiplierDropdown (;$$) {
+sub makeMultiplierDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
@@ -364,7 +363,7 @@ sub makeMultiplierDropdown (;$$) {
   return $dropdown;
 } # makeMultiplierDropdown
 
-sub makeNoMoreThanDropdown (;$$) {
+sub makeNoMoreThanDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
@@ -431,7 +430,7 @@ sub makeStoragePoolDropdown($$) {
   return span {id => $type}, $dropdown;
 } # makeStoragePoolsDropdown
     
-sub makeFilesystemDropdown ($;$$$) {
+sub makeFilesystemDropdown($;$$$) {
   my ($system, $label, $default, $onchange) = @_;
 
   $label ||= '';
@@ -459,7 +458,7 @@ sub makeFilesystemDropdown ($;$$$) {
   return span {id => 'filesystems'}, $dropdown;
 } # makeFilesystemDropdown
 
-sub makeIntervalDropdown (;$$$) {
+sub makeIntervalDropdown(;$$$) {
   my ($label, $default, $onchange) = @_;
 
   $label ||= '';
@@ -471,8 +470,7 @@ sub makeIntervalDropdown (;$$$) {
     'Month',
   );
 
-  $default = ucfirst lc $default
-    if $default;
+  $default = ucfirst lc $default if $default;
 
   my $dropdown  = "$label ";
      $dropdown .= popup_menu {
@@ -487,7 +485,7 @@ sub makeIntervalDropdown (;$$$) {
    return span {id => 'scaling'}, $dropdown;
 } # makeIntervalDropdown;
 
-sub makeNotificationDropdown (;$$) {
+sub makeNotificationDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
@@ -508,7 +506,7 @@ sub makeNotificationDropdown (;$$) {
   return $dropdown;
 } # makeNotificationDropdown
 
-sub makeRestartableDropdown (;$$) {
+sub makeRestartableDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
@@ -529,7 +527,7 @@ sub makeRestartableDropdown (;$$) {
   return $dropdown;
 } # makeRestartableDropdown
 
-sub makeSystemDropdown (;$$$%) {
+sub makeSystemDropdown(;$$$%) {
   my ($label, $default, $onchange, %systems) = @_;
 
   $label ||= '';
@@ -556,7 +554,7 @@ sub makeSystemDropdown (;$$$%) {
   return span {id => 'systems'}, $systemDropdown;
 } # makeSystemDropdown
 
-sub makeTaskDropdown (;$$) {
+sub makeTaskDropdown(;$$) {
   my ($label, $default) = @_;
 
   $label ||= '';
@@ -577,7 +575,7 @@ sub makeTaskDropdown (;$$) {
   return $taskDropdown;
 } # makeTaskDropdown
 
-sub makeTimeDropdown ($$$;$$$$$) {
+sub makeTimeDropdown($$$;$$$$$) {
   my (
     $table,
     $elementID,
@@ -622,7 +620,7 @@ sub makeTimeDropdown ($$$;$$$$$) {
   return $timeDropdown;
 } # makeTimeDropdown
 
-sub heading (;$$) {
+sub heading(;$$) {
   my ($title, $type) = @_;
 
   if ($title) {
@@ -762,7 +760,7 @@ sub heading (;$$) {
   return;
 } # heading
 
-sub displayAlert (;$) {
+sub displayAlert(;$) {
   my ($alert) = @_;
 
   display start_table {cellspacing => 1};
@@ -862,7 +860,7 @@ sub displayAlert (;$) {
   return;
 } # DisplayAlerts
 
-sub displayAlertlog (%) {
+sub displayAlertlog(%) {
   my (%opts) = @_;
 
   my $optsChanged;
@@ -1085,7 +1083,7 @@ sub displayAlertlog (%) {
   return;
 } # displayAlertlog
 
-sub displayFilesystem ($) {
+sub displayFilesystem($) {
   my ($systemName) = @_;
 
   display start_table {cellspacing => 1, width => '98%'};
@@ -1235,7 +1233,7 @@ sub displayFilesystem ($) {
   return;
 } # displayFilesystem
 
-sub displayNotification (;$) {
+sub displayNotification(;$) {
   my ($notification) = @_;
 
   display start_table {cellspacing => 1};
@@ -1335,7 +1333,7 @@ sub displayNotification (;$) {
   return;
 } # displayNotification
 
-sub displayRunlog (%) {
+sub displayRunlog(%) {
   my (%opts) = @_;
 
   my $optsChanged;
@@ -1567,7 +1565,7 @@ sub displayRunlog (%) {
   return;
 } # displayRunlog
 
-sub displaySchedule () {
+sub displaySchedule() {
   display start_table {cellspacing => 1};
 
   display start_Tr;
@@ -1672,7 +1670,7 @@ sub displaySchedule () {
   return;
 } # displaySchedule
 
-sub displaySystem ($) {
+sub displaySystem($) {
   my ($systemName) = @_;
 
   my %system = $clearadm->GetSystem ($systemName);
@@ -1933,7 +1931,7 @@ sub displaySystem ($) {
   return;
 } # displaySystem
 
-sub displayTask (;$) {
+sub displayTask(;$) {
   my ($task) = @_;
 
   display start_table {cellspacing => 1, width => '98%'};
@@ -2032,7 +2030,7 @@ sub displayTask (;$) {
   return;
 } # DisplayAlerts
 
-sub editAlert (;$) {
+sub editAlert(;$) {
   my ($alert) = @_;
 
   display start_form (
@@ -2113,7 +2111,7 @@ sub editAlert (;$) {
   return;
 } # editAlert
 
-sub editFilesystem ($$) {
+sub editFilesystem($$) {
   my ($system, $filesystem) = @_;
 
   display start_form (
@@ -2214,7 +2212,7 @@ sub editFilesystem ($$) {
   return;
 } # editFilesytem
 
-sub editNotification (;$) {
+sub editNotification(;$) {
   my ($notification) = @_;
 
   display start_form (
@@ -2299,7 +2297,7 @@ sub editNotification (;$) {
   return;
 } # editNotification
 
-sub editSchedule (;$) {
+sub editSchedule(;$) {
   my ($schedule) = @_;
 
   display start_form (
@@ -2402,7 +2400,7 @@ sub editSchedule (;$) {
   return;
 } # editSchedule
 
-sub editSystem (;$) {
+sub editSystem(;$) {
   my ($system) = @_;
 
   display start_form (
@@ -2587,7 +2585,7 @@ sub editSystem (;$) {
   return;
 } # editSystem
 
-sub editTask (;$) {
+sub editTask(;$) {
   my ($task) = @_;
 
   display start_form (
@@ -2688,7 +2686,7 @@ sub editTask (;$) {
   return;
 } # editTask
 
-sub footing () {
+sub footing() {
   my $clearscm = a {-href => 'http://clearscm.com'}, 'ClearSCM, Inc.';
 
   # Figure out which script by using CLEARADM_BASE.
index 410a94e..461f86d 100644 (file)
@@ -81,7 +81,7 @@ $CLEAROPTS{CLEAREXEC_PORT} = $ENV{CLEAREXEC_PORT}
 $CLEAROPTS{CLEAREXEC_MULTITHREADED} = $ENV{CLEAREXEC_MULTITHREADED}
   if $ENV{CLEAREXEC_MULTITHREADED};
 
-sub new () {
+sub new() {
   my ($class) = @_;
 
   my $clearadm = bless {}, $class;
@@ -91,7 +91,7 @@ sub new () {
   return $clearadm;
 } # new
 
-sub _tag ($) {
+sub _tag($) {
   my ($self, $msg) = @_;
 
   my $tag = YMDHMS;
@@ -101,7 +101,7 @@ sub _tag ($) {
   return "$tag$msg";
 } # _tag
 
-sub _verbose ($) {
+sub _verbose($) {
   my ($self, $msg) = @_;
 
   verbose $self->_tag ($msg);
@@ -109,7 +109,7 @@ sub _verbose ($) {
   return;
 } # _verbose
 
-sub _debug ($) {
+sub _debug($) {
   my ($self, $msg) = @_;
 
   debug $self->_tag ($msg);
@@ -117,7 +117,7 @@ sub _debug ($) {
   return;
 } # _debug
 
-sub _log ($) {
+sub _log($) {
   my ($self, $msg) = @_;
 
   display $self->_tag ($msg);
@@ -125,7 +125,7 @@ sub _log ($) {
   return;
 } # log
 
-sub _endServer () {
+sub _endServer() {
   display "Clearexec V$VERSION shutdown at " . localtime;
 
   # Kill process group
@@ -133,7 +133,6 @@ sub _endServer () {
 
   # Wait for all children to die
   while (wait != -1) {
-
     # do nothing
   } # while
 
@@ -141,7 +140,7 @@ sub _endServer () {
   exit;
 } # _endServer
 
-sub _restartServer () {
+sub _restartServer() {
 
   # Not sure what to do on a restart server
   display 'Entered _restartServer';
@@ -149,7 +148,7 @@ sub _restartServer () {
   return;
 } # _restartServer
 
-sub setMultithreaded ($) {
+sub setMultithreaded($) {
   my ($self, $value) = @_;
 
   my $oldValue = $self->{multithreaded};
@@ -159,13 +158,13 @@ sub setMultithreaded ($) {
   return $oldValue;
 } # setMultithreaded
 
-sub getMultithreaded () {
+sub getMultithreaded() {
   my ($self) = @_;
 
   return $self->{multithreaded};
 } # getMultithreaded
 
-sub connectToServer (;$$) {
+sub connectToServer(;$$) {
   my ($self, $host, $port) = @_;
 
   $host ||= $CLEAROPTS{CLEAREXEC_HOST};
@@ -179,8 +178,7 @@ sub connectToServer (;$$) {
 
   return unless $self->{socket};
 
-  $self->{socket}->autoflush
-    if $self->{socket};
+  $self->{socket}->autoflush if $self->{socket};
 
   $self->{host} = $host;
   $self->{port} = $port;
@@ -194,7 +192,7 @@ sub connectToServer (;$$) {
   return;
 } # connectToServer
 
-sub disconnectFromServer () {
+sub disconnectFromServer() {
   my ($self) = @_;
 
   undef $self->{socket};
@@ -202,11 +200,10 @@ sub disconnectFromServer () {
   return;
 } # disconnectFromServer
 
-sub execute ($) {
+sub execute($) {
   my ($self, $cmd) = @_;
 
-  return (-1, 'Unable to talk to server')
-    unless $self->{socket};
+  return (-1, 'Unable to talk to server') unless $self->{socket};
 
   my ($status, $statusLine, @output) = (-1, '', ());
 
@@ -230,14 +227,13 @@ sub execute ($) {
   return ($status, @output);
 } # execute
 
-sub _serviceClient ($$) {
+sub _serviceClient($$) {
   my ($self, $host, $client) = @_;
 
   $self->_verbose ("Serving requests from $host");
 
   # Set autoflush for client
-  $client->autoflush
-    if $client;
+  $client->autoflush if $client;
 
   while () {
     # Read command from client
@@ -274,8 +270,7 @@ sub _serviceClient ($$) {
       $self->_debug ("Returning 0, undef");
     } else {
       # Combines STDERR -> STDOUT if not already specified
-      $cmd .= ' 2>&1'
-        unless $cmd =~ /2>&1/;
+      $cmd .= ' 2>&1' unless $cmd =~ /2>&1/;
 
       $self->_debug ("Executing $cmd");
       ($status, @output) = Execute $cmd;
@@ -295,7 +290,7 @@ sub _serviceClient ($$) {
   return;
 } # _serviceClient
 
-sub startServer (;$) {
+sub startServer(;$) {
   my ($self, $port) = @_;
 
   $port ||= $CLEAROPTS{CLEAREXEC_PORT};
@@ -308,8 +303,7 @@ sub startServer (;$) {
     Reuse     => 1
   );
 
-  error "Could not create socket - $!", 1
-    unless $self->{socket};
+  error "Could not create socket - $!", 1 unless $self->{socket};
 
   # Announce ourselves
   $self->_log ("Clearexec V$VERSION accepting clients at " . localtime);
index 8d47e36..7142ad9 100644 (file)
@@ -174,7 +174,7 @@ create table vobstorage (
   source         decimal(10,1),
   total                  decimal(10,1),
 
-  key vobtagIndex (tag),
+  key vobtagIndex (tag, region),
   primary key  (tag, region, timestamp)
   foreign key vobLink (tag, region)
     references vob (tag, region)
@@ -193,8 +193,12 @@ create table viewstorage (
   admin                decimal(10,1),
   total         decimal(10,1),
 
-  key viewtagIndex (tag),
-  primary key (tag, region, timestamp)
+  key viewtagIndex (tag, region),
+  primary key (tag, region, timestamp),
+  foreign key viewLink (tag, region)
+    references view (tag, region)
+      on delete cascade
+      on update cascade
 ) engine=innodb; -- viewstorage
 
 -- loadavg: Contains a snapshot reading of a system's load average
index 310ff7f..fa3d45a 100755 (executable)
@@ -39,7 +39,7 @@ use strict;
 use warnings;
 
 use FindBin;
-use CGI qw (:standard :cgi-lib start_table end_table start_Tr end_Tr);
+use CGI qw(:standard :cgi-lib start_table end_table start_Tr end_Tr);
 use GD::Graph::area;
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -55,7 +55,7 @@ my %opts = Vars;
 
 my $clearadm;
 
-sub displayGraph () {
+sub displayGraph() {
   my $parms;
 
   for (keys %opts) {
@@ -120,7 +120,7 @@ sub displayGraph () {
   return;
 } # displayGraph
 
-sub displayFSInfo () {
+sub displayFSInfo() {
   if ($opts{filesystem}) {
     display h3 {-align => 'center'}, 'Latest Filesystem Reading';
   } else {
@@ -191,20 +191,20 @@ sub displayControls() {
   my ($systemLink, $systemButtons);
 
   if ($opts{type} =~ /(vob|view)/i) {
-    $tagsButtons = makeTagsDropdown ($opts{type}, $opts{tag});
+    $tagsButtons = makeTagsDropdown($opts{type}, $opts{tag});
   } else {
     $systemLink = span {id => 'systemLink'}, a {
       href => "systemdetails.cgi?system=$opts{system}",
     }, 'System';
 
-    $systemButtons = makeSystemDropdown (
+    $systemButtons = makeSystemDropdown(
       $systemLink, 
       $opts{system}, 
       'updateFilesystems(this.value);updateSystemLink(this.value)'
     );
   } # if
 
-  my $startButtons = makeTimeDropdown (
+  my $startButtons = makeTimeDropdown(
     $opts{type},
     'startTimestamp',
     $opts{system},
@@ -214,7 +214,7 @@ sub displayControls() {
     $opts{scaling},
   );
 
-  my $endButtons = makeTimeDropdown (
+  my $endButtons = makeTimeDropdown(
     $opts{type},
     'endTimestamp',
     $opts{system},
@@ -234,7 +234,7 @@ sub displayControls() {
     $update = ''; # TODO do I need something here?
   } # if
              
-  my $intervalButtons = makeIntervalDropdown (
+  my $intervalButtons = makeIntervalDropdown(
     'Interval',
     $opts{scaling},
     $update
@@ -294,7 +294,7 @@ sub displayControls() {
 
 $clearadm = Clearadm->new;
 
-my $title  = ucfirst ($opts{type}) . ': ';
+my $title  = ucfirst($opts{type}) . ': ';
 
 $title .= ucfirst $opts{system}           if $opts{system};
 $title .= ":$opts{filesystem}"            if $opts{filesystem};
index e4a5e6c..e02bd10 100755 (executable)
@@ -69,7 +69,7 @@ use Clearadm;
 use ClearadmWeb;
 use Display;
 
-use CGI qw (:standard :cgi-lib);
+use CGI qw(:standard :cgi-lib);
 use GD::Graph::area;
 
 my %opts = Vars;
@@ -90,7 +90,7 @@ if ($opts{tiny}) {
 
 my $clearadm = Clearadm->new;
 
-my $graph = GD::Graph::area->new ($opts{width}, $opts{height});
+my $graph = GD::Graph::area->new($opts{width}, $opts{height});
 
 graphError "System is required"
   unless $opts{system};
@@ -101,7 +101,7 @@ graphError "Filesystem is required"
 graphError "Points not numeric (points: $opts{points})"
   if $opts{points} and $opts{points} !~ /^\d+$/;
   
-my @fs = $clearadm->GetFS (
+my @fs = $clearadm->GetFS(
   $opts{system},
   $opts{filesystem},
   $opts{start},
@@ -117,7 +117,7 @@ my (@x, @y);
 
 my $i = 0;
 
-foreach (@fs) {
+for (@fs) {
   $i++;
   my %fs = %{$_};
   
@@ -129,7 +129,8 @@ foreach (@fs) {
 
   push @y, $opts{meg} ? $fs{used} / (1024 * 1024) :
                         $fs{used} / (1024 * 1024 * 12024);
-}
+} # for
+
 my @data = ([@x], [@y]);
 
 my $x_label_skip = @x > 1000 ? 200
@@ -145,7 +146,7 @@ my $title   = $opts{tiny} ? '' : "Filesystem usage for "
                                . "$opts{system}:$opts{filesystem}";
 my $labelY  = $opts{tiny} ? '' : '%.2f';
 
-$graph->set (
+$graph->set(
   x_label           =>$x_label,
   x_labels_vertical => 1,
   x_label_skip      => $x_label_skip,
index 8d51a21..d5cb7ca 100755 (executable)
@@ -67,7 +67,7 @@ use Clearadm;
 use ClearadmWeb;
 use Display;
 
-use CGI qw (:standard :cgi-lib);
+use CGI qw(:standard :cgi-lib);
 use GD::Graph::area;
 
 my %opts = Vars;
@@ -88,7 +88,7 @@ if ($opts{tiny}) {
 
 my $clearadm = Clearadm->new;
 
-my $graph = GD::Graph::area->new ($opts{width}, $opts{height});
+my $graph = GD::Graph::area->new($opts{width}, $opts{height});
 
 graphError "System is required"
   unless $opts{system};
@@ -96,7 +96,7 @@ graphError "System is required"
 graphError "Points not numeric (points: $opts{points})"
   if $opts{points} and $opts{points} !~ /^\d+$/;
 
-my @loads = $clearadm->GetLoadavg (
+my @loads = $clearadm->GetLoadavg(
   $opts{system},
   $opts{start},
   $opts{end},
@@ -134,7 +134,7 @@ my $y_label = $opts{tiny} ? '' : 'Load';
 my $title   = $opts{tiny} ? '' : "Load Average for $opts{system}";
 my $labelY  = $opts{tiny} ? '' : '%.2f';
 
-$graph->set (
+$graph->set(
   x_label           => $x_label,
   x_labels_vertical => 1,
   x_label_skip      => $x_label_skip,
index f017de6..d879ef3 100755 (executable)
@@ -70,7 +70,7 @@ use ClearadmWeb;
 use Clearcase;
 use Display;
 
-use CGI qw (:standard :cgi-lib);
+use CGI qw(:standard :cgi-lib);
 use GD::Graph::area;
 
 my %opts = Vars;
@@ -91,7 +91,7 @@ if ($opts{tiny}) {
 
 my $clearadm = Clearadm->new;
 
-my $graph = GD::Graph::area->new ($opts{width}, $opts{height});
+my $graph = GD::Graph::area->new($opts{width}, $opts{height});
 
 graphError "Tag is required"     unless $opts{tag};
 graphError "Type is required"    unless $opts{type};
@@ -100,7 +100,7 @@ graphError "Storage is required" unless $opts{storage};
 graphError "Points not numeric (points: $opts{points})"
   if $opts{points} and $opts{points} !~ /^\d+$/;
   
-my @storage = $clearadm->GetStorage (
+my @storage = $clearadm->GetStoragePool(
   $opts{type},
   $opts{tag},
   $opts{storage},
@@ -148,7 +148,7 @@ my $title   = $opts{tiny} ? '' : "Storage usage for "
                                . "$opts{type}:$opts{tag} $storageLabel";
 my $labelY  = $opts{tiny} ? '' : '%.2f';
 
-$graph->set (
+$graph->set(
   x_label           => $x_label,
   x_labels_vertical => 1,
   x_label_skip      => $x_label_skip,
index c5a2a4f..cca1d7c 100755 (executable)
@@ -64,7 +64,7 @@ use Utils;
 my $VERSION  = '$Revision: 1.2 $';
   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
   
-sub restart ($) {\r
+sub restart($) {\r
   my ($restart) = @_;
 
   my ($status, @output) = Execute "$restart 2>&1";
@@ -72,11 +72,11 @@ sub restart ($) {
   unless ($status) {
     display "Successfully executed restart option: $restart";
       
-    display $_ foreach (@output);
+    display $_ for (@output);
   } else {
     display "Unable to restart process using $restart (Status: $status)";
       
-    display $_ foreach (@output);
+    display $_ for (@output);
   } # unless
   
   return $status;
@@ -122,19 +122,15 @@ unless ($status) {
       . join ("\n", @output), $status;
 } # if
  
-foreach (@output) {
-  next
-    if /grep -i '$name'/;
-    
-  next
-    if /grep -i $name/;
-  
-  next
-    if /$FindBin::Script/;
+for (@output) {
+  next if /grep -i '$name'/;
+  next if /grep -i $name/;
+  next if /$FindBin::Script/;
     
   display "Found processes named $name";
+
   exit 0;
-} # foreach
+} # for
 
 display "Did not find any processes named $name";
 
index 9a259a3..ce994af 100755 (executable)
@@ -40,7 +40,7 @@ use warnings;
 use FindBin;
 use Getopt::Long;
 
-use CGI qw (:standard *table start_Tr end_Tr);
+use CGI qw(:standard *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -50,7 +50,7 @@ use Display;
 use Utils;
 
 # Main
-GetOptions (
+GetOptions(
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
   'debug'        => sub { set_debug },
@@ -65,8 +65,7 @@ display '<pre><blockquote>';
 
 display h1 {class => 'center'}, "$ClearadmWeb::APPNAME: README";
 
-display $_
-  foreach (ReadFile 'README');
+display $_ foreach (ReadFile 'README');
 
 display '</pre></blockquote>';
 
index 98a0094..094f8ad 100755 (executable)
@@ -73,7 +73,7 @@ use Utils;
 my $VERSION  = '$Revision: 1.1 $';
   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
   
-sub SetupAgent () {
+sub SetupAgent() {
   verbose 'Setting up Agent...';
   
   my ($status, @output, $cmd);
@@ -121,8 +121,7 @@ sub SetupAgent () {
 
       ($status, @output) = Execute "$cmd 2>&1";
 
-      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-        if $status;
+      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
       $cmd = "chmod 777 $Clearadm::CLEAROPTS{CLEARADM_BASE}/$_";
 
@@ -137,8 +136,7 @@ sub SetupAgent () {
     # Symlink $CLEARADM/etc/conf.d/clearadm -> /etc/init.d
     my $confdir = '/etc/init.d';
 
-    error "Cannot find conf.d directory ($confdir)", 1
-      unless -d $confdir;
+    error "Cannot find conf.d directory ($confdir)", 1 unless -d $confdir;
 
     unless (-e "$confdir/clearagent") {
       $cmd = "ln -s $FindBin::Bin/etc/init.d/clearagent $confdir";
@@ -155,8 +153,7 @@ sub SetupAgent () {
 
       ($status, @output) = Execute "$cmd 2>&1";
 
-      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-        if $status;
+      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
       verbose 'Starting clearagent';
     
@@ -164,15 +161,13 @@ sub SetupAgent () {
 
       ($status, @output) = Execute "$cmd 2>&1";
   
-      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-        if $status;
+      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
     } else {
       $cmd = 'update-rc.d clearagent defaults';
     
       ($status, @output) = Execute "$cmd 2>&1";
   
-      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-        if $status;
+      error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
       verbose 'Starting clearagent';
     
@@ -188,7 +183,7 @@ sub SetupAgent () {
   return;
 } # SetupAgent
 
-sub SetupTasks () {
+sub SetupTasks() {
   my ($status, @output, $cmd);
    
   verbose 'Setting up Tasks...';
@@ -196,16 +191,14 @@ sub SetupTasks () {
   # Symlink $CLEARADM/etc/conf.d/cleartasks -> /etc/init.d
   my $confdir = '/etc/init.d';
 
-  error "Cannot find conf.d directory ($confdir)", 1
-    unless -d $confdir;
+  error "Cannot find conf.d directory ($confdir)", 1 unless -d $confdir;
 
   unless (-e "$confdir/clearadm") {
     $cmd = "ln -s $FindBin::Bin/etc/init.d/cleartasks $confdir";
   
     ($status, @output) = Execute "$cmd 2>&1";
  
-    error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-      if $status;
+    error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
   } # unless
 
   # Setup runlevel links
@@ -213,8 +206,7 @@ sub SetupTasks () {
     
   ($status, @output) = Execute "$cmd 2>&1";
   
-  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-    if $status;
+  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
  
   verbose 'Starting cleartasks';
     
@@ -222,15 +214,14 @@ sub SetupTasks () {
   
   ($status, @output) = Execute "$cmd 2>&1";
   
-  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-    if $status;
+  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
   verbose 'Done';
         
   return;
 } # SetupTasks
  
-sub SetupWeb () {
+sub SetupWeb() {
   verbose 'Setting up Web...';
   
   my ($status, @output, $cmd);
@@ -238,8 +229,7 @@ sub SetupWeb () {
   # Symlink $CLEARADM/etc/conf.d/clearadm -> /etc/apache2/conf.d
   my $confdir = '/etc/apache2/conf.d';
 
-  error "Cannot find Apache 2 conf.d directory ($confdir)", 1
-    unless -d $confdir;
+  error "Cannot find Apache 2 conf.d directory ($confdir)", 1 unless -d $confdir;
 
   unless (-e "$confdir/clearadm") {
     $cmd = "ln -s $FindBin::Bin/etc/conf.d/clearadm $confdir";
@@ -266,7 +256,7 @@ sub SetupWeb () {
   return;
 } # SetupWeb
 
-sub SetupDatabase () {
+sub SetupDatabase() {
   verbose 'Setting up Database';
   
   my ($status, @output, $cmd);
@@ -277,8 +267,7 @@ sub SetupDatabase () {
   
   ($status, @output) = Execute "$cmd 2>&1";
   
-  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-    if $status;
+  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
   verbose 'Setting up database users';
         
@@ -286,8 +275,7 @@ sub SetupDatabase () {
   
   ($status, @output) = Execute "$cmd 2>&1";
   
-  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-    if $status;
+  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
   verbose 'Setting up predefined tasks';
         
@@ -295,8 +283,7 @@ sub SetupDatabase () {
   
   ($status, @output) = Execute "$cmd 2>&1";
   
-  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status
-    if $status;
+  error "Unable to execute $cmd (Status: $status)\n" . join("\n", @output), $status if $status;
 
   verbose 'Done';
   
@@ -312,15 +299,14 @@ Usage 'You must be root'
   
 my $package = 'all';
 
-GetOptions (
+GetOptions(
   usage       => sub { Usage },
   verbose     => sub { set_verbose },
   debug       => sub { set_debug },
   'package=s' => \$package,
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 # Announce ourselves
 verbose "$FindBin::Script V$VERSION";
index 1f7aba7..18419f4 100755 (executable)
@@ -48,7 +48,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr start_td end_td);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr start_td end_td);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -65,7 +65,7 @@ my $subtitle = 'Systems Status: All Systems';
 
 my $clearadm;
 
-sub DisplaySystems () {
+sub DisplaySystems() {
   display start_table {cellspacing => 1, class => 'main'};
   
   display start_Tr;
@@ -80,7 +80,7 @@ sub DisplaySystems () {
     display th {class => 'labelCentered'}, 'Load Avg';
   display end_Tr;
   
-  foreach ($clearadm->FindSystem) {
+  for ($clearadm->FindSystem) {
     my %system = %{$_};
   
     $system{alias}  = setField $system{alias},  'N/A';
@@ -174,7 +174,7 @@ sub DisplaySystems () {
       my $lastheardfromClass = 'dataCentered';
       my $lastheardfromData  = $system{lastheardfrom};
   
-      unless ($clearadm->SystemAlive (%system)) {
+      unless ($clearadm->SystemAlive(%system)) {
         $lastheardfromClass = 'dataCenteredAlert';
         $lastheardfromData  = a {
           href  => "alertlog.cgi?system=$system{name}",
@@ -189,16 +189,21 @@ sub DisplaySystems () {
       display td {class => $classRightTop}, "$load{loadavg} ",
         font {class => 'dim' }, "<br>$load{timestamp}";
       display td {class => $classRightTop}, $system{loadavgThreshold};
+
+      my $image = $system{loadavgsmall}
+        ? "data:image/png;base64,$system{loadavgsmall}"
+       : "plotloadavg.cgi?system=$system{name}&tiny=1";
+
       display td {class => $class}, 
         a {
           href => 
             "plot.cgi?type=loadavg&system=$system{name}&scaling=Hour&points=24"
         }, img {
-          src    => "plotloadavg.cgi?system=$system{name}&tiny=1",
+          src    => $image,
           border => 0,
         };
     display end_Tr;
-  } # foreach
+  } # for
 
   display end_table;
   
@@ -213,7 +218,7 @@ sub DisplaySystems () {
 } # DisplaySystems
 
 # Main
-GetOptions (
+GetOptions(
   usage   => sub { Usage },
   verbose => sub { set_verbose },
   debug   => sub { set_debug },
index 3447284..f76dfdd 100755 (executable)
@@ -15,27 +15,27 @@ use Utils;
 my $clearadm = new Clearadm;
 
 my %system = (
-  name                 => 'jupiter',
-  alias                        => 'defaria.com',
-  admin                        => 'Andrew DeFaria',
-  os                   => 'Linux defaria.com 2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux',
-  type                 => 'Linux',
+  name         => 'jupiter',
+  alias                => 'defaria.com',
+  admin                => 'Andrew DeFaria',
+  os           => 'Linux defaria.com 2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux',
+  type         => 'Linux',
   description  => 'Home server',
 );
 
 my %package = (
-  'system'             => 'jupiter',
-  'name'               => 'MySQL',
-  'version'            => '5.1',
+  'system'     => 'jupiter',
+  'name'       => 'MySQL',
+  'version'    => '5.1',
 );
 
 my %update;
 
 my %filesystem = (
-  'system'             => 'jupiter',
+  'system'     => 'jupiter',
   'filesystem' => '/dev/mapper/jupiter-root',
-  'fstype'             => 'ext3',
-  'mount'              => '/',
+  'fstype'     => 'ext3',
+  'mount'      => '/',
   'threshold'  => 90,
 );
 
@@ -57,26 +57,25 @@ GetOptions (
 sub DisplayRecord (%) {
   my (%record) = @_;
   
-  foreach (keys %record) {
-       if ($record{$_}) {
-         display "$_: $record{$_}";
-       } else {
-         display "$_: <undef>";
-       } # if
-  } # foreach
+  for (keys %record) {
+    if ($record{$_}) {
+      display "$_: $record{$_}";
+    } else {
+      display "$_: <undef>";
+    } # if
+  } # for
 } # DisplayRecord
 
-sub DisplayRecords (@) {
+sub DisplayRecords(@) {
   my (@records) = @_;
   
-  DisplayRecord %{$_}
-    foreach (@records);
+  DisplayRecord %{$_} for (@records);
 } # DisplayRecords
 
-sub TestSystem () {
+sub TestSystem() {
   verbose "Adding system $system{name}";
 
-  my ($err, $msg) = $clearadm->AddSystem (%system);
+  my ($err, $msg) = $clearadm->AddSystem(%system);
 
   if ($err == 1062) {
     warning 'You already have that record!';
@@ -85,16 +84,16 @@ sub TestSystem () {
   } # if
 
   verbose "Finding systems that match \'jup\'";
-  DisplayRecords $clearadm->FindSystem ('jup');
+  DisplayRecords $clearadm->FindSystem('jup');
 
   verbose "Getting record for \'jupiter\'";
-  DisplayRecord  $clearadm->GetSystem ('jupiter');
+  DisplayRecord  $clearadm->GetSystem('jupiter');
 
   verbose "Finding systems that match \'def\'";
-  DisplayRecords $clearadm->FindSystem ('def');
+  DisplayRecords $clearadm->FindSystem('def');
   
   verbose "Getting record for \'defaria.com\'";
-  DisplayRecord $clearadm->GetSystem ('defaria.com');
+  DisplayRecord $clearadm->GetSystem('defaria.com');
   
   %update = (
     'region' => 'East Coast',
@@ -102,16 +101,15 @@ sub TestSystem () {
 
   verbose "Updating system $system{name}";
 
-  ($err, $msg) = $clearadm->UpdateSystem ($system{name}, %update);
+  ($err, $msg) = $clearadm->UpdateSystem($system{name}, %update);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 } # TestaSystem
 
-sub TestPackage () {
+sub TestPackage() {
   verbose "Adding package $package{name}";
   
-  my ($err, $msg) = $clearadm->AddPackage (%package);
+  my ($err, $msg) = $clearadm->AddPackage(%package);
 
   if ($err == 1062) {
     warning 'You already have that record!';
@@ -120,108 +118,100 @@ sub TestPackage () {
   } # if
 
   %update = (
-    'vendor'           => 'ClearSCM',
-    'description'      => 'This is not ClearSCM\'s version of MySQL', 
+    'vendor'     => 'ClearSCM',
+    'description' => 'This is not ClearSCM\'s version of MySQL', 
   );
 
   verbose "Updating package $package{name}";
   
-  ($err, $msg) = $clearadm->UpdatePackage ($package{system}, $package{name}, %update);
+  ($err, $msg) = $clearadm->UpdatePackage($package{system}, $package{name}, %update);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   verbose "Finding packages for $system{name} that match \'My\'";
-  DisplayRecords $clearadm->FindPackage ($system{name}, 'My');
+  DisplayRecords $clearadm->FindPackage($system{name}, 'My');
 
   verbose ("Getting package for $system{name} record for \'MySQL\'");
-  DisplayRecord  $clearadm->GetPackage  ($system{name}, 'MySQL');
+  DisplayRecord  $clearadm->GetPackage($system{name}, 'MySQL');
 } # TestPackage
 
-sub TestFilesystem () {
+sub TestFilesystem() {
   verbose "Adding filesystem $filesystem{filesystem}";
   
-  my ($err, $msg) = $clearadm->AddFilesystem (%filesystem);
+  my ($err, $msg) = $clearadm->AddFilesystem(%filesystem);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
   
-  $filesystem{filesystem}      = '/dev/sda5';
-  $filesystem{path}                    = '/disk2';
+  $filesystem{filesystem} = '/dev/sda5';
+  $filesystem{path}      = '/disk2';
 
   verbose "Adding filesystem $filesystem{filesystem}";
   
-  ($err, $msg) = $clearadm->AddFilesystem (%filesystem);
+  ($err, $msg) = $clearadm->AddFilesystem(%filesystem);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   %update = (
-    'filesystem'       => '/dev/sdb5',
+    'filesystem' => '/dev/sdb5',
   );
 
   verbose "Updating filesystem $filesystem{filesystem}";
   
-  ($err, $msg) = $clearadm->UpdateFilesystem (
+  ($err, $msg) = $clearadm->UpdateFilesystem(
     $filesystem{system}, $filesystem{filesystem}, %update
   );
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   verbose "Finding filesystems for $system{name} that match \'My\'";
-  DisplayRecords $clearadm->FindFilesystem ($system{name}, 'root');
+  DisplayRecords $clearadm->FindFilesystem($system{name}, 'root');
 
   verbose ("Getting filesystem for $system{name} record for \'/dev/sdb5\'");
-  DisplayRecord  $clearadm->GetFilesystem ($system{name}, '/dev/sdb5');
+  DisplayRecord  $clearadm->GetFilesystem($system{name}, '/dev/sdb5');
 } # TestFilesystem
 
-sub TestVob () {
+sub TestVob() {
   verbose "Adding vob $vob{tag}";
 
-  my ($err, $msg) = $clearadm->AddVob (%vob);
+  my ($err, $msg) = $clearadm->AddVob(%vob);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
   
   $vob{tag} = '/vobs/clearscm_old';
 
   verbose "Adding vob $vob{tag}";
 
-  ($err, $msg) = $clearadm->AddVob (%vob);
+  ($err, $msg) = $clearadm->AddVob(%vob);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   verbose "Finding vobs that match \'clearscm\'";
-  DisplayRecords $clearadm->FindVob ('clearscm');
+  DisplayRecords $clearadm->FindVob('clearscm');
 
   verbose ("Getting vob for \'clearscm\'");
-  DisplayRecord  $clearadm->GetVob ('clearscm');
+  DisplayRecord  $clearadm->GetVob('clearscm');
 } # TestVob
 
-sub TestView () {
+sub TestView() {
   verbose "Adding view $view{tag}";
 
-  my ($err, $msg) = $clearadm->AddView (%view);
+  my ($err, $msg) = $clearadm->AddView(%view);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   $view{tag} = 'andrew2_view';
 
   verbose "Adding view $view{tag}";
 
-  ($err, $msg) = $clearadm->AddView (%view);
+  ($err, $msg) = $clearadm->AddView(%view);
 
-  error $msg, $err
-    if $err;
+  error $msg, $err if $err;
 
   verbose "Finding views that match \'andrew\'";
-  DisplayRecords $clearadm->FindView ('andrew');
+  DisplayRecords $clearadm->FindView('andrew');
 
   verbose ("Getting view for \'view\'");
-  DisplayRecord  $clearadm->GetView ('andrew');
+  DisplayRecord  $clearadm->GetView('andrew');
 } # TestView
 
 TestSystem;
@@ -233,8 +223,6 @@ TestView;
 ########################
 verbose "Deleting system $system{name}";
   
-my ($err, $msg) = $clearadm->DeleteSystem ($system{name});
+my ($err, $msg) = $clearadm->DeleteSystem($system{name});
 
-error $msg, $err
-  if $err;
-   
+error $msg, $err if $err;
index 6a82134..60b994e 100755 (executable)
@@ -250,7 +250,7 @@ my %opts;
 # Main
 my $startTime = time;
 
-GetOptions (
+GetOptions(
   \%opts,
   'usage'   => sub { Usage },
   'verbose' => sub { set_verbose },
index caa7d07..6308e35 100755 (executable)
@@ -73,17 +73,17 @@ my $clearexec = Clearexec->new;
 my ($host, $fs);
 
 # Given a host and a filesystem, formulate a fs record
-sub snapshotFS ($$) {
+sub snapshotFS($$) {
   my ($systemRef, $filesystem) = @_;
 
   my %system = %{$systemRef};
 
-  my %filesystem = $clearadm->GetFilesystem ($system{name}, $filesystem);
+  my %filesystem = $clearadm->GetFilesystem($system{name}, $filesystem);
   
   unless (%filesystem) {
-       error "Filesystem $host:$filesystem not in clearadm database - try adding it";
-       
-       return;
+    error "Filesystem $host:$filesystem not in clearadm database - try adding it";
+
+    return;
   } # unless
   
   my %fs = (
@@ -101,8 +101,8 @@ sub snapshotFS ($$) {
 
     if ($status != 0) {
       error ('Unable to determine fsinfo for '
-           . "$system{name}:$filesystem{mount} ($cmd)\n" .
-             join "\n", @unixfs);
+           . "$system{name}:$filesystem{mount} ($cmd)\n"
+           . join "\n", @unixfs);
    
       return;
     } # if
@@ -149,7 +149,7 @@ sub snapshotFS ($$) {
 } # snapshotFS
 
 # Main
-GetOptions (
+GetOptions(
   'usage'   => sub { Usage },
   'verbose' => sub { set_verbose },
   'debug'   => sub { set_debug },
@@ -157,8 +157,7 @@ GetOptions (
   'fs=s'    => \$fs,
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 # Announce ourselves
 verbose "$FindBin::Script V$VERSION";
@@ -168,7 +167,7 @@ my $exit = 0;
 for my $system ($clearadm->FindSystem ($host)) {
   next if $system->{active} eq 'false';
   
-  my $status = $clearexec->connectToServer (
+  my $status = $clearexec->connectToServer(
     $system->{name}, 
     $system->{port}
   );
@@ -181,10 +180,10 @@ for my $system ($clearadm->FindSystem ($host)) {
   for my $filesystem ($clearadm->FindFilesystem ($system->{name}, $fs)) {
     verbose "Snapshotting $system->{name}:$filesystem->{filesystem}";
   
-    my %fs = snapshotFS ($system, $filesystem->{filesystem});
+    my %fs = snapshotFS($system, $filesystem->{filesystem});
     
     if (%fs) {
-      my ($err, $msg) = $clearadm->AddFS (%fs);
+      my ($err, $msg) = $clearadm->AddFS(%fs);
   
       error $msg, $err if $err;
     } # if
@@ -211,7 +210,7 @@ for my $system ($clearadm->FindSystem ($host)) {
     error "Unable to update filesystem record $msg", $err if $err;
 
     # Check if over threshold
-    my %notification = $clearadm->GetNotification ('Filesystem');
+    my %notification = $clearadm->GetNotification('Filesystem');
 
     next unless %notification;
   
index 99b935e..250e06b 100755 (executable)
@@ -72,19 +72,18 @@ my $clearexec = Clearexec->new;
 my $host;
 
 # Given a host, formulate a loadavg record
-sub snapshotLoad ($) {
+sub snapshotLoad($) {
   my ($systemRef) = @_;
 
   my %system = %{$systemRef};
   
   my ($status, @output);
 
-  $status = $clearexec->connectToServer (
+  $status = $clearexec->connectToServer(
     $system{name}, $system{port}
   );
   
-  error "Unable to connect to system $system{name}:$system{port}", 1
-    unless $status;
+  error "Unable to connect to system $system{name}:$system{port}", 1 unless $status;
   
   verbose "Snapshotting load on $system{name}";
   
@@ -94,10 +93,9 @@ sub snapshotLoad ($) {
 
   my $cmd = 'uptime';
   
-  ($status, @output) = $clearexec->execute ($cmd);
+  ($status, @output) = $clearexec->execute($cmd);
 
-  return
-    if $status;
+  return if $status;
 
   # Parsing uptime is odd. Sometimes we get output like
   #
@@ -129,12 +127,11 @@ sub snapshotLoad ($) {
     my $loadvbs = 'c:/cygwin/opt/clearscm/clearadm/load.vbs';
     $cmd = "cscript /nologo $loadvbs";
        
-    ($status, @output) = $clearexec->execute ($cmd);
+    ($status, @output) = $clearexec->execute($cmd);
        
     chop @output if $output[0] =~ /\r/;
        
-    return
-      if $status;
+    return if $status;
          
     $load{loadavg} = $output[0] / 100;
   } # if
@@ -145,28 +142,27 @@ sub snapshotLoad ($) {
 } # snapshotLoad
 
 # Main
-GetOptions (
+GetOptions(
   'usage'   => sub { Usage },
   'verbose' => sub { set_verbose },
   'debug'   => sub { set_debug },
   'host=s'  => \$host,
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 # Announce ourselves
 verbose "$FindBin::Script V$VERSION";
 
 my $exit = 0;
 
-for my $system ($clearadm->FindSystem ($host)) {
+for my $system ($clearadm->FindSystem($host)) {
   next if $system->{active} eq 'false';
   
   my %load = snapshotLoad $system;
   
   if (%load) {
-    my ($err, $msg) = $clearadm->AddLoadavg (%load);
+    my ($err, $msg) = $clearadm->AddLoadavg(%load);
   
     error $msg, $err if $err;
   } else {
@@ -174,7 +170,7 @@ for my $system ($clearadm->FindSystem ($host)) {
   } # if
   
   # Check if over threshold
-  my %notification = $clearadm->GetNotification ('Loadavg');
+  my %notification = $clearadm->GetNotification('Loadavg');
 
   next unless %notification;
   
index f5fbb06..1073a85 100755 (executable)
@@ -85,10 +85,9 @@ sub GetFilesystems(%) {
          ? '/usr/xpg4/bin/df -l -P'
          : 'df -l -TP';
    
-  my ($status, @output) = $clearexec->execute ($cmd);
+  my ($status, @output) = $clearexec->execute($cmd);
   
-  error "Unable to execute $cmd - $! (Status: $status)\n" . join ("\n". @output), $status
-    if $status;
+  error "Unable to execute $cmd - $! (Status: $status)\n" . join ("\n". @output), $status if $status;
   
   # Real file systems start with "/"
   my @fs = grep { /^\// } @output;
@@ -114,19 +113,18 @@ sub GetFilesystems(%) {
   return @filesystems;
 } # GetFilesystems
 
-sub GatherSysInfo (;%) {
+sub GatherSysInfo(;%) {
   my (%system) = @_;
 
   # Set name if not currently set  
-  $system{name} = $host
-    unless $system{name};
+  $system{name} = $host unless $system{name};
     
   my ($status, @output);
   
   $system{port} ||= $port;
 
   # Connect to clearexec server
-  $status = $clearexec->connectToServer ($system{name}, $system{port});
+  $status = $clearexec->connectToServer($system{name}, $system{port});
 
   unless ($status) {
     warning "Unable to connect to $system{name}:$port";
@@ -136,10 +134,9 @@ sub GatherSysInfo (;%) {
   # Get OS info
   my $cmd = 'uname -a';
 
-  ($status, @output) = $clearexec->execute ($cmd);
+  ($status, @output) = $clearexec->execute($cmd);
   
-  error "Unable to execute '$cmd' - $!", $status . join ("\n". @output)
-    if $status;
+  error "Unable to execute '$cmd' - $!", $status . join("\n". @output) if $status;
   
   $system{os} = $output[0];
   
@@ -147,10 +144,9 @@ sub GatherSysInfo (;%) {
   
   $cmd = 'uname -s';
   
-  ($status, @output) = $clearexec->execute ($cmd);
+  ($status, @output) = $clearexec->execute($cmd);
 
-  error "Unable to execute '$cmd' - $!", $status . join ("\n". @output)
-    if $status;
+  error "Unable to execute '$cmd' - $!", $status . join("\n". @output) if $status;
   
   # TODO: Need to handle this better
   if ($output[0] =~ /sunos/i) {
@@ -164,7 +160,7 @@ sub GatherSysInfo (;%) {
   return %system;  
 } # GatherSysInfo
 
-sub AddFilesystems (%) {
+sub AddFilesystems(%) {
   my (%system) = @_;
 
   my ($err, $msg);
@@ -172,7 +168,7 @@ sub AddFilesystems (%) {
   for (GetFilesystems %system) {
     my %filesystem = %{$_};
     
-    my %oldfilesystem = $clearadm->GetFilesystem (
+    my %oldfilesystem = $clearadm->GetFilesystem(
       $filesystem{system},
       $filesystem{filesystem}
     );
@@ -180,31 +176,29 @@ sub AddFilesystems (%) {
     if (%oldfilesystem) {
       verbose "Updating filesystem $filesystem{system}:$filesystem{filesystem}";
       
-      ($err, $msg) = $clearadm->UpdateFilesystem (
+      ($err, $msg) = $clearadm->UpdateFilesystem(
         $filesystem{system},
         $filesystem{filesystem},
         %filesystem,
       );
       
       error 'Unable to update filesystem '
-          . "$filesystem{system}:$filesystem{filesystem}"
-        if $err;
+          . "$filesystem{system}:$filesystem{filesystem}" if $err;
     } else {
       verbose 'Adding filesystem '
             . "$filesystem{system}:$filesystem{filesystem}";
     
-      ($err, $msg) = $clearadm->AddFilesystem (%filesystem);
+      ($err, $msg) = $clearadm->AddFilesystem(%filesystem);
 
       error 'Unable to add filesystem '
-          . "$filesystem{system}:$filesystem{filesystem}"
-        if $err;
-    } # if      
+          . "$filesystem{system}:$filesystem{filesystem}" if $err;
+    } # if
   } # for
   
   return ($err, $msg);  
 } # AddFilesystems
 
-sub AddSystem ($) {
+sub AddSystem($) {
   my ($system) = @_;
   
   verbose "Adding newhost $system";
@@ -214,10 +208,9 @@ sub AddSystem ($) {
   # If GatherSysInfo was able to connect to clearagent it will set this field
   my $clearagent = delete $system{clearagent};
   
-  my ($err, $msg) = $clearadm->AddSystem (%system);
+  my ($err, $msg) = $clearadm->AddSystem(%system);
   
-  return ($err, $msg)
-    if $err;
+  return ($err, $msg) if $err;
     
   if ($clearagent) {
     return AddFilesystems %system;
@@ -226,12 +219,12 @@ sub AddSystem ($) {
   } # if
 } # AddSystem
 
-sub UpdateSystem (%) {
+sub UpdateSystem(%) {
   my (%system) = @_;
   
   my ($err, $msg);
   
-  %system = GatherSysInfo (%system);
+  %system = GatherSysInfo(%system);
   
   # If GatherSysInfo was able to connect to clearagent it will set this field
   my $clearagent = delete $system{clearagent};
@@ -240,7 +233,7 @@ sub UpdateSystem (%) {
   
   verbose "Updating existing host $system{name}";
   
-  ($err, $msg) = $clearadm->UpdateSystem ($system{name}, %system);
+  ($err, $msg) = $clearadm->UpdateSystem($system{name}, %system);
     
   return ($err, $msg) if $err;
 
@@ -255,7 +248,7 @@ sub UpdateSystem (%) {
 $host = hostname;
 $port = $Clearexec::CLEAROPTS{CLEAREXEC_PORT};
 
-GetOptions (
+GetOptions(
   'usage'   => sub { Usage },
   'verbose' => sub { set_verbose },
   'debug'   => sub { set_debug },
@@ -264,12 +257,10 @@ GetOptions (
   'port=s'  => \$port,
 ) or Usage "Invalid parameter";
 
-Usage 'Extraneous options: ' . join ' ', @ARGV
-  if @ARGV;
+Usage 'Extraneous options: ' . join ' ', @ARGV if @ARGV;
 
 if ($delete) {
-  error "Must specify -host if you specify -delete", 1
-    unless $host;
+  error "Must specify -host if you specify -delete", 1 unless $host;
 } # if
 
 # Announce ourselves
@@ -283,7 +274,7 @@ if ($delete) {
   my $answer = <STDIN>;
   
   if ($answer =~ /(y|yes)/i) {
-    ($err, $msg) = $clearadm->DeleteSystem ($host);
+    ($err, $msg) = $clearadm->DeleteSystem($host);
   
     if ($err == 0) {
        error "No host named $host in database";
@@ -300,18 +291,17 @@ if ($delete) {
     for ($clearadm->FindSystem) {
       my %system = %$_;
       
-      ($err, $msg) = UpdateSystem (%system);
+      ($err, $msg) = UpdateSystem(%system);
   
-      error "Unable to update host $system{name}\n$msg", $err
-        if $err;
+      error "Unable to update host $system{name}\n$msg", $err if $err;
     } # for
   } else {
-    my %system = $clearadm->GetSystem ($host);
+    my %system = $clearadm->GetSystem($host);
     
     if (%system) {
-      ($err, $msg) = UpdateSystem (%system);
+      ($err, $msg) = UpdateSystem(%system);
     } else {
-      ($err, $msg) = AddSystem ($host);
+      ($err, $msg) = AddSystem($host);
     } # if
 
     if ($err) {
old mode 100755 (executable)
new mode 100644 (file)
index 1b978d9..150237a
@@ -120,7 +120,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 use File::stat;
 use Time::localtime;
@@ -162,7 +162,7 @@ my $script     = 'http://'
 my %total;
 my $nbrThreshold;       # Number of views threshold - think top 10
 
-sub GenerateRegion ($) {
+sub GenerateRegion($) {
   my ($region) = @_;
 
   verbose "Processing region $region";
@@ -185,7 +185,7 @@ sub GenerateRegion ($) {
       verbose_nolf '.';
     }# if
 
-    my $view = Clearcase::View->new ($name, $region);
+    my $view = Clearcase::View->new($name, $region);
     
     my $gpath;
 
@@ -207,13 +207,13 @@ sub GenerateRegion ($) {
     # Note if the view server is unreachable (e.g. user puts view on laptop and
     # the laptop is powered off), then these fields will be undef. Change them
     # to Unknown. (Should Clearcase::View.pm do this instead?).
-    my $type   = $view->type;
-       $type ||= 'Unknown';
+    my $type      = $view->type;
+       $type    ||= 'dynamic';
+    my $ownerid   = $view->owner;
+       $ownerid ||= 'Unknown';
 
     my $user;
 
-    my $ownerid = $view->owner;
-
     if ($ownerid =~ /^\w+(\\|\/)(\w+)/) {
       # TODO: Handle user identification better
       #$user = User->new ($ownerid);
@@ -246,7 +246,6 @@ sub GenerateRegion ($) {
     my ($err, $msg);
 
     my %viewRec = (
-      system    => $view->shost,
       region    => $view->region,
       tag       => $view->tag,
       owner     => $ownerid,
@@ -266,7 +265,7 @@ sub GenerateRegion ($) {
 
       error "Unable to update view $name in Clearadm\n$msg", $err if $err;
     } else {
-      ($err, $msg) = $clearadm->AddView (%viewRec);
+      ($err, $msg) = $clearadm->AddView(%viewRec);
 
       error "Unable to add view $name to Clearadm\n$msg", $err if $err;
     } # if
@@ -280,12 +279,10 @@ sub GenerateRegion ($) {
 sub Generate ($) {
   my ($region) = @_;
 
-  if ($region =~ /all/i) {
-    for ($Clearcase::CC->regions) {
-      GenerateRegion $_;
-    } # for
-  } else {
+  if ($region) {
     GenerateRegion $region;
+  } else {
+    GenerateRegion $_ for $Clearcase::CC->regions;
   } # if
   
   return;
@@ -345,7 +342,7 @@ $view{tag},$view{owner},$view{type},$view{modified},$view{age},$view{ageSuffix}
   return;
 } # Report
 
-sub FormatTable ($@) {
+sub FormatTable($@) {
   my ($style, @views) = @_;
   
   my $table;
@@ -364,12 +361,12 @@ sub FormatTable ($@) {
 
   my $caption;
 
-  my $regionDropdown = start_form (
+  my $regionDropdown = start_form(
     -action => $script,
   );
 
   $regionDropdown .= font {-class => 'captionLabel'}, 'Region: ';
-  $regionDropdown .= popup_menu (
+  $regionDropdown .= popup_menu(
     -name     => 'region',
     -values   => [$Clearcase::CC->regions],
     -default  => $Clearcase::CC->region,
@@ -526,12 +523,12 @@ sub FormatTable ($@) {
 
 # TODO: Add an option to remove views older than a certain date
 
-sub EmailUser ($@) {
+sub EmailUser($@) {
   my ($emailTo, @oldViews) = @_;
 
   @oldViews = sort { $$b{age} <=> $$a{age} } @oldViews;
 
-  my $msg  = '<style>' . join ("\n", ReadFile 'viewager.css') . '</style>';
+  my $msg  = '<style>' . join("\n", ReadFile 'viewager.css') . '</style>';
      $msg .= <<"END";
 <h1 align="center">You have old Clearcase Views</h1>
 
@@ -582,7 +579,7 @@ which will stop it from being reported as old.</p>
 Your friendly Clearcase Administrator
 END
  
-  mail (
+  mail(
     to          => $emailTo,
 #    to          => 'Andrew@DeFaria.com',
     mode        => 'html',
@@ -593,7 +590,7 @@ END
   return
 } # EmailUser
 
-sub EmailUsers (@) {
+sub EmailUsers(@) {
   my (@views) = @_;
   
   @views = sort { $$a{ownerName} cmp $$b{ownerName} } @views;
@@ -604,16 +601,14 @@ sub EmailUsers (@) {
   for (@views) {
     my %view = %{$_};
 
-    next
-      unless $view{email};
+    next unless $view{email};
 
     if ($currUser ne $view{ownerName}) {
-      EmailUser $view{email}, @userViews
-        if @userViews;
+      EmailUser $view{email}, @userViews if @userViews;
 
       $currUser = $view{ownerName};
 
-      @userViews =();
+      @userViews = ();
     } else {
       if ($view{age} > $opts{ageThreshold}) {
         push @userViews, \%view
@@ -628,7 +623,7 @@ sub EmailUsers (@) {
 } # EmailUsers
 
 # Main
-GetOptions (
+GetOptions(
   \%opts,
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
@@ -654,8 +649,6 @@ verbose "$FindBin::Script v$VERSION";
 $clearadm = Clearadm->new;
 
 if ($opts{action} and $opts{action} eq 'generate') {
-  $opts{region} ||= 'all';
-
   Generate $opts{region};
   Stats \%total if $opts{verbose};
 } else {
@@ -668,10 +661,9 @@ if ($opts{action} and $opts{action} eq 'generate') {
   
   $opts{region} ||= $Clearcase::CC->region;
 
-  my @views = $clearadm->FindView (
-    'all',
-    $opts{region},
+  my @views = $clearadm->FindView(
     $opts{tag},
+    $opts{region},
     $opts{user}
   );
   
index ef9df9b..4daff35 100755 (executable)
@@ -52,7 +52,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -69,13 +69,9 @@ my %opts = Vars;
 
 my $subtitle = 'View Details';
 
-if ($Clearcase::CC->region) {
-  $opts{region} ||= $Clearcase::CC->region;
-} else {
-  $opts{region} ||= 'Clearcase not installed';
-} # if
+$opts{region} ||= $Clearcase::CC->region;
 
-my $VERSION  = '$Revision: 1.11 $';
+my $VERSION  = '$Revision: 1.12 $';
   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
 
 sub DisplayTable ($) {
@@ -216,17 +212,15 @@ sub DisplayTable ($) {
   return
 } # DisplayTable
 
-sub DisplayRegion {
+sub DisplayRegion() {
   display start_form (action => 'viewdetails.cgi');
 
   display 'Region ';
 
-  my ($defaultRegion, @regions) = ('', ('Clearcase not installed'));
-
   display popup_menu (
     -name     => 'region',
-    -values   => [@regions],
-    -default  => $defaultRegion,
+    -values   => [$Clearcase::CC->regions],
+    -default  => $Clearcase::CC->region,
     -onchange => 'submit();',
   );
 
@@ -239,7 +233,7 @@ sub DisplayRegion {
   return
 } # DisplayRegion
 
-sub DisplayViews ($) {
+sub DisplayViews($) {
   my ($region) = @_;
 
   my $views = Clearcase::Views->new ($region);
@@ -249,7 +243,7 @@ sub DisplayViews ($) {
     push @views, 'No Views';
   } # unless
 
-  display start_form (action => 'viewdetails.cgi');
+  display start_form(action => 'viewdetails.cgi');
 
   display 'Region ';
 
@@ -268,7 +262,7 @@ sub DisplayViews ($) {
      -onchange => 'submit();',
   );
 
-  display submit (
+  display submit(
     -value     => 'Go',
   );
 
@@ -278,7 +272,7 @@ sub DisplayViews ($) {
 } # DisplayViews
 
 # Main
-GetOptions (
+GetOptions(
   \%opts,
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
index f214c04..90639b0 100755 (executable)
@@ -51,7 +51,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -71,7 +71,7 @@ my $subtitle = 'View Servers';
 my $VERSION  = '$Revision: 1.9 $';
   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
 
-sub DisplayTable (@) {
+sub DisplayTable(@) {
   my (@viewServers) = @_;
 
   my $unknown = font {-class => 'unknown'}, 'Unknown';
@@ -98,7 +98,7 @@ sub DisplayTable (@) {
 
   my $i = 0;
 
-  foreach (@viewServers) {
+  for (@viewServers) {
     my $server = Clearcase::Server->new ($_, $opts{region});
 
     # Data fields
@@ -123,7 +123,7 @@ sub DisplayTable (@) {
         -class => 'data',
       }, $osVer;
     display end_Tr;
-  } # foreach
+  } # for
 
   display end_table;
   
@@ -131,7 +131,7 @@ sub DisplayTable (@) {
 } # DisplayTable
 
 # Main
-GetOptions (
+GetOptions(
   \%opts,
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
@@ -155,13 +155,13 @@ error "Unable to list all views in the region $opts{region}" . join ("\n", @outp
 
 my %viewServers;
 
-foreach (@output) {
+for (@output) {
   if (/Server host: (.*)/) {
     $viewServers{$1} = undef;
   } # if
-} # foreach
+} # for
 
-DisplayTable sort (keys (%viewServers));
+DisplayTable sort(keys(%viewServers));
 
 footing;
 
index 420700c..0fc968e 100755 (executable)
@@ -52,7 +52,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -78,7 +78,7 @@ if ($Clearcase::CC->region) {
 my $VERSION  = '$Revision: 1.11 $';
   ($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
 
-sub DisplayTable ($) {
+sub DisplayTable($) {
   my ($vob) = @_;
 
   my $active = ($vob->active) ? 'YES' : 'NO';
@@ -287,21 +287,21 @@ sub DisplayTable ($) {
   return;
 } # DisplayTable
 
-sub DisplayRegion {
+sub DisplayRegion() {
   display start_form (action => 'vobdetails.cgi');
 
   display 'Region ';
 
   my ($defaultRegion, @regions) = ('', ('Clearcase not installed'));
 
-  display popup_menu (
+  display popup_menu(
     -name     => 'region',
     -values   => [@regions],
     -default  => $defaultRegion,
     -onchange => 'submit();',
   );
 
-  display submit (
+  display submit(
     -value => 'Go',
   );
 
@@ -319,11 +319,11 @@ sub DisplayVobs($) {
     push @vobs, 'No VOBs';
   } # unless
 
-  display start_form (action => 'vobdetails.cgi');
+  display start_form(action => 'vobdetails.cgi');
 
   display 'Region ';
 
-  display popup_menu (
+  display popup_menu(
     -name     => 'region',
     -values   => [$Clearcase::CC->regions],
     -default  => $region,
@@ -332,13 +332,13 @@ sub DisplayVobs($) {
 
   display b ' VOB: ';
 
-  display popup_menu (
+  display popup_menu(
      -name     => 'vob',
      -values   => \@vobs,
      -onchange => 'submit();',
   );
 
-  display submit (
+  display submit(
     -value     => 'Go',
   );
 
@@ -348,7 +348,7 @@ sub DisplayVobs($) {
 } # DisplayVobs
 
 # Main
-GetOptions (
+GetOptions(
   \%opts,
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
@@ -376,7 +376,7 @@ unless ($opts{tag}) {
   exit;
 } # unless
 
-my $vob = Clearcase::Vob->new ($opts{tag}, $opts{region});
+my $vob = Clearcase::Vob->new($opts{tag}, $opts{region});
 
 DisplayTable $vob;
 
index 6748c9e..a50487e 100755 (executable)
@@ -51,7 +51,7 @@ use warnings;
 
 use FindBin;
 use Getopt::Long;
-use CGI qw (:standard :cgi-lib *table start_Tr end_Tr start_ol end_ol);
+use CGI qw(:standard :cgi-lib *table start_Tr end_Tr start_ol end_ol);
 use CGI::Carp 'fatalsToBrowser';
 
 use lib "$FindBin::Bin/lib", "$FindBin::Bin/../lib";
@@ -135,7 +135,7 @@ sub DisplayVobs($) {
   display end_table;
 } # DisplayVob
 
-sub DisplayTable (@) {
+sub DisplayTable(@) {
   my (@vobServers) = @_;
 
   my $unknown = font {-class => 'unknown'}, 'Unknown';
@@ -177,7 +177,7 @@ sub DisplayTable (@) {
   my $server;
 
   for (@vobServers) {
-    $server = Clearcase::Server->new ($_, $opts{region});
+    $server = Clearcase::Server->new($_, $opts{region});
 
     display start_Tr;
       display td {
@@ -323,7 +323,7 @@ sub DisplayTable (@) {
 } # DisplayTable
 
 # Main
-GetOptions (
+GetOptions(
   \%opts,
   'usage'        => sub { Usage },
   'verbose'      => sub { set_verbose },
@@ -345,8 +345,7 @@ my ($status, @output) = $Clearcase::CC->execute (
 );
 
 error "Unable to list all vobs in the region $opts{region}"
-    . join ("\n", @output), 1
-  if $status;
+    . join("\n", @output), 1 if $status;
 
 my %vobServers;
 
@@ -356,7 +355,7 @@ for (@output) {
   } # if
 } # for
 
-DisplayTable sort (keys (%vobServers));
+DisplayTable sort(keys(%vobServers));
 
 footing;
 
index 79dea02..3405e40 100644 (file)
@@ -127,7 +127,7 @@ use warnings;
 use Clearcase;
 use Display; 
 
-sub new ($;$) {
+sub new($;$) {
   my ($class, $tag, $region) = @_;
 
 =pod
@@ -170,14 +170,19 @@ Returns:
 
 =cut
 
-  my $self = bless { tag => $tag }, $class;
+  $region ||= $Clearcase::CC->region;
+
+  my $self = bless {
+    tag    => $tag,
+    region => $region
+  }, $class;
 
-  $self->updateViewInfo ($region);
+  $self->updateViewInfo;
 
   return $self;
 } # new
   
-sub accessed_by () {
+sub accessed_by() {
   my ($self) = @_;
    
 =pod
@@ -215,7 +220,7 @@ Returns:
   return $self->{accessed_by};
 } # accessed_by
 
-sub accessed_date () {
+sub accessed_date() {
   my ($self) = @_;
      
 =pod
@@ -253,7 +258,7 @@ Returns:
   return $self->{accessed_date};
 } # accessed_date
 
-sub access_path () {
+sub access_path() {
   my ($self) = @_;
    
 =pod
@@ -291,7 +296,7 @@ Returns:
   return $self->{access_path};
 } # access_path
 
-sub active () {
+sub active() {
   my ($self) = @_;
   
 =pod
@@ -329,7 +334,7 @@ Returns:
   return $self->{active};
 } # active
 
-sub additional_groups () {
+sub additional_groups() {
   my ($self) = @_;
   
 =pod
@@ -372,7 +377,7 @@ Returns:
   } # if
 } # additional_groups
 
-sub created_by () {
+sub created_by() {
   my ($self) = @_;
   
 =pod
@@ -410,7 +415,7 @@ Returns:
   return $self->{created_by};
 } # created_by
 
-sub created_date () {
+sub created_date() {
    my ($self) = @_;
    
 =pod
@@ -448,7 +453,7 @@ Returns:
   return $self->{created_date};
 } # created_date
 
-sub cs_updated_by () {
+sub cs_updated_by() {
   my ($self) = @_;
   
 =pod
@@ -486,7 +491,7 @@ Returns:
   return $self->{cs_updated_by};
 } # cs_updated_by
 
-sub cs_updated_date () {
+sub cs_updated_date() {
   my ($self) = @_;
 
 =pod
@@ -524,7 +529,7 @@ Returns:
   return $self->{cs_updated_date};
 } # cs_updated_date
 
-sub dynamic () {
+sub dynamic() {
   my ($self) = @_;
   
 =pod
@@ -559,10 +564,11 @@ Returns:
 
 =cut
 
+  return unless $self->{type};
   return $self->type eq 'dynamic';
 } # dynamic
 
-sub gpath () {
+sub gpath() {
   my ($self) = @_;
   
 =pod
@@ -600,7 +606,7 @@ Returns:
   return $self->{gpath};
 } # gpath
 
-sub group () {
+sub group() {
   my ($self) = @_;
   
 =pod
@@ -638,7 +644,7 @@ Returns:
   return $self->{group};
 } # group
 
-sub group_mode () {
+sub group_mode() {
   my ($self) = @_;
   
 =pod
@@ -676,7 +682,7 @@ Returns:
   return $self->{group_mode};
 } # group_mode
 
-sub host () {
+sub host() {
   my ($self) = @_;
   
 =pod
@@ -714,7 +720,7 @@ Returns:
   return $self->{host};
 } # host
 
-sub mode () {
+sub mode() {
   my ($self) = @_;
   
 =pod
@@ -752,7 +758,7 @@ Returns:
   return $self->{mode};
 } # mode
 
-sub modified_by () {
+sub modified_by() {
   my ($self) = @_;
   
 =pod
@@ -790,7 +796,7 @@ Returns:
   return $self->{modified_by};
 } # modified_by
 
-sub modified_date () {
+sub modified_date() {
   my ($self) = @_;
   
 =pod
@@ -828,7 +834,7 @@ Returns:
   return $self->{modified_date};
 } # modified_date
 
-sub other_mode () {
+sub other_mode() {
   my ($self) = @_;
   
 =pod
@@ -866,7 +872,7 @@ Returns:
   return $self->{other_mode};
 } # other_mode
 
-sub owner () {
+sub owner() {
   my ($self) = @_;
   
 =pod
@@ -904,7 +910,7 @@ Returns:
   return $self->{owner}
 } # owner
 
-sub owner_mode () {
+sub owner_mode() {
   my ($self) = @_;
   
 =pod
@@ -942,7 +948,7 @@ Returns:
   return $self->{owner_mode}
 } # owner_mode
 
-sub properties () {
+sub properties() {
   my ($self) = @_;
   
 =pod
@@ -980,7 +986,7 @@ Returns:
   return $self->{properties};
 } # properties
 
-sub region () {
+sub region() {
   my ($self) = @_;
   
 =pod
@@ -1018,7 +1024,7 @@ Returns:
   return $self->{region};
 } # region
 
-sub shost () {
+sub shost() {
   my ($self) = @_;
   
 =pod
@@ -1056,7 +1062,7 @@ Returns:
   return $self->{shost};
 } # shost
 
-sub snapshot () {
+sub snapshot() {
   my ($self) = @_;
   
 =pod
@@ -1091,10 +1097,11 @@ Returns:
 
 =cut
 
+  return unless $self->{type};
   return $self->type eq 'snapshot';
 } # snapshot
 
-sub webview () {
+sub webview() {
   my ($self) = @_;
   
 =pod
@@ -1129,10 +1136,11 @@ Returns:
 
 =cut
 
-  return $self->type eq 'webview';
+  return unless $self->{type};
+  return $self->{type} eq 'webview';
 } # webview
 
-sub tag () {
+sub tag() {
   my ($self) = @_;
   
 =pod
@@ -1170,7 +1178,7 @@ Returns:
   return $self->{tag};
 } # tag
 
-sub text_mode () {
+sub text_mode() {
   my ($self) = @_;
   
 =pod
@@ -1208,7 +1216,7 @@ Returns:
   return $self->{text_mode};
 } # tag
 
-sub type () {
+sub type() {
   my ($self) = @_;
   
 =pod
@@ -1243,10 +1251,10 @@ Returns:
 
 =cut
 
-  return $self->{type} ? $self->{type} : 'Unknown';
+  return $self->{type};
 } # type
 
-sub ucm () {
+sub ucm() {
   my ($self) = @_;
   
 =pod
@@ -1284,7 +1292,7 @@ Returns:
   return $self->{ucm};
 } # ucm
 
-sub uuid () {
+sub uuid() {
   my ($self) = @_;
   
 =pod
@@ -1322,7 +1330,7 @@ Returns:
   return $self->{uuid};
 } # uuid
 
-sub exists () {
+sub exists() {
   my ($self) = @_;
 
 =pod
@@ -1357,12 +1365,12 @@ Returns:
 
 =cut
 
-  my ($status, @output) = $Clearcase::CC->execute ("lsview $self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("lsview -region $self->{region} $self->{tag}");
   
   return !$status;
 } # exists
 
-sub create (;$$$) {
+sub create(;$$$) {
   my ($self, $host, $vws, $region) = @_;
     
 =pod
@@ -1412,7 +1420,7 @@ Ouput from cleartool
   $region ||= $Clearcase::CC->region;
 
   if ($self->exists) {
-    $self->updateViewInfo ($region);
+    $self->updateViewInfo;
       
     return (0, ())
   } # if
@@ -1421,21 +1429,21 @@ Ouput from cleartool
     
   if ($host && $vws) {
     ($status, @output) = 
-      $Clearcase::CC->execute ("mkview -tag $self->{tag} -region $region "
+      $Clearcase::CC->execute("mkview -tag $self->{tag} -region $region "
                           .    "-host $host -hpath $vws -gpath $vws $vws");
   } else {
     # Note this requires that -stgloc's work and that using -auto is not a 
     # problem.
     ($status, @output) =
-       $Clearcase::CC->execute ("mkview -tag $self->{tag} -stgloc -auto");
+       $Clearcase::CC->execute("mkview -tag $self->{tag} -stgloc -auto");
   } # if
 
-  $self->updateViewInfo ($region);
+  $self->updateViewInfo;
 
   return ($status, @output);
 } # create
   
-sub createUCM ($$) {
+sub createUCM($$) {
   my ($self, $stream, $pvob, $region) = @_;
 
 =pod
@@ -1493,18 +1501,18 @@ Array of output
     
   # Need to create the view
   my ($status, @output) = 
-    $Clearcase::CC->execute ("mkview -tag $self->{tag} -stream " 
+    $Clearcase::CC->execute("mkview -tag $self->{tag} -stream " 
                            . "$self->{stream}\@$self->{pvob} -stgloc -auto");
  
   return ($status, @output)
     if $status;
       
-  $self->updateViewInfo ($region);
+  $self->updateViewInfo;
 
   return ($status, @output);
 } # createUCM
 
-sub remove () {
+sub remove() {
   my ($self) = @_;
 
 =pod
@@ -1551,12 +1559,12 @@ Ouput from cleartool
   my ($status, @output);
 
   if ($self->dynamic) {
-    ($status, @output) = $Clearcase::CC->execute (
+    ($status, @output) = $Clearcase::CC->execute(
        "rmview -force -tag $self->{tag}"
      );
   } else {
     error 'Removal of snapshot views not implemented yet', 1;
-    #($status, @output) = $Clearcase::CC->execute (
+    #($status, @output) = $Clearcase::CC->execute(
     #  "rmview -force $self->{snapshot_view_pname}"
     #);
   } # if
@@ -1564,7 +1572,7 @@ Ouput from cleartool
   return ($status, @output);
 } # remove
 
-sub start () {
+sub start() {
   my ($self) = @_;
 
 =pod
@@ -1605,10 +1613,10 @@ Ouput from cleartool
 
 =cut
 
-  return $Clearcase::CC->execute ("startview $self->{tag}");
+  return $Clearcase::CC->execute("startview $self->{tag}");
 } # start
 
-sub stop () {
+sub stop() {
   my ($self) = @_;
 
 =pod
@@ -1649,10 +1657,10 @@ Ouput from cleartool
 
 =cut
 
-  return $Clearcase::CC->execute ("endview $self->{tag}");
+  return $Clearcase::CC->execute("endview $self->{tag}");
 } # stop
 
-sub kill () {
+sub kill() {
   my ($self) = @_;
 
 =pod
@@ -1693,10 +1701,10 @@ Ouput from cleartool
 
 =cut
 
-  return $Clearcase::CC->execute ("endview -server $self->{tag}");
+  return $Clearcase::CC->execute("endview -server $self->{tag}");
 } # kill
 
-sub set () {
+sub set() {
   my ($self) = @_;
 
 =pod
@@ -1744,15 +1752,15 @@ Ouput from cleartool
   return ($status, @output);
 } # set
 
-sub updateViewInfo ($$) {
-  my ($self, $region) = @_;
-
-  $region ||= $Clearcase::CC->region;
+sub updateViewInfo($$) {
+  my ($self) = @_;
 
-  my ($status, @output) = $Clearcase::CC->execute (
-    "lsview -region $region -long -properties -full $self->{tag}"
+  my ($status, @output) = $Clearcase::CC->execute(
+    "lsview -region $self->{region} -long -properties -full $self->{tag}"
   );
 
+  return if $status;
+
   # Assuming this view is an empty shell of an object that the user may possibly
   # use the create method on, return our blessings...
 
@@ -2167,7 +2175,7 @@ Returns:
 sub updateViewSpace() {
   my ($self) = @_;
 
-  my ($status, @output) = $Clearcase::CC->execute (
+  my ($status, @output) = $Clearcase::CC->execute(
     "space -region $self->{region} -view $self->{tag}"
   );
 
index 596fafb..f8c636b 100644 (file)
@@ -98,8 +98,8 @@ use warnings;
 use Clearcase;
 use OSDep;
 
-sub new ($) {
-  my ($class, $tag) = @_;
+sub new($;$) {
+  my ($class, $tag, $region) = @_;
 
 =pod
 
@@ -141,8 +141,11 @@ Returns:
 
 =cut
 
+  $region ||= $Clearcase::CC->region;
+
   $class = bless {
-    tag => $tag
+    tag    => $tag,
+    region => $region,
   }, $class;
 
   $class->updateVobInfo;
@@ -150,7 +153,7 @@ Returns:
   return $class;
 } # new
 
-sub tag () {
+sub tag() {
   my ($self) = @_;
    
 =pod
@@ -188,7 +191,7 @@ Returns:
   return $self->{tag};
 } # tag
 
-sub gpath () {
+sub gpath() {
   my ($self) = @_;
   
 =pod
@@ -226,7 +229,7 @@ Returns:
   return $self->{gpath};
 } # gpath
 
-sub shost () {
+sub shost() {
   my ($self) = @_;
   
 =pod
@@ -268,7 +271,8 @@ Returns:
 sub name() {
   goto &tag;
 } # name
-sub access () {
+
+sub access() {
   my ($self) = @_;
   
 =pod
@@ -308,7 +312,7 @@ Returns either public for public VOBs or private for private VOBs
   return $self->{access};
 } # access
 
-sub mopts () {
+sub mopts() {
   my ($self) = @_;
   
 =pod
@@ -346,7 +350,7 @@ Returns:
   return $self->{mopts};
 } # mopts
 
-sub region () {
+sub region() {
   my ($self) = @_;
   
 =pod
@@ -384,7 +388,7 @@ Returns:
   return $self->{region};
 } # region
 
-sub active () {
+sub active() {
   my ($self) = @_;
   
 =pod
@@ -423,7 +427,7 @@ Returns:
   return $self->{active};
 } # active
 
-sub replica_uuid () {
+sub replica_uuid() {
   my ($self) = @_;
   
 =pod
@@ -461,7 +465,7 @@ Returns:
   return $self->{replica_uuid};
 } # replica_uuid
 
-sub host () {
+sub host() {
   my ($self) = @_;
   
 =pod
@@ -499,7 +503,7 @@ Returns:
   return $self->{host};
 } # host
 
-sub access_path () {
+sub access_path() {
   my ($self) = @_;
   
 =pod
@@ -539,7 +543,7 @@ This is the path relative to the VOB's host
   return $self->{access_path};
 } # access_path
 
-sub family_uuid () {
+sub family_uuid() {
   my ($self) = @_;
   
 =pod
@@ -577,7 +581,7 @@ Returns:
   return $self->{family_uuid};
 } # family_uuid
 
-sub vob_registry_attributes () {
+sub vob_registry_attributes() {
   my ($self) = @_;
   
 =pod
@@ -615,7 +619,7 @@ Returns:
   return $self->{vob_registry_attributes};
 } # vob_registry_attributes
 
-sub expand_space () {
+sub expand_space() {
   my ($self) = @_;
 
   my ($status, @output) = $Clearcase::CC->execute ("space -vob $self->{tag}");
@@ -647,10 +651,10 @@ sub expand_space () {
   return;
 } # expand_space
 
-sub expand_description () {
+sub expand_description() {
   my ($self) = @_;
 
-  my ($status, @output) = $Clearcase::CC->execute ("describe -long vob:$self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("describe -long vob:$self->{tag}");
 
   for (my $i = 0; $i < @output; $i++) {
     if ($output[$i] =~ /created (\S+) by (.+) \((\S+)\)/) {
@@ -1353,7 +1357,7 @@ Returns:
   return %{$self->{hyperlinks}};
 } # hyperlinks
 
-sub countdb () {
+sub countdb() {
   my ($self) = @_;
 
   # Set values to zero in case we cannot get the right values from countdb
@@ -1367,13 +1371,13 @@ sub countdb () {
   chomp $cwd;
   chdir "$self->{gpath}/db";
 
-   my $cmd    = "$Clearcase::COUNTDB vob_db 2>&1";
-   my @output = `$cmd`;
+  my $cmd    = "$Clearcase::COUNTDB vob_db 2>&1";
+  my @output = `$cmd`;
 
-   if ($? != 0) {
-     chdir $cwd;
-     return;
-    }    # if
+  if ($? != 0) {
+    chdir $cwd;
+    return;
+  } # if
 
   chomp @output;
 
@@ -1393,7 +1397,7 @@ sub countdb () {
   return;
 } # countdb
 
-sub elements () {
+sub elements() {
   my ($self) = @_;
 
 =pod
@@ -1433,7 +1437,7 @@ Returns:
   return $self->{elements};
 } # elements
 
-sub branches () {
+sub branches() {
   my ($self) = @_;
 
 =pod
@@ -1473,7 +1477,7 @@ Returns:
   return $self->{branches};
 } # branches
 
-sub versions () {
+sub versions() {
   my ($self) = @_;
 
 =pod
@@ -1513,7 +1517,7 @@ Returns:
   return $self->{versions};
 } # versions
 
-sub dbsize () {
+sub dbsize() {
   my ($self) = @_;
 
 =pod
@@ -1553,7 +1557,7 @@ Returns:
   return $self->{dbsize};
 } # dbsize
 
-sub admsize () {
+sub admsize() {
   my ($self) = @_;
 
 =pod
@@ -1593,7 +1597,7 @@ Returns:
   return $self->{admsize};
 } # admsize
 
-sub ctsize () {
+sub ctsize() {
   my ($self) = @_;
 
 =pod
@@ -1633,7 +1637,7 @@ Returns:
   return $self->{ctsize};
 } # ctsize
 
-sub dosize () {
+sub dosize() {
   my ($self) = @_;
 
 =pod
@@ -1673,7 +1677,7 @@ Returns:
   return $self->{dosize};
 } # dosize
 
-sub srcsize () {
+sub srcsize() {
   my ($self) = @_;
 
 =pod
@@ -1713,7 +1717,7 @@ Returns:
   return $self->{srcsize};
 } # srcsize
 
-sub size () {
+sub size() {
   my ($self) = @_;
 
 =pod
@@ -1753,7 +1757,7 @@ Returns:
   return $self->{size};
 } # size
 
-sub mount () {
+sub mount() {
   my ($self) = @_;
 
 =pod
@@ -1796,12 +1800,12 @@ An array of lines output from the cleartool mount command
 
   return 0 if $self->{active} && $self->{active} eq "YES";
 
-  my ($status, @output) = $Clearcase::CC->execute ("mount $self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("mount $self->{tag}");
 
   return ($status, @output);
 } # mount
 
-sub umount () {
+sub umount() {
   my ($self) = @_;
 
 =pod
@@ -1842,12 +1846,12 @@ Ouput from cleartool
 
 =cut
 
-  my ($status, @output) = $Clearcase::CC->execute ("umount $self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("umount $self->{tag}");
 
   return ($status, @output);
 } # umount
 
-sub exists () {
+sub exists() {
   my ($self) = @_;
 
 =pod
@@ -1882,12 +1886,12 @@ Returns:
 
 =cut
 
-  my ($status, @output) = $Clearcase::CC->execute ("lsvob $self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("lsvob -region $self->{region} $self->{tag}");
 
   return !$status;
 } # exists
 
-sub create (;$$$%) {
+sub create(;$$$%) {
   my ($self, $host, $vbs, $comment, %opts) = @_;
 
 =pod
@@ -1956,14 +1960,14 @@ Ouput from cleartool
   if ($host && $vbs) {
     $additionalOpts .= '-ucmproject' if $self->{ucmproject};
 
-    ($status, @output) = $Clearcase::CC->execute (
+    ($status, @output) = $Clearcase::CC->execute(
       "mkvob -tag $self->{tag} $comment $additionalOpts -host $host -hpath $vbs "
     . "-gpath $vbs $vbs");
   } else {
     # Note this requires that -stgloc's work and that using -auto is not a 
     # problem.
     ($status, @output) =
-      $Clearcase::CC->execute ("mkvob -tag $self->{tag} $comment $additionalOpts -stgloc -auto");
+      $Clearcase::CC->execute("mkvob -tag $self->{tag} $comment $additionalOpts -stgloc -auto");
   } # if
 
   $self->updateVobInfo;
@@ -1971,7 +1975,7 @@ Ouput from cleartool
   return ($status, @output);
 } # create
 
-sub remove () {
+sub remove() {
   my ($self) = @_;
 
 =pod
@@ -2012,13 +2016,13 @@ Ouput from cleartool
 
 =cut
 
-  return $Clearcase::CC->execute ("rmvob -force $self->{gpath}");
+  return $Clearcase::CC->execute("rmvob -force $self->{gpath}");
 } # remove
 
 sub updateVobInfo ($$) {
   my ($self) = @_;
 
-  my ($status, @output) = $Clearcase::CC->execute ("lsvob -long $self->{tag}");
+  my ($status, @output) = $Clearcase::CC->execute("lsvob -long $self->{tag}");
 
   # Assuming this vob is an empty shell of an object that the user may possibly
   # use the create method on, return our blessings...
index 40a581e..6c8164f 100644 (file)
@@ -102,11 +102,11 @@ my $SECS_IN_HOUR = $SECS_IN_MIN * 60;
 my $SECS_IN_DAY  = $SECS_IN_HOUR * 24;
 
 # Forwards
-sub Today2SQLDatetime();
-sub DateToEpoch($);
-sub EpochToDate($);
+sub Today2SQLDatetime ();
+sub DateToEpoch ($);
+sub EpochToDate ($);
 
-sub ymdhms(;$) {
+sub ymdhms {
   my ($time) = @_;
 
   $time ||= time;
@@ -121,7 +121,7 @@ sub ymdhms(;$) {
     $wday,
     $yday,
     $isdst
-  ) = localtime($time);
+  ) = localtime ($time);
 
   # Adjust month
   $mon++;
@@ -139,7 +139,7 @@ sub ymdhms(;$) {
   return $year, $mon, $mday, $hour, $min, $sec;
 } # ymdhms
 
-sub julian($$$) {
+sub julian ($$$) {
   my ($year, $month, $day) = @_;
 
   my $days = 0;
@@ -154,19 +154,19 @@ sub julian($$$) {
   return $days + $day;
 } # julian
 
-sub _is_leap_year($) {
+sub _is_leap_year ($) {
   my ($year) = @_;
-
+  
   return 0 if $year % 4;
   return 1 if $year % 100;
   return 0 if $year % 400;
-
+  
   return 1; 
 } # _is_leap_year
 
-sub Add($%) {
+sub Add ($%) {
   my ($datetime, %parms) = @_;
-
+  
 =pod
 
 =head2 Add ($datetime, %parms)
@@ -192,7 +192,7 @@ Hash of parms. Acceptable values are of the following format:
  hours   => $hours
  days    => $days
  month   => $month
-
 Note that month will simply increment the month number, adjusting for overflow
 of year if appropriate. Therefore a date of 2/28/2001 would increase by 1 month
 to yield 3/28/2001. And, unfortunately, an increase of 1 month to 1/30/2011 
@@ -223,47 +223,47 @@ Returns:
     'days',
     'months',
   );
-
-  for (keys %parms) {
-    unless (InArray($_, @validKeys)) {
+  
+  foreach (keys %parms) {
+    unless (InArray ($_, @validKeys)) {
       croak "Invalid key in DateUtils::Add: $_";
     } # unless
-  } # for
-
+  } # foreach
+  
   my $epochTime = DateToEpoch $datetime;
-
+  
   my $amount = 0;
-
+  
   $parms{seconds} ||= 0;
   $parms{minutes} ||= 0;
   $parms{hours}   ||= 0;
   $parms{days}    ||= 0;
-
+  
   $amount += $parms{days}    * $SECS_IN_DAY;
   $amount += $parms{hours}   * $SECS_IN_HOUR;
   $amount += $parms{minutes} * $SECS_IN_MIN;
   $amount += $parms{seconds};
-
+    
   $epochTime += $amount;
 
   $datetime = EpochToDate $epochTime;
-
+  
   if ($parms{month}) {
     my $years  = $parms{month} / 12;
     my $months = $parms{month} % 12;
-
+     
     my $month = substr $datetime, 5, 2;
-
+    
     $years += ($month + $months) / 12;
-    substr($datetime, 5, 2) = ($month + $months) % 12;
-
-    substr($datetime, 0, 4) = substr ($datetime, 0, 4) + $years;
+    substr ($datetime, 5, 2) = ($month + $months) % 12;
+    
+    substr ($datetime, 0, 4) = substr ($datetime, 0, 4) + $years;
   } # if
-
+  
   return $datetime;
 } # Add
 
-sub Age($) {
+sub Age ($) {
   my ($timestamp) = @_;
 
 =pod
@@ -312,13 +312,13 @@ Returns:
   my $timestamp_days = julian $timestamp_year, $month, $day;
 
   if ($timestamp_year > $today_year or
-     ($timestamp_days > $today_days and $timestamp_year == $today_year)) {
+      ($timestamp_days > $today_days and $timestamp_year == $today_year)) {
     return;
   } else {
     my $leap_days = 0;
 
     for (my $i = $timestamp_year; $i < $today_year; $i++) {
-
+       
       $leap_days++ if $i % 4 == 0;
     } # for
 
@@ -327,9 +327,9 @@ Returns:
   } # if
 } # Age
 
-sub Compare($$) {
+sub Compare ($$) {
   my ($date1, $date2) = @_;
-
+  
 =pod
 
 =head2 Compare ($date2, $date2)
@@ -372,9 +372,9 @@ Returns:
   return DateToEpoch ($date1) <=> DateToEpoch ($date2);
 } # Compare
 
-sub DateToEpoch($) {
+sub DateToEpoch ($) {
   my ($date) = @_;
-
+  
 =pod
 
 =head2 DateToEpoch ($datetime)
@@ -415,13 +415,13 @@ Returns:
   my $hour    = substr $date, 11, 2;
   my $minute  = substr $date, 14, 2;
   my $seconds = substr $date, 17, 2;
-
+  
   my $days;
 
   for (my $i = 1970; $i < $year; $i++) {
     $days += _is_leap_year ($i) ? 366 : 365;
   } # for
-
+  
   my @monthDays = (
     0,
     31, 
@@ -436,23 +436,23 @@ Returns:
     304,
     334,
   );
-
+  
   $days += $monthDays[$month - 1];
-
+  
   $days++
     if _is_leap_year ($year) and $month > 2;
-
+    
  $days += $day - 1;
-
+  
   return ($days   * $SECS_IN_DAY)
        + ($hour   * $SECS_IN_HOUR)
        + ($minute * $SECS_IN_MIN)
        + $seconds;
 } # DateToEpoch
 
-sub EpochToDate($) {
+sub EpochToDate ($) {
   my ($epoch) = @_;
-
+  
 =pod
 
 =head2 EpochToDate ($epoch)
@@ -491,19 +491,19 @@ Returns:
   my ($month, $day, $hour, $minute, $seconds);
   my $leapYearSecs = 366 * $SECS_IN_DAY;
   my $yearSecs     = $leapYearSecs - $SECS_IN_DAY;
-
+  
   while () {
     my $amount = _is_leap_year ($year) ? $leapYearSecs : $yearSecs;
-
+    
     last
       if $amount > $epoch;
-
+      
     $epoch -= $amount;
     $year++;
   } # while
-
-  my $leapYearAdjustment = _is_leap_year($year) ? 1 : 0;
-
+  
+  my $leapYearAdjustment = _is_leap_year ($year) ? 1 : 0;
+  
   if ($epoch >= (334 + $leapYearAdjustment) * $SECS_IN_DAY) {
     $month = '12';
     $epoch -= (334 + $leapYearAdjustment) * $SECS_IN_DAY;
@@ -541,24 +541,24 @@ Returns:
     $month = '01';
   } # if
 
-  $day     = int(($epoch / $SECS_IN_DAY) + 1);
+  $day     = int (($epoch / $SECS_IN_DAY) + 1);
   $epoch   = $epoch % $SECS_IN_DAY;
-  $hour    = int($epoch / $SECS_IN_HOUR);
+  $hour    = int ($epoch / $SECS_IN_HOUR);
   $epoch   = $epoch % $SECS_IN_HOUR;
-  $minute  = int($epoch / $SECS_IN_MIN);
+  $minute  = int ($epoch / $SECS_IN_MIN);
   $seconds = $epoch % $SECS_IN_MIN;
-
+  
   $day     = "0$day"     if $day     < 10;
   $hour    = "0$hour"    if $hour    < 10;
   $minute  = "0$minute"  if $minute  < 10;
   $seconds = "0$seconds" if $seconds < 10;
-
+  
   return "$year-$month-$day $hour:$minute:$seconds";
 } # EpochToDate
 
-sub UTCTime($) {
+sub UTCTime ($) {
   my ($datetime) = @_;
-
+  
 =pod
 
 =head2 UTCTime ($epoch)
@@ -594,10 +594,10 @@ Returns:
 =cut
 
   my @localtime = localtime;
-  my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(
+  my ($sec, $min, $hour, $mday, $mon, $year) = gmtime (
     DateToEpoch ($datetime) - (timegm (@localtime) - timelocal (@localtime))
   );
-
+      
   $year += 1900;
   $mon++;
 
@@ -606,13 +606,13 @@ Returns:
   $hour = '0' . $hour if $hour < 10;  
   $mon  = '0' . $mon  if $mon  < 10;
   $mday = '0' . $mday if $mday < 10;
-
+      
   return "$year-$mon-${mday}T$hour:$min:${sec}Z";  
 } # UTCTime
 
-sub UTC2Localtime($) {
+sub UTC2Localtime ($) {
   my ($utcdatetime) = @_;
-
+  
   # If the field does not look like a UTC time then just return it.
   return $utcdatetime unless $utcdatetime =~ /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/;
 
@@ -626,7 +626,7 @@ sub UTC2Localtime($) {
   );
 } # UTC2Localtime
 
-sub FormatDate($) {
+sub FormatDate ($) {
   my ($date) = @_;
 
 =pod
@@ -670,7 +670,7 @@ Returns:
        . substr ($date, 0, 4);
 } # FormatDate
 
-sub FormatTime($) {
+sub FormatTime ($) {
   my ($time) = @_;
 
 =pod
@@ -712,13 +712,13 @@ Returns:
   my $AmPm    = $hours > 12 ? "Pm" : "Am";
 
   $hours = $hours - 12 if $hours > 12;
-
+  
   $hours = "0$hours" if length $hours == 1;
 
   return "$hours:$minutes $AmPm";
 } # FormatTime
 
-sub MDY(;$) {
+sub MDY (;$) {
   my ($time) = @_;
 
 =pod
@@ -760,7 +760,7 @@ Returns:
   return "$mon/$mday/$year";
 } # MDY
 
-sub SQLDatetime2UnixDatetime($) {
+sub SQLDatetime2UnixDatetime ($) {
   my ($sqldatetime) = @_;
 
 =pod
@@ -815,12 +815,12 @@ Returns:
   my $year  = substr $sqldatetime, 0, 4;
   my $month = substr $sqldatetime, 5, 2;
   my $day   = substr $sqldatetime, 8, 2;
-  my $time  = FormatTime(substr $sqldatetime, 11);
+  my $time  = FormatTime (substr $sqldatetime, 11);
 
   return $months{$month} . " $day, $year \@ $time";
 } # SQLDatetime2UnixDatetime
 
-sub SubtractDays($$) {
+sub SubtractDays ($$) {
   my ($timestamp, $nbr_of_days) = @_;
 
 =pod
@@ -914,7 +914,7 @@ Returns:
   return $year . "-" . $month . "-" . $days . substr $timestamp, 10;
 } # SubtractDays
 
-sub Today2SQLDatetime() {
+sub Today2SQLDatetime () {
 
 =pod
 
@@ -951,7 +951,7 @@ Returns:
   return UnixDatetime2SQLDatetime (scalar (localtime));
 } # Today2SQLDatetime
 
-sub UnixDatetime2SQLDatetime($) {
+sub UnixDatetime2SQLDatetime ($) {
   my ($datetime) = @_;
 
 =pod
@@ -1060,7 +1060,7 @@ Returns:
   unless ($months{$month_name}) {
     $month_name = substr $datetime, 8, 3;
   } # unless
-
+  
   my $month = $months{$month_name};
   my $time  = substr $datetime, 11, 8;
 
@@ -1072,12 +1072,12 @@ Returns:
     warning "Year undefined for $orig_datetime\nReturning today's date";
     return Today2SQLDatetime;
   } # unless
-
+    
   unless ($month) {
     warning "Month undefined for $orig_datetime\nReturning today's date";
     return Today2SQLDatetime;
   } # unless
-
+  
   unless ($day) {
     warning "Day undefined for $orig_datetime\nReturning today's date";
     return Today2SQLDatetime;
@@ -1091,7 +1091,7 @@ Returns:
   return "$year-$month-$day $time";
 } # UnixDatetime2SQLDatetime
 
-sub YMD(;$) {
+sub YMD (;$) {
   my ($time) = @_;
 
 =pod
@@ -1133,7 +1133,7 @@ Returns:
   return "$year$mon$mday";
 } # YMD
 
-sub YMDHM(;$) {
+sub YMDHM (;$) {
   my ($time) = @_;
 
 =pod
@@ -1175,7 +1175,7 @@ Returns:
   return "$year$mon$mday\@$hour:$min";
 } # YMDHM
 
-sub YMDHMS(;$) {
+sub YMDHMS (;$) {
   my ($time) = @_;
 
 =pod
@@ -1217,7 +1217,7 @@ Returns:
   return "$year$mon$mday\@$hour:$min:$sec";
 } # YMDHMS
 
-sub timestamp(;$) {
+sub timestamp (;$) {
   my ($time) = @_;
 
 =pod
@@ -1257,72 +1257,6 @@ Returns:
   return "$year$mon${mday}_$hour$min$sec";
 } # timestamp
 
-sub MDYHMS2SQLDatetime($) {
-  my ($datetime) = @_;
-
-  $datetime =~ s/^\s+|\s+$//g;
-
-  my ($year, $mon, $day, $hour, $min, $sec, $ampm);
-
-  # For datetime format of MM/DD/YYYY HH:MM:SS [Am|Pm]
-  if ($datetime =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4}) (\d{1,2}):(\d{1,2}):(\d{1,2}) (\w{2})$/) {
-    $mon   = $1;
-    $day   = $2;
-    $year  = $3;
-    $hour  = $4;
-    $min   = $5;
-    $sec   = $6;
-    $ampm  = $7;
-  # For datetime format of MM/DD/YYYY HH:MM:SS
-  } elsif ($datetime =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/){
-    $mon   = $1;
-    $day   = $2;
-    $year  = $3;
-    $hour  = $4;
-    $min   = $5;
-    $sec   = $6;
-  # For datetime format of MM/DD/YYYY
-  } elsif ($datetime =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/) {
-    $mon   = $1;
-    $day   = $2;
-    $year  = $3;
-    $hour  = '00';
-    $min   = '00';
-    $sec   = '00';
-  } else {
-    return
-  } # if
-
-  # Range checks
-  return if $mon  > 12 or $mon  <= 0;
-  return if $day  > 31 or $day  <= 0;
-  return if $hour > 23 or $hour <  0;
-  return if $min  > 59 or $min  <  0;
-
-  if ($day >= 31 and ($mon == 2
-                   or $mon == 4
-                   or $mon == 6
-                   or $mon == 9
-                   or $mon == 11)) {
-    return;
-  } # if
-
-  return if $day >  29 and  $mon == 2;
-  return if $day == 29 and  $mon == 2 and not _is_leap_year($year);
-
-  # Convert to 24 hour time if necessary
-  $hour += 12 if $ampm and $ampm =~ /pm/i;
-
-  # Add any leading zeros
-  $mon  = "0$mon"  if length $mon  == 1;
-  $day  = "0$day"  if length $day  == 1;
-  $hour = "0$hour" if length $hour == 1;
-  $min  = "0$min"  if length $min  == 1;
-  $sec  = "0$sec"  if length $sec  == 1;
-
-  return "$year-$mon-$day $hour:$min:$sec";
-} # MDYHMS2SQLDatetime
-
 1;
 
 =head2 DEPENDENCIES
diff --git a/web/Resumes/Andrew/Resume.doc b/web/Resumes/Andrew/Resume.doc
deleted file mode 120000 (symlink)
index 57fbe72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ResumeLong.doc
\ No newline at end of file
diff --git a/web/Resumes/Andrew/Resume.docx b/web/Resumes/Andrew/Resume.docx
deleted file mode 120000 (symlink)
index fa31f7e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ResumeLong.docx
\ No newline at end of file
diff --git a/web/Resumes/Andrew/ResumeLong.doc b/web/Resumes/Andrew/ResumeLong.doc
deleted file mode 100644 (file)
index 835c46c..0000000
Binary files a/web/Resumes/Andrew/ResumeLong.doc and /dev/null differ
diff --git a/web/Resumes/Andrew/ResumeLong.docx b/web/Resumes/Andrew/ResumeLong.docx
deleted file mode 100644 (file)
index 7617bbf..0000000
Binary files a/web/Resumes/Andrew/ResumeLong.docx and /dev/null differ
diff --git a/web/Resumes/Andrew/ResumeLong.odt b/web/Resumes/Andrew/ResumeLong.odt
new file mode 100644 (file)
index 0000000..5272c8c
Binary files /dev/null and b/web/Resumes/Andrew/ResumeLong.odt differ
diff --git a/web/Resumes/Andrew/ResumeLong.php b/web/Resumes/Andrew/ResumeLong.php
deleted file mode 100644 (file)
index eeaec35..0000000
+++ /dev/null
@@ -1,802 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-  <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
-  <title>ClearSCM: Our People: Andrew DeFaria - President</title>
-  <link rel="stylesheet" type="text/css" media="screen" href="/css/Article.css">
-  <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
-  <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
-
-<script type="text/javascript">
-function blink () {
-  if (!document.getElementById('blink').style.color) {
-    document.getElementById('blink').style.color="white";
-  } // if
-
-  if (document.getElementById('blink').style.color=="white") {
-    document.getElementById('blink').style.color="red";
-  } else {
-    document.getElementById('blink').style.color="white";
-  } // if
-
-  timer = setTimeout ("blink()", 450);
-} // blink
-
-function stoptimer () {
-  clearTimeout (timer);
-} // stoptimer
-</script>
-
-  <!-- Google Analytics
-  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
-  </script>
-  <script type="text/javascript">
-    _uacct = "UA-89317-1";
-    urchinTracker ();
-  </script>
-  Google Analytics -->
-
-  <?php
-  include "clearscm.php";
-  menu_css ();
-
-  // Record hit
-  $dir = dirname(__FILE__);
-
-  if (file_exists("$dir/.resumehits")) {
-    $resumeHit = fopen("$dir/.resumehits", 'r');
-
-    fscanf($resumeHit, "%d\n", $count);
-  } else {
-    $count = 0;
-  } // if
-
-  $count++;
-
-  fclose($resumeHit);
-
-  $resumeHit = fopen ('.resumehits', 'w');
-
-  fwrite($resumeHit, $count);
-  fclose($resumeHit);
-
-  $resumeHist = fopen('.resume.hist', 'a');
-  $date = date(DATE_RFC822);
-
-  fwrite($resumeHist, "$_SERVER[REMOTE_ADDR] read resume at $date\n");
-  fclose($resumeHist);
-
-  $msg  = '<html><body>';
-  $msg .= '<h1>Somebody just visited your resume.</h1>';
-  $msg .= "<p>Here's what I know about them:</p>";
-
-  foreach ($_SERVER as $key => $value) {
-   if (preg_match("/^REMOTE/", $key)) {
-    $msg .= "$key: $value<br>";
-
-    if ($key == 'REMOTE_ADDR') {
-     exec("whois $value", $output, $result);
-
-     foreach ($output as $line) {
-      $msg .= "$line<br>";
-     } // foreach
-    } // if
-   } // if
-  } // foreach
-
-  $msg     .= '</body></html>';
-  $headers  = "MIME-Version: 1.0\r\n";
-  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
-  $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
-
-  mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
-  ?>
-</head>
-
-<body onload="blink()" onunload="stoptimer()" id="homepage">
-
-<?php heading ();?>
-
-<div id="page">
-  <div id="content">
-    <?php start_box ("cs2")?>
-      <h2 align=center><a href="http://defaria.com">Andrew P. DeFaria</a></h2>
-      <address style="text-align:center">
-      11727 Stoney Peak Dr #65<br>
-      San Diego, California 92128-6440<br>
-      </address>
-      <p style="text-align:center">
-      Phone: 408-596-4937</a><br>
-      Email: <a href="mailto:Andrew@DeFaria.com">Andrew@DeFaria.com</a><br>
-<table align="center" width="400">
-  <tr>
-    <td>
-      <marquee behavior="alternate" onmouseover="this.stop()" onmouseout="this.start()"><a id="blink" href="Resume.docx">Download an MS Word copy!</a></marquee><br>
-    </td>
-  </tr>
-    <td align="center">
-      <center>
-      <font size=-1 class="dim">Sorry for the blink but for some reason recruiters can't find this link!</font></p>
-      </center>
-    </td>
-  </tr>
-  <tr>
-    <td align="center">
-      <center>
-      <font size=-1>For the most up to date copy of this resume see <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a></font>
-      </center>
-    </td>
-  </tr>
-</table>
-    <?php end_box ();?>
-
-    <table cellspacing="0" cellpadding="0" width="300" border="0" align="center">
-      <tbody>
-        <tr>
-         <td valign="top" align center>
-            <a href="AWS Certified Solutions Architect - Associate certificate.pdf" target="_blank">
-            <div>
-                <img src="AWS_Certified_Logo_SAA_294x230_Color.png" alt="AWS Certified Solutions Architect"><br>
-              <br>
-                <img src="AWS_Certified_Tag__SAA_294x230-Color.png" alt="Associate">
-              <br>
-              <b>Validation Number:</b> 4Q2XDJDCK1EE1HC5
-            </div>
-            </a>
-          </td>
-        </tr>
-      </tbody>
-    </table>
-
-
-  <h3>Objective</h3>
-
-  <p>To work with state of the art operating systems and networks to
-  insure the smooth running of an organization's information flow.</p>
-
-  <h3>Hardware</h3>
-
-  <p>Workstations and servers from Sun, HP as well as various other manufactures
-  of Linux systems.</p>
-
-  <h3>Operating Systems</h3>
-
-  <p><span class="standout">Linux</span> (Redhat, Centos, Ubuntu),
-  <span class="standout">Windows</span>, <span class="standout">Unix</span>
-  (Solaris, HP-UX), <span class="standout"><a href="http://cygwin.com">Cygwin</a></span></p>
-
-  <h3>Networking</h3>
-
-  <p>TCP/IP, Windows and Unix Networking, <span
-  class="standout">Active Directory/LDAP</span>, <span
-  class="standout">Samba</span></p>
-
-  <h3>Software</h3>
-
-  <table align=center border=1 cellspacing=0 cellpadding=2 width="60%">
-    <tbody>
-      <tr>
-        <th>Version Control Systems</th>
-        <td>
-          <span class="standout">Git</span>, <span class="standout">Perforce</span>,
-          <span class="standout">Clearcase</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Issue Tracking</th>
-        <td>
-          <span class="standout">JIRA</span>, <span class="standout">Clearquest</span>,
-          <span class="standout">Bugzilla</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Languages</th>
-        <td>
-          <span class="standout">Perl</span>, <span class="standout">Bash</span>,
-          <span class="standout">PHP</span>, <span class="standout">C++</span>,
-          <span class="standout">C</span>, <span class="standout">Ada</span>,
-          <span class="standout">TCL</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Middleware</th>
-        <td>
-          <span class="standout">Apache</span>, <span class="standout">Tomcat</span>,
-          <span class="standout">Samba</span>, <span class="standout">Winbind</span>,
-          <span class="standout">LDAP</span>, <span class="standout">REST</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Web Apps</th>
-        <td>
-          <span class="standout">JIRA</span>, <span class="standout">Confluence</span>,
-          <span class="standout">Swarm</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Databases</th>
-        <td>
-          <span class="standout">MySQL</span>, <span class="standout">Oracle</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Coninuous Integration</th>
-        <td>
-          <span class="standout">Build Forge</span>, <span class="standout">Electric Commander</span>,
-          <span class="standout">Jenkins</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Virtualization</th>
-        <td>
-          <span class="standout">VMWare</span>, <span class="standout">VirtualBox</span>,
-        </td>
-      </tr>
-      <tr>
-        <th>Cloud Computing</th>
-        <td>
-          <span class="standout">AWS: EC2</span>, 
-          <span class="standout">IAM</span>, 
-          <span class="standout">S3</span>, 
-          <span class="standout">Glacier</span>, 
-          <span class="standout">CloudFront</span>, 
-          <span class="standout">Route53, 
-          <span class="standout">VPC</span>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-
-  <h3>Education</h3>
-
-  <p>
-    A.A.S. in Computer Science from Union County College in Scotch Plains, New
-    Jersey. Continued studies at Fairleigh Dickenson University,  San Jose State
-
-    University, Mission College and Chico State in pursuit of my degree.</p>
-
-  <h3>References</h3>
-
-  <table align=center border=1 cellspacing=0 cellpadding=2 width="90%">
-    <tbody>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=276869">Tom Connor</a></td>
-        <td>(512)-422-1172</td>
-        <td><a href="mailto:tomhillconnor@yahoo.com">tomhillconnor@yahoo.com</a></td>
-        <td>Coworker, Consultant</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=700521">James Chen</a></td>
-        <td>(408)-845-5360</td>
-        <td><a href="mailto:jchen@salira.com">jchen@salira.com</a></td>
-        <td>Vice President of Engineering,<br>Salira Optical Network Systems</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=12113821">Omair Ahmed</a></td>
-        <td>(224) 715-9786</td>
-        <td><a href="mailto:Omair.Ahmed@ge.com">omair.ahmed@ge.com</a></td>
-        <td>Coworker, General Electric</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=1023014">Shivdutt Jha</a></td>
-        <td>(408)-806-3476</td>
-        <td><a href="mailto:shivdutt_jha@hotmail.com">shivdutt_jha@hotmail.com</a></td>
-        <td>Coworker, Consultant</td>
-      </tr>
-    </tbody>
-  </table>
-
-  <br>
-
-  <hr noshade>
-
-  <h2>Clients</h2>
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom/Avago" border="0"></a></p>
-
-  <p>August 2016 - Present<br>
-  <font class=dim>Contract</font><br>
-
-  <p>Converted an internal project from a <span class="standout">Jenkins</span>/
-  <span class="standout">Perforce</span> build system to the Broadcom/Avago 
-  standard of <span class="standout">Electric Commander</span>/
-  <span class="standout">Git</span>. Developed Perl scripts to sign executables
-  and remotely execute commands on Windows systems using <span 
-  class="standout">Cygwin/ssh</span> thus streamlining and standardizing remote
-  building and signing of executables.</p>
-
-  <hr noshade>
-
-  <p>May 2016 - July 2016<br>
-  <font class=dim>Contract</font><br>
-
-  <p><a href="http://icann.org"><img alt="ICANN" src="ICANN.png" border="0"></a><br></p>
-
-  <p>Developed <a 
-  href="https://en.wikipedia.org/wiki/Registration_Data_Access_Protocol">RDAP</a>
-  server for testing SLA compliance of various TLD registrars around the world.</p>
-
-  <hr noshade>
-
-  <p><a href="http://audience.com"><img alt="Audience" src="Audience.png" border="0"></a><br><b>A Knowles Company</b></p>
-
-  <p>March 2014 - April 2016<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Audience">Audience</a></p>
-
-  <p><span class="standout">Devops Admin</span>: Initially wrote scripts to 
-  import data from <span class="standout">Bugzilla</span> and other sources to
-  <span class="standout">JIRA</span> thus automating the migration of several
-  projects. Also administered <span class="standout">Linux</span> servers
-  (<span class="standout">Centos</span>/<span
-  class="standout">Ubuntu</span>/<span class="standout">Redhat Enterprise</span>)
-  managing VM images in vSphere,
-  <span class="standout">Perforce</span>, <span class="standout">Swarm</span>, 
-  <span class="standout">Git Fusion</span>.</p>
-
-  <p>Added functionality to custom build system that utilized <span 
-  class="standout">Perl</span>/<span class="standout">PHP</span>/<span 
-  class="standout">Apache</span>/<span class="standout">Linux</span>/<span 
-  class="standout">Windows</span> servers to allow engineers in the field to 
-  remotely perform customized builds. Integrated Bugzilla and Perforce (P4DTG). 
-  Assisted with JIRA setup and integration of <span 
-  class="standout">Salesforce</span> with JIRA. Assisted in the migration
-  for users to new Knowles domain.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.axcient.com"><img src="Axcient.png" alt="Axcient" border="0"></a></p>
-
-  <p>July 2013 - Dec 2013<br>
-  <font class=dim>Contract</font><br>
-  <a href="http://defaria.com/blogs/Status/archives/cat_axcient.html">Axcient</a></p>
-
-  <p>Worked as a <span class="standout">Build and Release Engineer</span> for
-  AxOS. The Axcient product is a customized derivative of <span 
-  class="standout">Ubuntu</span>. The SCM system being used is <span 
-  class="standout">git</span>. Developed and standardized procedures for 
-  performing builds.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom" border="0"></a></p>
-
-  <p>December 2011 - April 2013<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
-
-  <p><span class="standout">Clearquest Designer</span>: Maintained Clearquest 
-  instances implementing functionality with <span class="standout">Visual Basic</span>. 
-  Using ClearSCM's <a 
-  href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase.pm">Clearquest</a>, 
-  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server</a>,
-  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client</a>
-  and <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a>
-  modules created <span class="standout">Perforce</span> and <span class="standout">Git</span>
-  triggers to automate builds updating Clearquest in the process.</p>
-
-  <p>Migrated a project from their unsupported build environment into the standard
-  <span class="standout"><a
-  href="http://www.electric-cloud.com/products/electriccommander.php">Electric 
-  Commander</a></span>/<span class="standout">Perforce</span> based solution 
-  using <span class="standout">Cygwin</span>, <span class="standout">bash</span>
-  and <span class="standout">LSF</span> to farm builds out to a pool of <span 
-  class="standout">Windows</span> servers to perform builds. Builds were done 
-  using <span class="standout">Visual Studio</span> 8.0, 9.0 and 10.0 on Windows
-  Servers triggered by Perforce triggers at code checkin.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.tellabs.com"><img src="Tellabs.gif" alt="Tellabs" border="0"></a></p>
-
-  <p>March 2011 - December 2011<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Tellabs">Tellabs</a></font>
-
-  <p>Automated various informational systems using <span 
-  class="standout">Perl</span>/<span class="standout">MySQL</span>/<span 
-  class="standout">Oracle</span>, and the web.</p>
-
-  <p>Developed a command line debugger called <a 
-  href="http://clearscm.com/php/scm_man.php?file=bin/raid">RAID</a> (a Real
-  Aid In Debugging) which provided a consistent interface with complete command 
-  history and variable substitution courtesy of a Perl module that I wrote 
-  called <a 
-  href="http://clearscm.com/php/scm_man.php?file=lib/CmdLine.pm">Cmdline.pm</a>.
-  This Perl process utilized <span class="standout">Inline::C</span> to 
-  interface to the developer libraries and provide a consistent interface for 
-  the various command line debuggers developed by various different groups.</p>
-
-  <hr noshade>
-
-  <p><a href="https://www2.gehealthcare.com/portal/site/usen"><img src="GEHealthcare.gif" alt="General Electric" border="0"></a></p>
-
-  <p>January 2010 - October 2010<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/General%20Electric">General Electric</a></font>
-
-  <p>Performed <span class="standout">Clearcase</span>/<span 
-  class="standout">Clearquest UCM</span> administration. Developed an <a 
-  href="http://clearscm.com/php/scm_man.php?file=cc/etf.pl">Evil Twin Finder</a>
-  in Perl. Worked with <span class="standout">Build Forge</span> (IBM's CI tool
-  similar to <span class="standout">Jenkins</span>) jobs to automate work flow.
-  Assisted in consultations with UCM concepts such as component/composite
-  baselines and projects. Wrote Perl scripts for conversions of Clearquest data
-  with other systems (Siebel).</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.gdc4s.com"><img src="General_Dynamics_logo.jpg" alt="General Dynamics" border="0"></a></p>
-
-  <p>June 2007 - October 2009<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/General%20Dynamics">General Dynamics</a></font>
-
-  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest</span>
-  Administrator, <span class="standout">Build Release</span> and 
-  <span class="standout">Automation</span> using <span 
-  class="standout">Perl</span> scripts. Updated <span 
-  class="standout">C++</span>/<span class="standout">Qt</span> application that
-  integrates <span class="standout">UCM</span>/Clearquest integrated environment
-  into one tool and ported it to Linux.</p>
-
-  <p>Instrumental in establishment of Perl standards and introduction of Perl
-  tools such as <a href="http://perlcritic.com/">Perl::Critic</a>
-  and <a href="http://perltidy.sourceforge.net/">Perl::Tidy</a>.
-  Worked at promoting usage of CPAN modules.</p>
-
-  <p>Developed an extensive test driver application in Perl to interface and
-  drive tests using <a href="https://www.nethawk.fi/products/nethawk_simulators/">NetHawk
-  EAST Simulators</a> as well as interfacing to other simulators and external
-  hardware. The system automates the running of regression tests, official
-  testing before the customer, assists with validation of test results,
-  collecting of log files, checking log files into Clearcase and records status
-  into a MySQL database. Developed a PHP web page to present the data in various
-  forms including graphs, reports, exporting to CSV files and emailing of
-  reports. Implemented maintenance programs to scrub and keep the data clean.
-  This system was instrumental in Functional Quality Testing for the <a 
-  href="http://en.wikipedia.org/wiki/Mobile_User_Objective_System">MUOS</a>
-  program. This reduced the time it took to certify testing with the military several
-  fold.</p>
-
-  <p>Worked on many enhancements to the extensive Clearquest system in use at
-  GD. Designed and developed the record set implementing node configurations.
-  Implemented required forms and action hook code. Designed and developed Perl
-  scripts to initially load data into the new records.</p>
-
-  <p>Developed a server process (daemon) to process baseline records that were
-  then tracked by Clearquest. Implemented scripts to create baseline records
-  from other automated process such as Build Forge. Tied together baseline
-  records with node configurations through action hook code.</p>
-
-  <hr noshade>
-
-  <p><a href="http://ti.com"><img src="TexasInstruments.jpg"
-  alt="Texas Instruments" title="Texas Instruments" border=0></a></p>
-
-  <p>October 2006 - June 2007<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Texas%20Instruments">Texas Instruments</a></font>
-
-  <p><span class="standout">Clearcase</span>/<span 
-  class="standout">Clearquest</span> Administrator. Wrote a <span 
-  class="standout">Perl</span>/<span class="standout">Oracle</span>
-  application to track information about projects worldwide. Automated Clearcase
-  license usage reporting and load balancing of Clearquest web servers.</p>
-
-  <hr noshade>
-
-  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
-  Packard Company" title="Hewlett Packard Company" border=0></a></p>
-
-  <p>February 2006 - October 2006<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/HP">Hewlett Packard</a></p>
-
-  <p>Managed and executed day to day build and release duties. Served as
-  <span class="standout">Clearcase/Clearquest</span> Administrator as well as 
-  overall support of systems. Assisted with creating UCM streams and handling of
-  rebase and delivery issues for engineers and the build/release process. Wrote
-  <span class="standout">UCM triggers</span> to notify users of deliveries from
-  UCM development streams. Created baselines for official builds. Took over day
-  to day build and release duties. Created a build script that united the
-  various quick and dirty build scripts that were oriented per stream and per
-  build option. This standardized the build process. Augmented this build script
-  to be a daemon that continually builds software when deliveries are detected.
-  Wrote a build status web page that tracks and monitors the continuous
-  building. Created a dynamic web page to show Junit test history. Converted
-  Windows build from bat files and scheduled tasks -> Cygwin and cron thus
-  making the build script identical on both Linux and Windows. Wrote triggers
-  to notify users of deliveries. Baselined official builds. Automated the build
-  process to perform simple continuous integration. Created a dynamic web page
-  to show Junit test history.
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif"
-  alt="Broadcom" title="Broadcom" border="0"></a></p>
-
-  <p>September 2005 - January 2006<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
-
-  <p>Served as <span class="standout">Clearcase/Clearquest</span> Administrator
-  as well as overall support of systems. Developed several <a href="http://clearscm.com/clearcase/triggers.php">triggers</a>
-  as well as ported my <a href="http://clearscm.com/clearcase/triggers.php">mktriggers</a>
-  script which automates the maintenance of triggers.</p>
-
-  <p>Developed a complex <a hef="http://clearscm.com/clearquest/db.php">Perl script</a>
-  to merge two Clearquest databases to a new database with many schema changes.
-  This script handled all aspects of the conversion including changing non US
-  ASCII characters found in the data to their HTML equivalents, dynamic creation
-  of dynamic lists, field renaming and dynamically creating new stateless
-  records as needed.</p>
-
-  <p>Developed a script to better handle merging from UCM deliveries and rebases
-  by delaying any non automatic merges to the end of the process as well as
-  handle binary element merge. This process, written in Perl, utilized PerlTk to
-  present the user with a GUI dialog box to choose which version of the binary
-  file to merge.</p>
-
-  <p>Designed and developed another Clearquest database for the Mobile
-  Multimedia group.</p>
-
-  <p>Wrote several other scripts including one to interface CVS to IMS (a defect
-  tracking system) recording the change set at commit time, a script to strip
-  out MIME/HTML and attachments for defects submitted to GNATS (another defect
-  tracking system). Also implemented several script to log Clearcase activity,
-  check Clearcase's pulse and gather site and vob statistics. These scripts were
-  the start for creation of a set Object Oriented Perl modules to encapsulate
-  Clearcase in a Perl like manner (still in development).</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.lynuxworks.com"><img src="Lynuxworks.gif"
-  alt="Lynuxworks" title="Lynuxworks" border="0"></a></p>
-
-  <p>December 2004 - September 2005<br>
-  <a href="https://defaria-status.blogspot.com/search/label/LynuxWorks">LynuxWorks</a></p>
-
-  <p>Served as a build engineer in the Integration Group responsible for
-  building LynxOS (Linux RTOS) as well as tool chains, testing, releasing and
-  process improvement. LynuxWorks uses CVS for version control.</p>
-
-  <p>Developed a process of providing full text search of the company's defect
-  database using Perl and Htdig (See <a href="http://clearscm.com/scripts/ecrd">ECRDig</a>).
-  Developed a web based report to show CVS activity as well as several other CVS
-  related utilities(See <a href="http://defaria.com/Resume/cvs_utilities">CVS
-  Utilities</a>) as well as report on the differences between two CVS tags.</p>
-
-  <p>Automated the build process so that nightly builds could be performed.
-  Developed a web application that allows one to maintain CVS account
-  information including account creation, setting/resetting of password, etc.</p>
-
-  <hr noshade>
-
-  <p><a href="https://www.ameriquestcorp.com/"><img src="Ameriquest.gif"
-  alt="Ameriquest" title="Ameriquest" border="0"></a></p>
-
-  <p>March 2004 - December 2005<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Ameriquest">Ameriquest</a></p>
-
-  <p>Served as Clearcase/Clearquest administrator to this major mortgage
-  company. As Ameriquest is just starting out I have been busy with importing
-  source code from flat file systems as well as PVCS and Visual Source Safe.
-  Also setting up vobs and regions taking into account security restrictions
-  and concerns. Assisted with designing of the Multisite scheme to India.
-  Participated in design of UCM model to be used for Ameriquest.</p>
-
-  <hr noshade>
-
-  <p><a href="http://krldesign.com/saliraweb/"><img src="Salira.gif"
-  alt="Salira" title="Salira" border="0"></a></p>
-
-  <p>August 2001 - February 2004<br>
-  <a href="https://defaria-status.blogspot.com/search/label/Salira">Salira</a></p>
-
-  <p>After consulting briefly with Salira Optical Network Systems I joined this
-  startup company serving in the role of Clearcase/Clearquest Administrator for
-  this mostly Windows shop. I helped others in setting up the 
-  Clearcase/Clearquest environment as well as provided Training.</p>
-
-  <p>I also served in the role of Release Engineer managing the build process.
-  I employed wide usage of <a href="http://cygwin.com/">Cygwin</a>, which is a
-  product that provides an extremely workable Unix like environment and
-  engineered a build environment around that using GNU make and other standard
-  Unix and GNU utilities. When users complained that building remotely was slow
-  I performed an analysis on build performance. I also performed Build Stress 
-  Testing where I characterized the effect of multiple simultaneous builds
-  performed on the server.</p>
-
-  <p>I also setup and developed their Clearquest bug tracking system as well
-  as served as an advisor/expert on Clearcase issues, branching strategies,
-  labeling and release management.</p>
-
-  <p>While working at Salira I designed and developed a tool in C that packaged
-  the product into a more compact form.</p>
-
-  <p>I designed and implemented a <a href="http://clearscm.com/clearquest/cqd">Clearquest
-  Daemon</a> which served as an interface between processes and Clearquest data.
-  This daemon serviced requests from web pages and triggers in order to get and
-  validate data from Clearquest.</p>
-
-  <p>Developed release web pages that managed releases and produced release
-  notes for every release.</p>
-
-  <p>Developed process automation scripts to perform automatic branch merging
-  and syncing.</p>
-
-  <p>Performed product installation testing for the web component on Linux
-  (SuSE) and Solaris as well as browser testing (Netscape).</p>
-
-  <p>Implemented test scaffolding in TCL/TK for test automation.</p>
-
-  <hr noshade>
-
-  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
-  Packard Company" title="Hewlett Packard Company" border=0></a></p>
-
-  <p>August 1999 - February 2001<br>
-  <font class=dim>Contract</font><br>
-  Systems Technology Division<br>
-  Enterprise Java Lab</p>
-
-  <p>Setup security system automating the running of Medusa (an internal
-  security audit tool) on approximately 100 machines. Reports are generated
-  automatically and are viewable on the web. Setup and maintained security
-  related patch depots.</p>
-
-  <p>Implemented nightly automation for the lab's machines including security
-  checks, automatic installation of line printer models, etc. This automation
-  was bundled into an SD-UX bundle.</p>
-
-  <p>Migrated user data to HP NetStorage 6000. Worked extensively with HP
-  NetStorage 6000 Support on problems with this machines OS and interfacing with
-  Windows 2000.</p>
-
-  <P>Migrated HP-UX applications from one application server to another.
-
-  <p>Participated in several critical planned networked down times where the
-  team was able to implement changes to the infrastructure, including migration
-  to Clearcase 4.0, migration of project and user data to HP NetStorage 6000's
-  and other such changes.</p>
-
-  <p>Set up Netscape Enterprise Web Server and iPlanet 4.1 Web Server.</p>
-
-  <hr noshade>
-
-  <p><a href="http://cisco.com"><img src="Cisco.gif" alt="Cisco Systems" 
-  title="Cisco Systems" border=0></a></p>
-
-  <p>March 1999 - August 1999<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Cisco">Cisco</a></p>
-
-  <p>Served as Clearcase/Unix Systems Administrator. Responsible for all
-  Clearcase operations in CNS/AD on Sun Solaris, HP-UX, Windows NT 4.0 and
-  Windows 2000. Assisted in creating additional View and Vob servers and
-  balancing the Clearcase load amongst them. Participated in Rational's Beta
-  program for Windows 2000. Installed, tested and documented Clearcase on
-  Windows 2000 as well as Windows NT 4.0.</p>
-
-  <p>Assisted in recovery of a catastrophic disk failure in a critical vob.
-  Assisted with implementing a backup strategy with Arcserve Open. Helped
-  evaluate system monitoring packages.</p>
-
-  <p>As CNS/AD was in a secured and isolated network, learned and assisted users
-  with ssh/scp.</p>
-
-  <hr noshade>
-
-  <a href="https://www.oracle.com/sun/index.html"><img src="Sun.jpg" alt="Sun Microsystems" 
-  title="Sun Microsystems" border=0></a></p>
-
-  <p>December 1998 - March 1999<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Sun">Sun Microsystems</a></p>
-
-  <p>Worked on the Sunpeak Configuration Management team performing promotions
-  of code updates into test and production environments. Also worked on
-  improving the process flow of promotions utilizing make and rdist.</p>
-
-  <hr noshade>
-
-  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
-  Packard Company" title="Hewlett Packard Company" border=0></a></p>
-
-  <p>February 1988 - November 1998<br>
-  Systems Technology Division<br>
-  Enterprise Java Lab</p>
-
-  <p>Primary Clearcase and Multisite Administrator for a large Clearcase
-  environment with approximately 1400 views and 180 vobs. Most vobs are
-  multisited between several other labs and I am responsible for resolving
-  Multisite problems. I also serve as general System Administrator, overseeing
-  approximately 400 machines in the lab. I help institute policies and
-  procedures to keep the network running smoothly. Also participate in the
-  design and restructuring the network topology and Clearcase topology by bring
-  in many Kittyhawks, Mohawks and Bravehawks (about 40 of them) for use as
-  Clearcase Vob, View and Build, Mail, Application, X Terminal and Web servers.
-  Assist in documenting setup and configuration as well as trouble shooting and
-  handling of patches for all lab wide shared resources.</p> 
-
-  <p>Responsible for setup and running of Windows NT domain, account setup and
-  print serving. Setup and evaluated Clearcase 3.2 on NT. Developed backup
-  strategy for NT systems. Maintain a repository of software tools as well as
-  evaluated and recommended several PC packages for lab usage. Main point of
-  contact for Windows 95/NT problem solving in the lab. Also sought after by
-  many people in Hewlett Packard relating to both PC and Unix configurations and
-  problem solving.</p>
-
-  <p>Also served as webmaster for the lab as well as consult on HTML questions
-  and design issues. Installed, configured and maintain the <a href="http://home.netscape.com/">Netscape</a>
-  Suitespot Servers including the Enterprise and Directory servers. Developed
-  several web pages and forms for the lab as well as run
-  <a href="https://web.archive.org/web/20001109171100/http://defaria.com/Quicken">The
-  Unofficial Quicken® Web Page.</a></p>
-
-  <p>I developed an Application Server providing many machines with many
-  software packages without the need for individual system administration
-  utilizing scripting and NFS heavily.</p>
-
-  <p>Prior to the Productivity Project I worked on COBOL/SoftBench product
-  which consists of encapsulating some core HP Micro Focus COBOL tools using C++
-  3.0 and the SoftBench Encapsulator libraries. Also, working on porting an
-  X/Motif application to MS Windows 3.1. The code is written using C++ 3.0 on
-  both the HP workstation and the PC (Borland C++ 3.1).</p>
-
-  <p>Worked in the Ada project on Ada/SoftBench. This project was similar to
-  COBOL/SoftBench in that it involved some SoftBench encapsulations using a
-  language called edl.</p>
-
-  <p>Worked producing Ada Bindings to Xlib, Xt and Motif. This involved using a
-  modified C compiler to translate C header and source files to Ada declarations
-  and function prototypes. Using this methodology we were able to migrate our
-  product from X11 R3 and Motif 1.0 to X11 R4 and Motif 1.1 in one week!</p>
-
-  <p>Worked on a project that produced Ada Bindings to HP-UX, which enabled me
-  to get good breath knowledge into all system calls, and another binding to
-  Starbase graphical subsystem.</p>
-
-  <p>Performed destructive testing on MPE/XL 1.0-1.3. Wrote several programs to
-  stress the OS. Submitted 300+ Service Requests many of which appeared on Must
-  Fix lists.</p>
-
-  <hr noshade>
-
-  <h2>Copyright (GPL)</h2>
-
-  <?php start_box ("cs2")?>
-    <a name="copyleft"></a>
-      <p style="color:#666">This resume is freely available; you can
-      redistribute it and/or modify it under the terms of the GNU
-      General Public License as published by the Free Software
-      Foundation; either version 2 of the License, or (at your option)
-      any later version. This means that if you modify this resume you
-      must include a copy of the original source or refer to its origin
-      at <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a>.</p>
-
-      <p style="color:#666">This resume is distributed in the hope
-      that it will be useful, but WITHOUT ANY WARRANTY; without even
-      the implied warranty of MERCHANTABILITY or FITNESS FOR A
-      PARTICULAR PURPOSE.  See the GNU General Public License for more
-      details.</p>
-
-      <p style="color:#666">You should have received a copy of the GNU
-      General Public License along with this resume; if not, write to
-      the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-      Boston, MA 02111-1307, USA.</p>
-    </font>
-  <?php end_box ();?>
-
-  <?php copyright ("1988");?>
-
-<script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
-
-</body>
-</html>
diff --git a/web/Resumes/Andrew/ResumeShort.doc b/web/Resumes/Andrew/ResumeShort.doc
deleted file mode 100644 (file)
index cd2dbd8..0000000
Binary files a/web/Resumes/Andrew/ResumeShort.doc and /dev/null differ
diff --git a/web/Resumes/Andrew/ResumeShort.docx b/web/Resumes/Andrew/ResumeShort.docx
deleted file mode 100644 (file)
index 4a89592..0000000
Binary files a/web/Resumes/Andrew/ResumeShort.docx and /dev/null differ
diff --git a/web/Resumes/Andrew/ResumeShort.odt b/web/Resumes/Andrew/ResumeShort.odt
new file mode 100644 (file)
index 0000000..692f4b3
Binary files /dev/null and b/web/Resumes/Andrew/ResumeShort.odt differ
diff --git a/web/Resumes/Andrew/ResumeShort.php b/web/Resumes/Andrew/ResumeShort.php
deleted file mode 100644 (file)
index e76dc22..0000000
+++ /dev/null
@@ -1,535 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-  <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
-  <title>ClearSCM: Our People: Andrew DeFaria - President</title>
-  <link rel="stylesheet" type="text/css" media="screen" href="/css/Article.css">
-  <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
-  <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
-
-<script type="text/javascript">
-function blink () {
-  if (!document.getElementById('blink').style.color) {
-    document.getElementById('blink').style.color="white";
-  } // if
-
-  if (document.getElementById('blink').style.color=="white") {
-    document.getElementById('blink').style.color="red";
-  } else {
-    document.getElementById('blink').style.color="white";
-  } // if
-
-  timer = setTimeout ("blink()", 450);
-} // blink
-
-function stoptimer () {
-  clearTimeout (timer);
-} // stoptimer
-</script>
-
-  <!-- Google Analytics
-  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
-  </script>
-  <script type="text/javascript">
-    _uacct = "UA-89317-1";
-    urchinTracker ();
-  </script>
-  Google Analytics -->
-
-  <?php
-  include "clearscm.php";
-  menu_css ();
-
-  // Record hit
-  $dir = dirname(__FILE__);
-
-  if (file_exists("$dir/.resumehits")) {
-    $resumeHit = fopen("$dir/.resumehits", 'r');
-
-    fscanf($resumeHit, "%d\n", $count);
-  } else {
-    $count = 0;
-  } // if
-
-  $count++;
-
-  fclose($resumeHit);
-
-  $resumeHit = fopen ('.resumehits', 'w');
-
-  fwrite($resumeHit, $count);
-  fclose($resumeHit);
-
-  $resumeHist = fopen('.resume.hist', 'a');
-  $date = date(DATE_RFC822);
-
-  fwrite($resumeHist, "$_SERVER[REMOTE_ADDR] read resume at $date\n");
-  fclose($resumeHist);
-  
-  $msg  = '<html><body>';
-  $msg .= '<h1>Somebody just visited your resume.</h1>';
-  $msg .= "<p>Here's what I know about them:</p>";
-
-  foreach ($_SERVER as $key => $value) {
-    if (preg_match("/^REMOTE/", $key)) {
-      $msg .= "$key: $value<br>";
-
-      if ($key == 'REMOTE_ADDR') {
-        exec("whois $value", $output, $result);
-
-        foreach ($output as $line) {
-          $msg .= "$line<br>";
-        } // foreach
-      } // if
-    } // if
-  } // foreach
-
-  $msg     .= '</body></html>';
-  $headers  = "MIME-Version: 1.0\r\n";
-  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
-  $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
-
-  mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
-  ?>
-</head>
-
-<body onload="blink()" onunload="stoptimer()" id="homepage">
-
-<?php heading ();?>
-
-<div id="page">
-  <div id="content">
-    <?php start_box ("cs2")?>
-      <h2 align=center><a href="http://defaria.com">Andrew P. DeFaria</a></h2>
-      <address style="text-align:center">
-      11727 Stoney Peak Dr #65<br>
-      San Diego, California 92128-6440<br>
-      </address>
-      <p style="text-align:center">
-      Phone: 408-596-4937</a><br>
-      Email: <a href="mailto:Andrew@DeFaria.com">Andrew@DeFaria.com</a><br>
-<table align="center" width="400">
-  <tr>
-    <td>
-      <marquee behavior="alternate" onmouseover="this.stop()" onmouseout="this.start()"><a id="blink" href="Resume.docx">Download an MS Word copy!</a></marquee><br>
-    </td>
-  </tr>
-    <td align="center">
-      <center>
-      <font size=-1 class="dim">Sorry for the blink but for some reason recruiters can't find this link!</font></p>
-      </center>
-    </td>
-  </tr>
-  <tr>
-    <td align="center">
-      <center>
-      <font size=-1>For the most up to date copy of this resume see <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a></font>
-      </center>
-    </td>
-  </tr>
-</table>
-    <?php end_box ();?>
-
-    <table cellspacing="0" cellpadding="0" width="300" border="0" align="center">
-      <tbody>
-        <tr>
-         <td valign="top" align center>
-            <a href="AWS Certified Solutions Architect - Associate certificate.pdf" target="_blank">
-            <div>
-                <img src="AWS_Certified_Logo_SAA_294x230_Color.png" alt="AWS Certified Solutions Architect"><br>
-              <br>
-                <img src="AWS_Certified_Tag__SAA_294x230-Color.png" alt="Associate">
-              <br>
-              <b>Validation Number:</b> 4Q2XDJDCK1EE1HC5
-            </div>
-            </a>
-          </td>
-        </tr>
-      </tbody>
-    </table>
-
-
-  <h3>Objective</h3>
-
-  <p>To work with state of the art operating systems and networks to
-  insure the smooth running of an organization's information flow.</p>
-
-  <h3>Hardware</h3>
-
-  <p>Workstations and servers from Sun, HP as well as various other manufactures
-  of Linux systems.</p>
-
-  <h3>Operating Systems</h3>
-
-  <p><span class="standout">Linux</span> (Redhat, Centos, Ubuntu),
-  <span class="standout">Windows</span>, <span class="standout">Unix</span>
-  (Solaris, HP-UX), <span class="standout"><a href="http://cygwin.com">Cygwin</a></span></p>
-
-  <h3>Networking</h3>
-
-  <p>TCP/IP, Windows and Unix Networking, <span
-  class="standout">Active Directory/LDAP</span>, <span
-  class="standout">Samba</span></p>
-
-  <h3>Software</h3>
-
-  <table align=center border=1 cellspacing=0 cellpadding=2 width="60%">
-    <tbody>
-      <tr>
-        <th>Version Control Systems</th>
-        <td>
-          <span class="standout">Git</span>, <span class="standout">Perforce</span>,
-          <span class="standout">Clearcase</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Issue Tracking</th>
-        <td>
-          <span class="standout">JIRA</span>, <span class="standout">Clearquest</span>,
-          <span class="standout">Bugzilla</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Languages</th>
-        <td>
-          <span class="standout">Perl</span>, <span class="standout">Bash</span>,
-          <span class="standout">PHP</span>, <span class="standout">C++</span>,
-          <span class="standout">C</span>, <span class="standout">Ada</span>,
-          <span class="standout">TCL</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Middleware</th>
-        <td>
-          <span class="standout">Apache</span>, <span class="standout">Tomcat</span>,
-          <span class="standout">Samba</span>, <span class="standout">Winbind</span>,
-          <span class="standout">LDAP</span>, <span class="standout">REST</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Web Apps</th>
-        <td>
-          <span class="standout">JIRA</span>, <span class="standout">Confluence</span>,
-          <span class="standout">Swarm</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Databases</th>
-        <td>
-          <span class="standout">MySQL</span>, <span class="standout">Oracle</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Coninuous Integration</th>
-        <td>
-          <span class="standout">Build Forge</span>, <span class="standout">Electric Commander</span>,
-          <span class="standout">Jenkins</span>
-        </td>
-      </tr>
-      <tr>
-        <th>Virtualization</th>
-        <td>
-          <span class="standout">VMWare</span>, <span class="standout">VirtualBox</span>,
-        </td>
-      </tr>
-      <tr>
-        <th>Cloud Computing</th>
-        <td>
-          <span class="standout">AWS: EC2</span>, 
-          <span class="standout">IAM</span>, 
-          <span class="standout">S3</span>, 
-          <span class="standout">Glacier</span>, 
-          <span class="standout">CloudFront</span>, 
-          <span class="standout">Route53, 
-          <span class="standout">VPC</span>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-
-  <h3>Education</h3>
-
-  <p>
-    A.A.S. in Computer Science from Union County College in Scotch Plains, New
-    Jersey. Continued studies at Fairleigh Dickenson University,  San Jose State
-
-    University, Mission College and Chico State in pursuit of my degree.</p>
-
-  <h3>References</h3>
-
-  <table align=center border=1 cellspacing=0 cellpadding=2 width="90%">
-    <tbody>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=276869">Tom Connor</a></td>
-        <td>(512)-422-1172</td>
-        <td><a href="mailto:tomhillconnor@yahoo.com">tomhillconnor@yahoo.com</a></td>
-        <td>Coworker, Consultant</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=700521">James Chen</a></td>
-        <td>(408)-845-5360</td>
-        <td><a href="mailto:jchen@salira.com">jchen@salira.com</a></td>
-        <td>Vice President of Engineering,<br>Salira Optical Network Systems</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=12113821">Omair Ahmed</a></td>
-        <td>(224) 715-9786</td>
-        <td><a href="mailto:Omair.Ahmed@ge.com">omair.ahmed@ge.com</a></td>
-        <td>Coworker, General Electric</td>
-      </tr>
-      <tr>
-        <td><a href="http://www.linkedin.com/profile/view?id=1023014">Shivdutt Jha</a></td>
-        <td>(408)-806-3476</td>
-        <td><a href="mailto:shivdutt_jha@hotmail.com">shivdutt_jha@hotmail.com</a></td>
-        <td>Coworker, Consultant</td>
-      </tr>
-    </tbody>
-  </table>
-
-  <br>
-
-  <hr noshade>
-
-  <h2>Clients</h2>
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom/Avago" border="0"></a></p>
-
-  <p>August 2016 - Present<br>
-  <font class=dim>Contract</font><br>
-
-  <p>Converted an internal project from a <span class="standout">Jenkins</span>/
-  <span class="standout">Perforce</span> build system to the Broadcom/Avago 
-  standard of <span class="standout">Electric Commander</span>/
-  <span class="standout">Git</span>. Developed Perl scripts to sign executables
-  and remotely execute commands on Windows systems using <span 
-  class="standout">Cygwin/ssh</span> thus streamlining and standardizing remote
-  building and signing of executables.</p>
-
-  <hr noshade>
-
-  <p>May 2016 - July 2016<br>
-  <font class=dim>Contract</font><br>
-
-  <p><a href="http://icann.org"><img alt="ICANN" src="ICANN.png" border="0"></a><br></p>
-
-  <p>Developed <a 
-  href="https://en.wikipedia.org/wiki/Registration_Data_Access_Protocol">RDAP</a>
-  server for testing SLA compliance of various TLD registrars around the world.</p>
-
-  <hr noshade>
-
-  <p><a href="http://audience.com"><img alt="Audience" src="Audience.png" border="0"></a><br><b>A Knowles Company</b></p>
-
-  <p>March 2014 - April 2016<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Audience">Audience</a></p>
-
-  <p><span class="standout">Devops Admin</span>: Initially wrote scripts to 
-  import data from <span class="standout">Bugzilla</span> and other sources to
-  <span class="standout">JIRA</span> thus automating the migration of several
-  projects. Also administered <span class="standout">Linux</span> servers
-  (<span class="standout">Centos</span>/<span
-  class="standout">Ubuntu</span>/<span class="standout">Redhat Enterprise</span>)
-  managing VM images in vSphere,
-  <span class="standout">Perforce</span>, <span class="standout">Swarm</span>, 
-  <span class="standout">Git Fusion</span>.</p>
-
-  <p>Added functionality to custom build system that utilized <span 
-  class="standout">Perl</span>/<span class="standout">PHP</span>/<span 
-  class="standout">Apache</span>/<span class="standout">Linux</span>/<span 
-  class="standout">Windows</span> servers to allow engineers in the field to 
-  remotely perform customized builds. Integrated Bugzilla and Perforce (P4DTG). 
-  Assisted with JIRA setup and integration of <span 
-  class="standout">Salesforce</span> with JIRA. Assisted in the migration
-  for users to new Knowles domain.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.axcient.com"><img src="Axcient.png" alt="Axcient" border="0"></a></p>
-
-  <p>July 2013 - Dec 2013<br>
-  <font class=dim>Contract</font><br>
-  <a href="http://defaria.com/blogs/Status/archives/cat_axcient.html">Axcient</a></p>
-
-  <p>Worked as a <span class="standout">Build and Release Engineer</span> for
-  AxOS. The Axcient product is a customized derivative of <span 
-  class="standout">Ubuntu</span>. The SCM system being used is <span 
-  class="standout">git</span>. Developed and standardized procedures for 
-  performing builds.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom" border="0"></a></p>
-
-  <p>December 2011 - April 2013<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
-
-  <p><span class="standout">Clearquest Designer</span>: Maintained Clearquest 
-  instances implementing functionality with <span class="standout">Visual Basic</span>. 
-  Using ClearSCM's <a 
-  href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase.pm">Clearquest</a>, 
-  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server</a>,
-  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client</a>
-  and <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a>
-  modules created <span class="standout">Perforce</span> and <span class="standout">Git</span>
-  triggers to automate builds updating Clearquest in the process.</p>
-
-  <p>Migrated a project from their unsupported build environment into the standard
-  <span class="standout"><a
-  href="http://www.electric-cloud.com/products/electriccommander.php">Electric 
-  Commander</a></span>/<span class="standout">Perforce</span> based solution 
-  using <span class="standout">Cygwin</span>, <span class="standout">bash</span>
-  and <span class="standout">LSF</span> to farm builds out to a pool of <span 
-  class="standout">Windows</span> servers to perform builds. Builds were done 
-  using <span class="standout">Visual Studio</span> 8.0, 9.0 and 10.0 on Windows
-  Servers triggered by Perforce triggers at code checkin.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.tellabs.com"><img src="Tellabs.gif" alt="Tellabs" border="0"></a></p>
-
-  <p>March 2011 - December 2011<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Tellabs">Tellabs</a></font>
-
-  <p>Automated various informational systems using <span 
-  class="standout">Perl</span>/<span class="standout">MySQL</span>/<span 
-  class="standout">Oracle</span>, and the web.</p>
-
-  <p>Developed a command line debugger called <a 
-  href="http://clearscm.com/php/scm_man.php?file=bin/raid">RAID</a> (a Real
-  Aid In Debugging) which provided a consistent interface with complete command 
-  history and variable substitution courtesy of a Perl module that I wrote 
-  called <a 
-  href="http://clearscm.com/php/scm_man.php?file=lib/CmdLine.pm">Cmdline.pm</a>.
-  This Perl process utilized <span class="standout">Inline::C</span> to 
-  interface to the developer libraries and provide a consistent interface for 
-  the various command line debuggers developed by various different groups.</p>
-
-  <hr noshade>
-
-  <p><a href="https://www2.gehealthcare.com/portal/site/usen"><img src="GEHealthcare.gif" alt="General Electric" border="0"></a></p>
-
-  <p>January 2010 - October 2010<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/General%20Electric">General Electric</a></font>
-
-  <p>Performed <span class="standout">Clearcase</span>/<span 
-  class="standout">Clearquest UCM</span> administration. Developed an <a 
-  href="http://clearscm.com/php/scm_man.php?file=cc/etf.pl">Evil Twin Finder</a>
-  in Perl. Worked with <span class="standout">Build Forge</span> (IBM's CI tool
-  similar to <span class="standout">Jenkins</span>) jobs to automate work flow.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.gdc4s.com"><img src="General_Dynamics_logo.jpg" alt="General Dynamics" border="0"></a></p>
-
-  <p>June 2007 - October 2009<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/General%20Dynamics">General Dynamics</a></font>
-
-  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest</span>
-  Administrator, <span class="standout">Build Release</span> and 
-  <span class="standout">Automation</span> using <span 
-  class="standout">Perl</span> scripts. Updated <span 
-  class="standout">C++</span>/<span class="standout">Qt</span> application that
-  integrates <span class="standout">UCM</span>/Clearquest integrated environment
-  into one tool and ported it to Linux.</p>
-
-  <p>Instrumental in establishment of Perl standards and introduction of Perl
-  tools such as <a href="http://perlcritic.com/">Perl::Critic</a>
-  and <a href="http://perltidy.sourceforge.net/">Perl::Tidy</a>.
-  Worked at promoting usage of CPAN modules.</p>
-
-  <p>Automated tests using <a href="https://www.nethawk.fi/">NetHawk EAST
-  Simulators</a> to automate all testing and store results into a <span 
-  class="standout">MySQL</span> database. This reduced the time it took to certify
-  testing with the military several fold. Also developed a <span 
-  class="standout">PHP</span> app to report/graph results.</p>
-
-  <hr noshade>
-
-  <p><a href="http://ti.com"><img src="TexasInstruments.jpg"
-  alt="Texas Instruments" title="Texas Instruments" border=0></a></p>
-
-  <p>October 2006 - June 2007<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Texas%20Instruments">Texas Instruments</a></font>
-
-  <p><span class="standout">Clearcase</span>/<span 
-  class="standout">Clearquest</span> Administrator. Wrote a <span 
-  class="standout">Perl</span>/<span class="standout">Oracle</span>
-  application to track information about projects worldwide. Automated Clearcase
-  license usage reporting and load balancing of Clearquest web servers.</p>
-
-  <hr noshade>
-
-  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
-  Packard Company" title="Hewlett Packard Company" border=0></a></p>
-
-  <p>February 2006 - October 2006<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/HP">Hewlett Packard</a></p>
-
-  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest 
-  UCM</span> Administrator. Wrote triggers to notify users of deliveries.
-  Baselined official builds. Automated the build process to perform simple <span
-  class="standout">continuous integration</span>. Created a dynamic web page to
-  show <span class="standout">Junit</span> test history.</p>
-
-  <hr noshade>
-
-  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif"
-  alt="Broadcom" title="Broadcom" border="0"></a></p>
-
-  <p>September 2005 - January 2006<br>
-  <font class=dim>Contract</font><br>
-  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
-
-  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest</span>
-  Administrator and support of systems. Developed several <a href="http://clearscm.com/clearcase/triggers.php">triggers</a>.</p>
-
-  <p>Wrote <a href="http://clearscm.com/clearquest/db.php">Perl script</a> to
-  merge Clearquest databases.</p>
-
-  <p>Designed and developed another Clearquest database for the Mobile Multimedia
-  group.</p>
-
-  <hr noshade>
-
-  <h2>Copyright (GPL)</h2>
-
-  <?php start_box ("cs2")?>
-    <a name="copyleft"></a>
-      <p style="color:#666">This resume is freely available; you can
-      redistribute it and/or modify it under the terms of the GNU
-      General Public License as published by the Free Software
-      Foundation; either version 2 of the License, or (at your option)
-      any later version. This means that if you modify this resume you
-      must include a copy of the original source or refer to its origin
-      at <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a>.</p>
-
-      <p style="color:#666">This resume is distributed in the hope
-      that it will be useful, but WITHOUT ANY WARRANTY; without even
-      the implied warranty of MERCHANTABILITY or FITNESS FOR A
-      PARTICULAR PURPOSE.  See the GNU General Public License for more
-      details.</p>
-
-      <p style="color:#666">You should have received a copy of the GNU
-      General Public License along with this resume; if not, write to
-      the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-      Boston, MA 02111-1307, USA.</p>
-    </font>
-  <?php end_box ();?>
-
-  <?php copyright ("1988");?>
-
-<script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
-
-</body>
-</html>
deleted file mode 120000 (symlink)
index 517806eaef5d3c1f933bf820ac2141a3d38a889b..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-ResumeLong.php
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..e430b6e599935699a6c2db1edcbe71e48f5b67ca
--- /dev/null
@@ -0,0 +1,828 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+  <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
+  <title>ClearSCM: Our People: Andrew DeFaria - President</title>
+  <link rel="stylesheet" type="text/css" media="screen" href="/css/Article.css">
+  <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
+  <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
+
+<script type="text/javascript">
+function blink () {
+  if (!document.getElementById('blink').style.color) {
+    document.getElementById('blink').style.color="white";
+  } // if
+
+  if (document.getElementById('blink').style.color=="white") {
+    document.getElementById('blink').style.color="red";
+  } else {
+    document.getElementById('blink').style.color="white";
+  } // if
+
+  timer = setTimeout ("blink()", 450);
+} // blink
+
+function stoptimer () {
+  clearTimeout (timer);
+} // stoptimer
+</script>
+
+  <!-- Google Analytics
+  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+  </script>
+  <script type="text/javascript">
+    _uacct = "UA-89317-1";
+    urchinTracker ();
+  </script>
+  Google Analytics -->
+
+  <?php
+  include "clearscm.php";
+  menu_css ();
+
+  // Record hit
+  $dir = dirname(__FILE__);
+
+  if (file_exists("$dir/.resumehits")) {
+    $resumeHit = fopen("$dir/.resumehits", 'r');
+
+    fscanf($resumeHit, "%d\n", $count);
+  } else {
+    $count = 0;
+  } // if
+
+  $count++;
+
+  fclose($resumeHit);
+
+  $resumeHit = fopen ('.resumehits', 'w');
+
+  fwrite($resumeHit, $count);
+  fclose($resumeHit);
+
+  $resumeHist = fopen('.resume.hist', 'a');
+  $date = date(DATE_RFC822);
+
+  fwrite($resumeHist, "$_SERVER[REMOTE_ADDR] read resume at $date\n");
+  fclose($resumeHist);
+
+  $msg  = '<html><body>';
+  $msg .= '<h1>Somebody just visited your resume.</h1>';
+  $msg .= "<p>Here's what I know about them:</p>";
+
+  foreach ($_SERVER as $key => $value) {
+   if (preg_match("/^REMOTE/", $key)) {
+    $msg .= "$key: $value<br>";
+
+    if ($key == 'REMOTE_ADDR') {
+     exec("whois $value", $output, $result);
+
+     foreach ($output as $line) {
+      $msg .= "$line<br>";
+     } // foreach
+    } // if
+   } // if
+  } // foreach
+
+  $msg     .= '</body></html>';
+  $headers  = "MIME-Version: 1.0\r\n";
+  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
+  $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
+
+  mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
+  ?>
+</head>
+
+<body onload="blink()" onunload="stoptimer()" id="homepage">
+
+<?php heading ();?>
+
+<div id="page">
+  <div id="content">
+    <?php start_box ("cs2")?>
+      <h2 align=center><a href="http://defaria.com">Andrew P. DeFaria</a></h2>
+      <address style="text-align:center">
+      11727 Stoney Peak Dr #65<br>
+      San Diego, California 92128-6440<br>
+      </address>
+      <p style="text-align:center">
+      Phone: 408-596-4937</a><br>
+      Email: <a href="mailto:Andrew@DeFaria.com">Andrew@DeFaria.com</a><br>
+<table align="center" width="400">
+  <tr>
+    <td>
+      <marquee behavior="alternate" onmouseover="this.stop()" onmouseout="this.start()"><a id="blink" href="Resume.docx">Download an MS Word copy!</a></marquee><br>
+    </td>
+  </tr>
+    <td align="center">
+      <center>
+      <font size=-1 class="dim">Sorry for the blink but for some reason recruiters can't find this link!</font></p>
+      </center>
+    </td>
+  </tr>
+  <tr>
+    <td align="center">
+      <center>
+      <font size=-1>For the most up to date copy of this resume see <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a></font>
+      </center>
+    </td>
+  </tr>
+</table>
+    <?php end_box ();?>
+
+    <table cellspacing="0" cellpadding="0" width="300" border="0" align="center">
+      <tbody>
+        <tr>
+         <td valign="top" align center>
+            <a href="AWS Certified Solutions Architect - Associate certificate.pdf" target="_blank">
+            <div>
+                <img src="AWS_Certified_Logo_SAA_294x230_Color.png" alt="AWS Certified Solutions Architect"><br>
+              <br>
+                <img src="AWS_Certified_Tag__SAA_294x230-Color.png" alt="Associate">
+              <br>
+              <b>Validation Number:</b> 4Q2XDJDCK1EE1HC5
+            </div>
+            </a>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+
+
+  <h3>Objective</h3>
+
+  <p>To work with state of the art operating systems and networks to
+  insure the smooth running of an organization's information flow.</p>
+
+  <h3>Hardware</h3>
+
+  <p>Workstations and servers from Sun, HP, Microsoft Windows as well as various
+  other manufactures of Linux systems.</p>
+
+  <h3>Operating Systems</h3>
+
+  <p><span class="standout">Linux</span> (Redhat, Centos, Ubuntu),
+  <span class="standout">Windows</span>, <span class="standout">Unix</span>
+  (Solaris, HP-UX), <span class="standout"><a href="http://cygwin.com">Cygwin</a></span></p>
+
+  <h3>Networking</h3>
+
+  <p>TCP/IP, Windows and Unix Networking, <span
+  class="standout">Active Directory/LDAP</span>, <span
+  class="standout">Samba</span></p>
+
+  <h3>Software</h3>
+
+  <table align=center border=1 cellspacing=0 cellpadding=2 width="60%">
+    <tbody>
+      <tr>
+        <th>Version Control Systems</th>
+        <td>
+          <span class="standout">Git</span>, <span class="standout">Perforce</span>,
+          <span class="standout">Clearcase</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Issue Tracking</th>
+        <td>
+          <span class="standout">JIRA</span>, <span class="standout">Clearquest</span>,
+          <span class="standout">Bugzilla</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Languages</th>
+        <td>
+          <span class="standout">Perl</span>, <span class="standout">Bash</span>,
+          <span class="standout">PHP</span>, <span class="standout">C++</span>,
+          <span class="standout">C</span>, <span class="standout">Ada</span>,
+          <span class="standout">TCL</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Middleware</th>
+        <td>
+          <span class="standout">Apache</span>, <span class="standout">Tomcat</span>,
+          <span class="standout">Samba</span>, <span class="standout">Winbind</span>,
+          <span class="standout">LDAP</span>, <span class="standout">REST</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Web Apps</th>
+        <td>
+          <span class="standout">JIRA</span>, <span class="standout">Confluence</span>,
+          <span class="standout">Swarm</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Databases</th>
+        <td>
+          <span class="standout">MySQL</span>, <span class="standout">Oracle</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Coninuous Integration</th>
+        <td>
+          <span class="standout">Build Forge</span>, <span class="standout">Electric Commander</span>,
+          <span class="standout">Jenkins</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Virtualization</th>
+        <td>
+          <span class="standout">VMWare</span>, <span class="standout">VirtualBox</span>,
+          <span class="standout">vSphere</span>, <span class="standout">vCenter</span>
+        </td>
+      </tr>
+      <tr>
+        <th>Cloud Computing</th>
+        <td>
+          <span class="standout">AWS: EC2</span>, 
+          <span class="standout">IAM</span>, 
+          <span class="standout">S3</span>, 
+          <span class="standout">Glacier</span>, 
+          <span class="standout">CloudFront</span>, 
+          <span class="standout">Route53, 
+          <span class="standout">VPC</span>
+        </td>
+      </tr>
+    </tbody>
+  </table>
+
+  <h3>Education</h3>
+
+  <p>
+    A.A.S. in Computer Science from Union County College in Scotch Plains, New
+    Jersey. Continued studies at Fairleigh Dickenson University,  San Jose State
+
+    University, Mission College and Chico State in pursuit of my degree.</p>
+
+  <h3>References</h3>
+
+  <table align=center border=1 cellspacing=0 cellpadding=2 width="90%">
+    <tbody>
+      <tr>
+        <td><a href="http://www.linkedin.com/profile/view?id=276869">Tom Connor</a></td>
+        <td>(512)-422-1172</td>
+        <td><a href="mailto:tomhillconnor@yahoo.com">tomhillconnor@yahoo.com</a></td>
+        <td>Coworker, Consultant</td>
+      </tr>
+      <tr>
+        <td><a href="http://www.linkedin.com/profile/view?id=700521">James Chen</a></td>
+        <td>(408)-845-5360</td>
+        <td><a href="mailto:jchen@salira.com">jchen@salira.com</a></td>
+        <td>Vice President of Engineering,<br>Salira Optical Network Systems</td>
+      </tr>
+      <tr>
+        <td><a href="http://www.linkedin.com/profile/view?id=12113821">Omair Ahmed</a></td>
+        <td>(224) 715-9786</td>
+        <td><a href="mailto:Omair.Ahmed@ge.com">omair.ahmed@ge.com</a></td>
+        <td>Coworker, General Electric</td>
+      </tr>
+      <tr>
+        <td><a href="http://www.linkedin.com/profile/view?id=1023014">Shivdutt Jha</a></td>
+        <td>(408)-806-3476</td>
+        <td><a href="mailto:shivdutt_jha@hotmail.com">shivdutt_jha@hotmail.com</a></td>
+        <td>Coworker, Consultant</td>
+      </tr>
+    </tbody>
+  </table>
+
+  <br>
+
+  <hr noshade>
+
+  <h2>Clients</h2>
+
+  <hr noshade>
+
+  <p><a href="https://gdmissionsystems.com/en/satellite-ground-systems/mobile-user-objective-system">
+  <img src="General_Dynamics_logo.jpg" alt="General Dynamics" border="0"></a></p>
+
+  <p>March 2018 - Present<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/General%20Dynamics">General Dynamics</a></font>
+
+  <p>For this technology refresh of over a decade ago, I was instrumental in 
+  setting up and maintain dozens of Solaris 5.11 zone systems. This includes setup
+  of many services like NIS, DNS, NTP, SMTP, AutoFS as well as a standard set of
+  tools.
+
+  <p>Introduced <span class="standout">Puppet</span> to the group and served as
+  the <span class="standout">Puppet Master</span>.</p>
+
+  <p>Created Windows based VMs for specific roles such as BuildForge Console,
+  Application server, Domain Controllers, etc. These were managed under vCenter.</p>
+
+  <p>Developed <span class="standout">Perl</span> scripts for validation testing
+  of Clearcase and Clearquest. Developed a Clearcase enhanced monitoring tool to
+  monitor servers and systems as well as Clearcase objects like VOBs and views.</p>
+  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest</span>
+
+  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom/Avago" border="0"></a></p>
+
+  <hr noshade>
+
+  <p>August 2016 - January 2018<br>
+  <font class=dim>Contract</font><br>
+
+  <p>Converted an internal project from a <span class="standout">Jenkins</span>/
+  <span class="standout">Perforce</span> build system to the Broadcom/Avago 
+  standard of <span class="standout">Electric Commander</span>/
+  <span class="standout">Git</span>. Developed Perl scripts to sign executables
+  and remotely execute commands on Windows systems using <span 
+  class="standout">Cygwin/ssh</span> thus streamlining and standardizing remote
+  building and signing of executables.</p>
+
+  <hr noshade>
+
+  <p>May 2016 - July 2016<br>
+  <font class=dim>Contract</font><br>
+
+  <p><a href="http://icann.org"><img alt="ICANN" src="ICANN.png" border="0"></a><br></p>
+
+  <p>Developed <a 
+  href="https://en.wikipedia.org/wiki/Registration_Data_Access_Protocol">RDAP</a>
+  server for testing SLA compliance of various TLD registrars around the world.</p>
+
+  <hr noshade>
+
+  <p><a href="http://audience.com"><img alt="Audience" src="Audience.png" border="0"></a><br><b>A Knowles Company</b></p>
+
+  <p>March 2014 - April 2016<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Audience">Audience</a></p>
+
+  <p><span class="standout">Devops Admin</span>: Initially wrote scripts to 
+  import data from <span class="standout">Bugzilla</span> and other sources to
+  <span class="standout">JIRA</span> thus automating the migration of several
+  projects. Also administered <span class="standout">Linux</span> servers
+  (<span class="standout">Centos</span>/<span
+  class="standout">Ubuntu</span>/<span class="standout">Redhat Enterprise</span>)
+  managing VM images in vSphere,
+  <span class="standout">Perforce</span>, <span class="standout">Swarm</span>, 
+  <span class="standout">Git Fusion</span>.</p>
+
+  <p>Added functionality to custom build system that utilized <span 
+  class="standout">Perl</span>/<span class="standout">PHP</span>/<span 
+  class="standout">Apache</span>/<span class="standout">Linux</span>/<span 
+  class="standout">Windows</span> servers to allow engineers in the field to 
+  remotely perform customized builds. Integrated Bugzilla and Perforce (P4DTG). 
+  Assisted with JIRA setup and integration of <span 
+  class="standout">Salesforce</span> with JIRA. Assisted in the migration
+  for users to new Knowles domain.</p>
+
+  <hr noshade>
+
+  <p><a href="http://www.axcient.com"><img src="Axcient.png" alt="Axcient" border="0"></a></p>
+
+  <p>July 2013 - Dec 2013<br>
+  <font class=dim>Contract</font><br>
+  <a href="http://defaria.com/blogs/Status/archives/cat_axcient.html">Axcient</a></p>
+
+  <p>Worked as a <span class="standout">Build and Release Engineer</span> for
+  AxOS. The Axcient product is a customized derivative of <span 
+  class="standout">Ubuntu</span>. The SCM system being used is <span 
+  class="standout">git</span>. Developed and standardized procedures for 
+  performing builds.</p>
+
+  <hr noshade>
+
+  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif" alt="Broadcom" border="0"></a></p>
+
+  <p>December 2011 - April 2013<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
+
+  <p><span class="standout">Clearquest Designer</span>: Maintained Clearquest 
+  instances implementing functionality with <span class="standout">Visual Basic</span>. 
+  Using ClearSCM's <a 
+  href="http://clearscm.com/php/scm_man.php?file=lib/Clearcase.pm">Clearquest</a>, 
+  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server</a>,
+  <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client</a>
+  and <a href="http://clearscm.com/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a>
+  modules created <span class="standout">Perforce</span> and <span class="standout">Git</span>
+  triggers to automate builds updating Clearquest in the process.</p>
+
+  <p>Migrated a project from their unsupported build environment into the standard
+  <span class="standout"><a
+  href="http://www.electric-cloud.com/products/electriccommander.php">Electric 
+  Commander</a></span>/<span class="standout">Perforce</span> based solution 
+  using <span class="standout">Cygwin</span>, <span class="standout">bash</span>
+  and <span class="standout">LSF</span> to farm builds out to a pool of <span 
+  class="standout">Windows</span> servers to perform builds. Builds were done 
+  using <span class="standout">Visual Studio</span> 8.0, 9.0 and 10.0 on Windows
+  Servers triggered by Perforce triggers at code checkin.</p>
+
+  <hr noshade>
+
+  <p><a href="http://www.tellabs.com"><img src="Tellabs.gif" alt="Tellabs" border="0"></a></p>
+
+  <p>March 2011 - December 2011<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Tellabs">Tellabs</a></font>
+
+  <p>Automated various informational systems using <span 
+  class="standout">Perl</span>/<span class="standout">MySQL</span>/<span 
+  class="standout">Oracle</span>, and the web.</p>
+
+  <p>Developed a command line debugger called <a 
+  href="http://clearscm.com/php/scm_man.php?file=bin/raid">RAID</a> (a Real
+  Aid In Debugging) which provided a consistent interface with complete command 
+  history and variable substitution courtesy of a Perl module that I wrote 
+  called <a 
+  href="http://clearscm.com/php/scm_man.php?file=lib/CmdLine.pm">Cmdline.pm</a>.
+  This Perl process utilized <span class="standout">Inline::C</span> to 
+  interface to the developer libraries and provide a consistent interface for 
+  the various command line debuggers developed by various different groups.</p>
+
+  <hr noshade>
+
+  <p><a href="https://www2.gehealthcare.com/portal/site/usen"><img src="GEHealthcare.gif" alt="General Electric" border="0"></a></p>
+
+  <p>January 2010 - October 2010<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/General%20Electric">General Electric</a></font>
+
+  <p>Performed <span class="standout">Clearcase</span>/<span 
+  class="standout">Clearquest UCM</span> administration. Developed an <a 
+  href="http://clearscm.com/php/scm_man.php?file=cc/etf.pl">Evil Twin Finder</a>
+  in Perl. Worked with <span class="standout">Build Forge</span> (IBM's CI tool
+  similar to <span class="standout">Jenkins</span>) jobs to automate work flow.
+  Assisted in consultations with UCM concepts such as component/composite
+  baselines and projects. Wrote Perl scripts for conversions of Clearquest data
+  with other systems (Siebel).</p>
+
+  <hr noshade>
+
+  <p><a href="http://www.gdc4s.com"><img src="General_Dynamics_logo.jpg" alt="General Dynamics" border="0"></a></p>
+
+  <p>June 2007 - October 2009<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/General%20Dynamics">General Dynamics</a></font>
+
+  <p><span class="standout">Clearcase</span>/<span class="standout">Clearquest</span>
+  Administrator, <span class="standout">Build Release</span> and 
+  <span class="standout">Automation</span> using <span 
+  class="standout">Perl</span> scripts. Updated <span 
+  class="standout">C++</span>/<span class="standout">Qt</span> application that
+  integrates <span class="standout">UCM</span>/Clearquest integrated environment
+  into one tool and ported it to Linux.</p>
+
+  <p>Instrumental in establishment of Perl standards and introduction of Perl
+  tools such as <a href="http://perlcritic.com/">Perl::Critic</a>
+  and <a href="http://perltidy.sourceforge.net/">Perl::Tidy</a>.
+  Worked at promoting usage of CPAN modules.</p>
+
+  <p>Developed an extensive test driver application in Perl to interface and
+  drive tests using <a href="https://www.nethawk.fi/products/nethawk_simulators/">NetHawk
+  EAST Simulators</a> as well as interfacing to other simulators and external
+  hardware. The system automates the running of regression tests, official
+  testing before the customer, assists with validation of test results,
+  collecting of log files, checking log files into Clearcase and records status
+  into a MySQL database. Developed a PHP web page to present the data in various
+  forms including graphs, reports, exporting to CSV files and emailing of
+  reports. Implemented maintenance programs to scrub and keep the data clean.
+  This system was instrumental in Functional Quality Testing for the <a 
+  href="http://en.wikipedia.org/wiki/Mobile_User_Objective_System">MUOS</a>
+  program. This reduced the time it took to certify testing with the military several
+  fold.</p>
+
+  <p>Worked on many enhancements to the extensive Clearquest system in use at
+  GD. Designed and developed the record set implementing node configurations.
+  Implemented required forms and action hook code. Designed and developed Perl
+  scripts to initially load data into the new records.</p>
+
+  <p>Developed a server process (daemon) to process baseline records that were
+  then tracked by Clearquest. Implemented scripts to create baseline records
+  from other automated process such as Build Forge. Tied together baseline
+  records with node configurations through action hook code.</p>
+
+  <hr noshade>
+
+  <p><a href="http://ti.com"><img src="TexasInstruments.jpg"
+  alt="Texas Instruments" title="Texas Instruments" border=0></a></p>
+
+  <p>October 2006 - June 2007<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Texas%20Instruments">Texas Instruments</a></font>
+
+  <p><span class="standout">Clearcase</span>/<span 
+  class="standout">Clearquest</span> Administrator. Wrote a <span 
+  class="standout">Perl</span>/<span class="standout">Oracle</span>
+  application to track information about projects worldwide. Automated Clearcase
+  license usage reporting and load balancing of Clearquest web servers.</p>
+
+  <hr noshade>
+
+  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
+  Packard Company" title="Hewlett Packard Company" border=0></a></p>
+
+  <p>February 2006 - October 2006<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/HP">Hewlett Packard</a></p>
+
+  <p>Managed and executed day to day build and release duties. Served as
+  <span class="standout">Clearcase/Clearquest</span> Administrator as well as 
+  overall support of systems. Assisted with creating UCM streams and handling of
+  rebase and delivery issues for engineers and the build/release process. Wrote
+  <span class="standout">UCM triggers</span> to notify users of deliveries from
+  UCM development streams. Created baselines for official builds. Took over day
+  to day build and release duties. Created a build script that united the
+  various quick and dirty build scripts that were oriented per stream and per
+  build option. This standardized the build process. Augmented this build script
+  to be a daemon that continually builds software when deliveries are detected.
+  Wrote a build status web page that tracks and monitors the continuous
+  building. Created a dynamic web page to show Junit test history. Converted
+  Windows build from bat files and scheduled tasks -> Cygwin and cron thus
+  making the build script identical on both Linux and Windows. Wrote triggers
+  to notify users of deliveries. Baselined official builds. Automated the build
+  process to perform simple continuous integration. Created a dynamic web page
+  to show Junit test history.
+
+  <hr noshade>
+
+  <p><a href="http://www.broadcom.com"><img src="Broadcom.gif"
+  alt="Broadcom" title="Broadcom" border="0"></a></p>
+
+  <p>September 2005 - January 2006<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Broadcom">Broadcom</a></p>
+
+  <p>Served as <span class="standout">Clearcase/Clearquest</span> Administrator
+  as well as overall support of systems. Developed several <a href="http://clearscm.com/clearcase/triggers.php">triggers</a>
+  as well as ported my <a href="http://clearscm.com/clearcase/triggers.php">mktriggers</a>
+  script which automates the maintenance of triggers.</p>
+
+  <p>Developed a complex <a hef="http://clearscm.com/clearquest/db.php">Perl script</a>
+  to merge two Clearquest databases to a new database with many schema changes.
+  This script handled all aspects of the conversion including changing non US
+  ASCII characters found in the data to their HTML equivalents, dynamic creation
+  of dynamic lists, field renaming and dynamically creating new stateless
+  records as needed.</p>
+
+  <p>Developed a script to better handle merging from UCM deliveries and rebases
+  by delaying any non automatic merges to the end of the process as well as
+  handle binary element merge. This process, written in Perl, utilized PerlTk to
+  present the user with a GUI dialog box to choose which version of the binary
+  file to merge.</p>
+
+  <p>Designed and developed another Clearquest database for the Mobile
+  Multimedia group.</p>
+
+  <p>Wrote several other scripts including one to interface CVS to IMS (a defect
+  tracking system) recording the change set at commit time, a script to strip
+  out MIME/HTML and attachments for defects submitted to GNATS (another defect
+  tracking system). Also implemented several script to log Clearcase activity,
+  check Clearcase's pulse and gather site and vob statistics. These scripts were
+  the start for creation of a set Object Oriented Perl modules to encapsulate
+  Clearcase in a Perl like manner (still in development).</p>
+
+  <hr noshade>
+
+  <p><a href="http://www.lynuxworks.com"><img src="Lynuxworks.gif"
+  alt="Lynuxworks" title="Lynuxworks" border="0"></a></p>
+
+  <p>December 2004 - September 2005<br>
+  <a href="https://defaria-status.blogspot.com/search/label/LynuxWorks">LynuxWorks</a></p>
+
+  <p>Served as a build engineer in the Integration Group responsible for
+  building LynxOS (Linux RTOS) as well as tool chains, testing, releasing and
+  process improvement. LynuxWorks uses CVS for version control.</p>
+
+  <p>Developed a process of providing full text search of the company's defect
+  database using Perl and Htdig (See <a href="http://clearscm.com/scripts/ecrd">ECRDig</a>).
+  Developed a web based report to show CVS activity as well as several other CVS
+  related utilities(See <a href="http://defaria.com/Resume/cvs_utilities">CVS
+  Utilities</a>) as well as report on the differences between two CVS tags.</p>
+
+  <p>Automated the build process so that nightly builds could be performed.
+  Developed a web application that allows one to maintain CVS account
+  information including account creation, setting/resetting of password, etc.</p>
+
+  <hr noshade>
+
+  <p><a href="https://www.ameriquestcorp.com/"><img src="Ameriquest.gif"
+  alt="Ameriquest" title="Ameriquest" border="0"></a></p>
+
+  <p>March 2004 - December 2005<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Ameriquest">Ameriquest</a></p>
+
+  <p>Served as Clearcase/Clearquest administrator to this major mortgage
+  company. As Ameriquest is just starting out I have been busy with importing
+  source code from flat file systems as well as PVCS and Visual Source Safe.
+  Also setting up vobs and regions taking into account security restrictions
+  and concerns. Assisted with designing of the Multisite scheme to India.
+  Participated in design of UCM model to be used for Ameriquest.</p>
+
+  <hr noshade>
+
+  <p><a href="http://krldesign.com/saliraweb/"><img src="Salira.gif"
+  alt="Salira" title="Salira" border="0"></a></p>
+
+  <p>August 2001 - February 2004<br>
+  <a href="https://defaria-status.blogspot.com/search/label/Salira">Salira</a></p>
+
+  <p>After consulting briefly with Salira Optical Network Systems I joined this
+  startup company serving in the role of Clearcase/Clearquest Administrator for
+  this mostly Windows shop. I helped others in setting up the 
+  Clearcase/Clearquest environment as well as provided Training.</p>
+
+  <p>I also served in the role of Release Engineer managing the build process.
+  I employed wide usage of <a href="http://cygwin.com/">Cygwin</a>, which is a
+  product that provides an extremely workable Unix like environment and
+  engineered a build environment around that using GNU make and other standard
+  Unix and GNU utilities. When users complained that building remotely was slow
+  I performed an analysis on build performance. I also performed Build Stress 
+  Testing where I characterized the effect of multiple simultaneous builds
+  performed on the server.</p>
+
+  <p>I also setup and developed their Clearquest bug tracking system as well
+  as served as an advisor/expert on Clearcase issues, branching strategies,
+  labeling and release management.</p>
+
+  <p>While working at Salira I designed and developed a tool in C that packaged
+  the product into a more compact form.</p>
+
+  <p>I designed and implemented a <a href="http://clearscm.com/clearquest/cqd">Clearquest
+  Daemon</a> which served as an interface between processes and Clearquest data.
+  This daemon serviced requests from web pages and triggers in order to get and
+  validate data from Clearquest.</p>
+
+  <p>Developed release web pages that managed releases and produced release
+  notes for every release.</p>
+
+  <p>Developed process automation scripts to perform automatic branch merging
+  and syncing.</p>
+
+  <p>Performed product installation testing for the web component on Linux
+  (SuSE) and Solaris as well as browser testing (Netscape).</p>
+
+  <p>Implemented test scaffolding in TCL/TK for test automation.</p>
+
+  <hr noshade>
+
+  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
+  Packard Company" title="Hewlett Packard Company" border=0></a></p>
+
+  <p>August 1999 - February 2001<br>
+  <font class=dim>Contract</font><br>
+  Systems Technology Division<br>
+  Enterprise Java Lab</p>
+
+  <p>Setup security system automating the running of Medusa (an internal
+  security audit tool) on approximately 100 machines. Reports are generated
+  automatically and are viewable on the web. Setup and maintained security
+  related patch depots.</p>
+
+  <p>Implemented nightly automation for the lab's machines including security
+  checks, automatic installation of line printer models, etc. This automation
+  was bundled into an SD-UX bundle.</p>
+
+  <p>Migrated user data to HP NetStorage 6000. Worked extensively with HP
+  NetStorage 6000 Support on problems with this machines OS and interfacing with
+  Windows 2000.</p>
+
+  <P>Migrated HP-UX applications from one application server to another.
+
+  <p>Participated in several critical planned networked down times where the
+  team was able to implement changes to the infrastructure, including migration
+  to Clearcase 4.0, migration of project and user data to HP NetStorage 6000's
+  and other such changes.</p>
+
+  <p>Set up Netscape Enterprise Web Server and iPlanet 4.1 Web Server.</p>
+
+  <hr noshade>
+
+  <p><a href="http://cisco.com"><img src="Cisco.gif" alt="Cisco Systems" 
+  title="Cisco Systems" border=0></a></p>
+
+  <p>March 1999 - August 1999<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Cisco">Cisco</a></p>
+
+  <p>Served as Clearcase/Unix Systems Administrator. Responsible for all
+  Clearcase operations in CNS/AD on Sun Solaris, HP-UX, Windows NT 4.0 and
+  Windows 2000. Assisted in creating additional View and Vob servers and
+  balancing the Clearcase load amongst them. Participated in Rational's Beta
+  program for Windows 2000. Installed, tested and documented Clearcase on
+  Windows 2000 as well as Windows NT 4.0.</p>
+
+  <p>Assisted in recovery of a catastrophic disk failure in a critical vob.
+  Assisted with implementing a backup strategy with Arcserve Open. Helped
+  evaluate system monitoring packages.</p>
+
+  <p>As CNS/AD was in a secured and isolated network, learned and assisted users
+  with ssh/scp.</p>
+
+  <hr noshade>
+
+  <a href="https://www.oracle.com/sun/index.html"><img src="Sun.jpg" alt="Sun Microsystems" 
+  title="Sun Microsystems" border=0></a></p>
+
+  <p>December 1998 - March 1999<br>
+  <font class=dim>Contract</font><br>
+  <a href="https://defaria-status.blogspot.com/search/label/Sun">Sun Microsystems</a></p>
+
+  <p>Worked on the Sunpeak Configuration Management team performing promotions
+  of code updates into test and production environments. Also worked on
+  improving the process flow of promotions utilizing make and rdist.</p>
+
+  <hr noshade>
+
+  <p><a href="http://hp.com"><img src="HPLogo.gif" alt="Hewlett
+  Packard Company" title="Hewlett Packard Company" border=0></a></p>
+
+  <p>February 1988 - November 1998<br>
+  Systems Technology Division<br>
+  Enterprise Java Lab</p>
+
+  <p>Primary Clearcase and Multisite Administrator for a large Clearcase
+  environment with approximately 1400 views and 180 vobs. Most vobs are
+  multisited between several other labs and I am responsible for resolving
+  Multisite problems. I also serve as general System Administrator, overseeing
+  approximately 400 machines in the lab. I help institute policies and
+  procedures to keep the network running smoothly. Also participate in the
+  design and restructuring the network topology and Clearcase topology by bring
+  in many Kittyhawks, Mohawks and Bravehawks (about 40 of them) for use as
+  Clearcase Vob, View and Build, Mail, Application, X Terminal and Web servers.
+  Assist in documenting setup and configuration as well as trouble shooting and
+  handling of patches for all lab wide shared resources.</p> 
+
+  <p>Responsible for setup and running of Windows NT domain, account setup and
+  print serving. Setup and evaluated Clearcase 3.2 on NT. Developed backup
+  strategy for NT systems. Maintain a repository of software tools as well as
+  evaluated and recommended several PC packages for lab usage. Main point of
+  contact for Windows 95/NT problem solving in the lab. Also sought after by
+  many people in Hewlett Packard relating to both PC and Unix configurations and
+  problem solving.</p>
+
+  <p>Also served as webmaster for the lab as well as consult on HTML questions
+  and design issues. Installed, configured and maintain the <a href="http://home.netscape.com/">Netscape</a>
+  Suitespot Servers including the Enterprise and Directory servers. Developed
+  several web pages and forms for the lab as well as run
+  <a href="https://web.archive.org/web/20001109171100/http://defaria.com/Quicken">The
+  Unofficial Quicken® Web Page.</a></p>
+
+  <p>I developed an Application Server providing many machines with many
+  software packages without the need for individual system administration
+  utilizing scripting and NFS heavily.</p>
+
+  <p>Prior to the Productivity Project I worked on COBOL/SoftBench product
+  which consists of encapsulating some core HP Micro Focus COBOL tools using C++
+  3.0 and the SoftBench Encapsulator libraries. Also, working on porting an
+  X/Motif application to MS Windows 3.1. The code is written using C++ 3.0 on
+  both the HP workstation and the PC (Borland C++ 3.1).</p>
+
+  <p>Worked in the Ada project on Ada/SoftBench. This project was similar to
+  COBOL/SoftBench in that it involved some SoftBench encapsulations using a
+  language called edl.</p>
+
+  <p>Worked producing Ada Bindings to Xlib, Xt and Motif. This involved using a
+  modified C compiler to translate C header and source files to Ada declarations
+  and function prototypes. Using this methodology we were able to migrate our
+  product from X11 R3 and Motif 1.0 to X11 R4 and Motif 1.1 in one week!</p>
+
+  <p>Worked on a project that produced Ada Bindings to HP-UX, which enabled me
+  to get good breath knowledge into all system calls, and another binding to
+  Starbase graphical subsystem.</p>
+
+  <p>Performed destructive testing on MPE/XL 1.0-1.3. Wrote several programs to
+  stress the OS. Submitted 300+ Service Requests many of which appeared on Must
+  Fix lists.</p>
+
+  <hr noshade>
+
+  <h2>Copyright (GPL)</h2>
+
+  <?php start_box ("cs2")?>
+    <a name="copyleft"></a>
+      <p style="color:#666">This resume is freely available; you can
+      redistribute it and/or modify it under the terms of the GNU
+      General Public License as published by the Free Software
+      Foundation; either version 2 of the License, or (at your option)
+      any later version. This means that if you modify this resume you
+      must include a copy of the original source or refer to its origin
+      at <a href="http://clearscm.com/Resumes/Andrew">http://clearscm.com/Resumes/Andrew</a>.</p>
+
+      <p style="color:#666">This resume is distributed in the hope
+      that it will be useful, but WITHOUT ANY WARRANTY; without even
+      the implied warranty of MERCHANTABILITY or FITNESS FOR A
+      PARTICULAR PURPOSE.  See the GNU General Public License for more
+      details.</p>
+
+      <p style="color:#666">You should have received a copy of the GNU
+      General Public License along with this resume; if not, write to
+      the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.</p>
+    </font>
+  <?php end_box ();?>
+
+  <?php copyright ("1988");?>
+
+<script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
+
+</body>
+</html>