Index: trunk/ippMonitor/czartool/czarpoll.pl
===================================================================
--- trunk/ippMonitor/czartool/czarpoll.pl	(revision 42795)
+++ trunk/ippMonitor/czartool/czarpoll.pl	(revision 42798)
@@ -380,4 +380,9 @@
         }
 
+        # check ippdb host IPP-2338
+        print "* Checking ippdb hosts\n";
+        my @hosts = qw(ipphome0 ipphome1 ippdb01 ippdb05 ippdb06 ippdb09 ippdb11 ippdb12 ippdb13 ippdb14);
+        if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @hosts);}
+
         # check pantasks status
         if($dbupdate == 1) {updateServerStatus();}
@@ -604,2 +609,48 @@
 }
 
+###########################################################################
+#
+# Loops through given host and update to the host list
+#
+###########################################################################
+sub check_disk_usage_and_update {
+    my ($czarDb, @hosts) = @_;
+
+    foreach my $host (@hosts) {
+        print "Checking $host...\n";
+
+        for my $suffix (0, 1) {
+            my $mount_point = "/export/$host.$suffix";
+
+            # Use SSH to get disk stats
+            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("%.1f", $blocks    / 1024 / 1024 / 1024);
+            my $used_tb      = sprintf("%.1f", $used      / 1024 / 1024 / 1024);
+            my $available_tb = sprintf("%.1f", $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;
+
+            #print "Mount $mount_point: total=${total_tb}TB, used=${used_tb}TB (${used_percent}%), available=${available_tb}TB (${available_percent}%)\n";
+
+            # Example: ippdb01.0(3.5T)
+            my $host_label = "$host.$suffix(${total_tb}T)";
+            $czarDb->updateHost($host_label, 100, $available_percent, $used_percent, $readable, $writable);
+        }
+    }
+}
