Display two more stats in hspace
authorIustin Pop <iustin@google.com>
Fri, 3 Jul 2009 19:40:35 +0000 (22:40 +0300)
committerIustin Pop <iustin@google.com>
Fri, 3 Jul 2009 19:40:35 +0000 (22:40 +0300)
This adds two new stats - sum of reserved ram and disk.

hspace.hs

index 4d5c0f5..4a5c2f1 100644 (file)
--- a/hspace.hs
+++ b/hspace.hs
@@ -191,8 +191,12 @@ printStats :: String -> Cluster.CStats -> IO ()
 printStats kind cs = do
   printf "%s free RAM: %d\n" kind (Cluster.cs_fmem cs)
   printf "%s allocatable RAM: %d\n" kind (Cluster.cs_amem cs)
+  printf "%s reserved RAM: %d\n" kind ((Cluster.cs_fmem cs) -
+                                       (Cluster.cs_amem cs))
   printf "%s free disk: %d\n" kind (Cluster.cs_fdsk cs)
   printf "%s allocatable disk: %d\n" kind (Cluster.cs_adsk cs)
+  printf "%s reserved disk: %d\n" kind ((Cluster.cs_fdsk cs) -
+                                        (Cluster.cs_adsk cs))
   printf "%s max node allocatable RAM: %d\n" kind (Cluster.cs_mmem cs)
   printf "%s max node allocatable disk: %d\n" kind (Cluster.cs_mdsk cs)