Index: /trunk/ippMonitor/czartool/czarpoll.pl
===================================================================
--- /trunk/ippMonitor/czartool/czarpoll.pl	(revision 42930)
+++ /trunk/ippMonitor/czartool/czarpoll.pl	(revision 42931)
@@ -13,4 +13,7 @@
 use List::MoreUtils qw(uniq);
 use DateTime;
+# This tells Perl: âalso look in the same directory where this script livesâ.
+use FindBin;
+use lib "$FindBin::Bin";
 
 # local classes
@@ -390,10 +393,10 @@
         # check ippdb host IPP-2338
         print "* Checking ippdb hosts\n";
-        my @hosts = qw(ipphome2 ipphome3 ippdb01 ippdb05 ippdb06 ippdb09 ippdb11 ippdb12 ippdb13 ippdb14);
-        if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @hosts);}
+        my @ippdb_hosts = qw(ipphome2 ipphome3 ippdb01 ippdb05 ippdb06 ippdb09 ippdb11 ippdb12 ippdb13 ippdb14);
+        if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @ippdb_hosts);}
 
         print "* Checking ippdvo hosts\n";
-        my @hosts = qw(ippdvo00 ippdvo01 ippdvo02 ippdvo03 ippdvo04 ippdvo05 ippdvo06 ippdvo07 ippdvo08 ippdvo09 ippdvo10 ippdvo11 ippdvo12 ippdvo13 ippdvo14 ippdvo15);
-        if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @hosts);}
+        my @ippdvo_hosts = qw(ippdvo00 ippdvo01 ippdvo02 ippdvo03 ippdvo04 ippdvo05 ippdvo06 ippdvo07 ippdvo08 ippdvo09 ippdvo10 ippdvo11 ippdvo12 ippdvo13 ippdvo14 ippdvo15);
+        if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @ippdvo_hosts);}
 
         # check pantasks status
@@ -632,47 +635,53 @@
         print " - Checking $host...\n";
 
-        for my $suffix (0, 1) {
+        # Determine which suffixes to check
+        my @suffixes;
+        if ($host eq 'ippdb06') {
+            @suffixes = (1);   # only .1
+        } else {
+            @suffixes = (0);   # all others only .0
+        }
+
+        foreach my $suffix (@suffixes) {
             my $mount_point = "/export/$host.$suffix";
 
-            # Use SSH to get disk stats
+            # --- Default values ---
+            my $total_tb     = 0;
+            my $used_tb      = 0;
+            my $available_tb = 0;
+            my $readable     = 0;
+            my $writable     = 0;
+            my $xattr        = 9;
+
+            # SSH/df
             my $df_output = `ssh $host df -k $mount_point 2>/dev/null`;
 
-            #if (!$df_output || $df_output !~ /\d/) {
-            #    warn "Failed to get disk usage for $host on $mount_point\n";
-            #    next;
-            #}
-
-            my @lines = split /\n/, $df_output;
-            my $line = $lines[1] || next;
-
-            my ($filesystem, $blocks, $used, $available, $percent, $mount) = split /\s+/, $line;
-
-            # Convert KB to TB
-            my $total_tb     = sprintf("%.3f", $blocks    / 1024 / 1024 / 1024 );
-            my $used_tb      = sprintf("%.3f", $used      / 1024 / 1024 / 1024 );
-            my $available_tb = sprintf("%.3f", $available / 1024 / 1024 / 1024 );
-
-            my $used_percent      = sprintf("%.3f", $used / $blocks * 100);
-            my $available_percent = sprintf("%.3f", $available / $blocks * 100);
-
-            my $readable = 1;
-            my $writable = 1;
-            my $xattr = 9;
-
-            #print "Mount $mount_point: total=${total_tb}TB, used=${used_tb}TB (${used_percent}%), available=${available_tb}TB (${available_percent}%)\n";
+            if ($df_output && $df_output =~ /\d/) {
+                my @lines = split /\n/, $df_output;
+                my $line = $lines[1];
+
+                if ($line) {
+                    my ($filesystem, $blocks, $used, $available, $percent, $mount) = split /\s+/, $line;
+
+                    if ($blocks && $blocks > 0) {
+                        $total_tb     = sprintf("%.3f", $blocks    / 1024 / 1024 / 1024 );
+                        $used_tb      = sprintf("%.3f", $used      / 1024 / 1024 / 1024 );
+                        $available_tb = sprintf("%.3f", $available / 1024 / 1024 / 1024 );
+
+                        $readable = 1;
+                        $writable = 1;
+                    }
+                }
+            } else {
+                warn " ! Failed to SSH/df $host:$mount_point, defaulting to zeros\n";
+            }
 
             my $host_label = "$host.$suffix";
 
-            if ($host_label =~ /ippdvo/i) {        # case-insensitive match
-                $xattr = 8;                        # override for ippdvo hosts
+            if ($host_label =~ /ippdvo/i) {
+                $xattr = 8;
             }
 
-            # --- Skip update if total TB < 1 ---
-            if ($total_tb < 1) {
-                warn " ! Skipping $host_label because total TB ($total_tb) < 1\n";
-                next;
-            }
-
-            # Update host in DB
+            # Update DB
             $czarDb->updateHost($host_label, $total_tb, $available_tb, $used_tb, $readable, $writable, $xattr);
         }
Index: /trunk/ippMonitor/czartool/czartool/Config.pm
===================================================================
--- /trunk/ippMonitor/czartool/czartool/Config.pm	(revision 42930)
+++ /trunk/ippMonitor/czartool/czartool/Config.pm	(revision 42931)
@@ -6,5 +6,6 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use POSIX qw/strftime/;
-use CGI::Pretty qw[:standard];
+# use CGI::Pretty qw[:standard];
+use CGI qw(:standard -utf8);
 use XML::LibXML;
 
Index: /trunk/ippMonitor/czartool/czartool/DayMetrics.pm
===================================================================
--- /trunk/ippMonitor/czartool/czartool/DayMetrics.pm	(revision 42930)
+++ /trunk/ippMonitor/czartool/czartool/DayMetrics.pm	(revision 42931)
@@ -6,5 +6,6 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use POSIX qw/strftime/;
-use CGI::Pretty qw[:standard];
+#use CGI::Pretty qw[:standard];
+use CGI qw(:standard -utf8);
 
 use czartool::CzarDb;
Index: /trunk/ippMonitor/czartool/czartool/Metrics.pm
===================================================================
--- /trunk/ippMonitor/czartool/czartool/Metrics.pm	(revision 42930)
+++ /trunk/ippMonitor/czartool/czartool/Metrics.pm	(revision 42931)
@@ -6,5 +6,6 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use POSIX qw/strftime/;
-use CGI::Pretty qw[:standard];
+#use CGI::Pretty qw[:standard];
+use CGI qw(:standard -utf8);
 
 use czartool::CzarDb;
Index: /trunk/ippMonitor/czartool/czartool/MetricsIndex.pm
===================================================================
--- /trunk/ippMonitor/czartool/czartool/MetricsIndex.pm	(revision 42930)
+++ /trunk/ippMonitor/czartool/czartool/MetricsIndex.pm	(revision 42931)
@@ -6,5 +6,6 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use POSIX qw/strftime/;
-use CGI::Pretty qw[:standard];
+# use CGI::Pretty qw[:standard];
+use CGI qw(:standard -utf8);
 
 use czartool::CzarDb;
Index: /trunk/ippMonitor/czartool/czartool/MultiDayMetrics.pm
===================================================================
--- /trunk/ippMonitor/czartool/czartool/MultiDayMetrics.pm	(revision 42930)
+++ /trunk/ippMonitor/czartool/czartool/MultiDayMetrics.pm	(revision 42931)
@@ -6,5 +6,6 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use POSIX qw/strftime/;
-use CGI::Pretty qw[:standard];
+#use CGI::Pretty qw[:standard];
+use CGI qw(:standard -utf8);
 
 use czartool::CzarDb;
