Index: /branches/eam_branches/ipp-20110213/Nebulous-Server/bin/neb-admin
===================================================================
--- /branches/eam_branches/ipp-20110213/Nebulous-Server/bin/neb-admin	(revision 30678)
+++ /branches/eam_branches/ipp-20110213/Nebulous-Server/bin/neb-admin	(revision 30679)
@@ -312,8 +312,9 @@
       SELECT mountedvol.vol_id,mountedvol.name,mountedvol.available,mountedvol.allocate,total,used,
              (used / total) AS D,total * ((used / total) - $average ) AS R,  -- average
+             (used / total) - $average AS delta,
              cab_id FROM
       mountedvol JOIN volume USING(vol_id)
       WHERE mountedvol.available = 1
-      ORDER BY R DESC LIMIT $balance_N_sources                                            -- N
+      ORDER BY delta DESC LIMIT $balance_N_sources                                            -- N
       ) AS ranked_sources
       -- Z End
@@ -337,8 +338,9 @@
    SELECT mountedvol.vol_id,mountedvol.name,mountedvol.host,mountedvol.available,mountedvol.allocate,total,used,
           (used / total) AS D,total * ((used / total) - $average ) AS R,  -- average
+          (used / total) - $average AS delta,
           cab_id FROM
    mountedvol JOIN volume USING(vol_id)
    WHERE mountedvol.available = 1 AND mountedvol.allocate = 1
-   ORDER BY R ASC LIMIT $balance_M_destinations                                               -- M
+   ORDER BY delta ASC LIMIT $balance_M_destinations                                               -- M
   ) AS ranked_destinations
   -- Z2 End
