Commit 55da339e authored by Iustin Pop's avatar Iustin Pop

Node: add and export a 'used disk' function

This is similar to iMem.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
parent 425af248
......@@ -57,6 +57,7 @@ module Ganeti.HTools.Node
, availMem
, availCpu
, iMem
, iDsk
, conflictingPrimaries
-- * Formatting
, defaultFields
......@@ -435,6 +436,10 @@ availDisk t =
then 0
else _f - _l
-- | Computes the amount of used disk on a given node
iDsk :: Node -> Int
iDsk t = truncate (tDsk t) - fDsk t
-- | Computes the amount of available memory on a given node
availMem :: Node -> Int
availMem t =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment