Index: trunk/Nebulous-Server/bin/nebdiskd
===================================================================
--- trunk/Nebulous-Server/bin/nebdiskd	(revision 19791)
+++ trunk/Nebulous-Server/bin/nebdiskd	(revision 19796)
@@ -3,5 +3,5 @@
 # Copyright (C) 2007  Joshua Hoblitt
 # 
-# $Id: nebdiskd,v 1.7 2008-10-01 00:30:53 jhoblitt Exp $
+# $Id: nebdiskd,v 1.8 2008-10-01 20:42:31 jhoblitt Exp $
 
 use strict;
@@ -15,7 +15,7 @@
 use File::Mountpoint qw( is_mountpoint );
 use File::Spec;
+use Filesys::Df;
 use Nebulous::Server::SQL;
 use Net::Server::Daemonize qw( daemonize unlink_pid_file );
-use Sys::Statistics::Linux::DiskUsage;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
@@ -95,6 +95,4 @@
     my $poll_interval   = $p{poll_interval} || 60;
     my $debug           = $p{debug} || 0;
-
-    my $lxs = Sys::Statistics::Linux::DiskUsage->new;
 
     while (1) {
@@ -137,16 +135,12 @@
             # this has to be done AFTER we determine what the valid mountpoints
             # are incase is_mountpoint() invokes the automounter
-            my $stats = $lxs->get;
-            $stats = fix_disk_stats($stats);
-
             foreach my $mnt (@valid_mounts) {
-                my $dev_info = $stats->{$mnt};
+                my $dev_info = df($mnt, 1024);
                 unless (defined $dev_info) {
-                    print "can't find device info for $mnt\n"
-                        if $debug;
+                    print "can't find device info for $mnt\n" if $debug;
                     next;
                 }
-                $query->execute(@$dev_info{qw( mountpoint total usage )});
-                print "adding $dev_info->{mountpoint} to db\n" if $debug;
+                $query->execute($mnt, @$dev_info{qw( blocks used )});
+                print "adding $mnt to db\n" if $debug;
             }
 
