diff --git a/Ganeti/HTools/Node.hs b/Ganeti/HTools/Node.hs index 3452ee1ec3fc73850cf16b684aea22cddc5a873a..f7f316f6bb5827f0eaa2242e8f761b98da8c7b4b 100644 --- a/Ganeti/HTools/Node.hs +++ b/Ganeti/HTools/Node.hs @@ -431,6 +431,7 @@ availCpu t = showField :: Node -> String -> String showField t field = case field of + "idx" -> printf "%4d" $ idx t "name" -> alias t "fqdn" -> name t "status" -> if offline t then "-" @@ -446,8 +447,10 @@ showField t field = "fdsk" -> printf "%5d" $ fDsk t `div` 1024 "tcpu" -> printf "%4.0f" $ tCpu t "ucpu" -> printf "%4d" $ uCpu t - "plist" -> printf "%3d" $ length (pList t) - "slist" -> printf "%3d" $ length (sList t) + "pcnt" -> printf "%3d" $ length (pList t) + "scnt" -> printf "%3d" $ length (sList t) + "plist" -> show $ pList t + "slist" -> show $ sList t "pfmem" -> printf "%6.4f" $ pMem t "pfdsk" -> printf "%6.4f" $ pDsk t "rcpu" -> printf "%5.2f" $ pCpu t @@ -457,6 +460,7 @@ showField t field = "nload" -> printf "%5.3f" uN "ptags" -> intercalate "," . map (\(k, v) -> printf "%s=%d" k v) . Map.toList $ pTags t + "peermap" -> show $ peers t _ -> T.unknownField where T.DynUtil { T.cpuWeight = uC, T.memWeight = uM, @@ -467,6 +471,7 @@ showField t field = showHeader :: String -> (String, Bool) showHeader field = case field of + "idx" -> ("Index", True) "name" -> ("Name", False) "fqdn" -> ("Name", False) "status" -> ("F", False) @@ -481,8 +486,10 @@ showHeader field = "fdsk" -> ("f_dsk", True) "tcpu" -> ("pcpu", True) "ucpu" -> ("vcpu", True) - "plist" -> ("pri", True) - "slist" -> ("sec", True) + "pcnt" -> ("pcnt", True) + "scnt" -> ("scnt", True) + "plist" -> ("primaries", True) + "slist" -> ("secondaries", True) "pfmem" -> ("p_fmem", True) "pfdsk" -> ("p_fdsk", True) "rcpu" -> ("r_cpu", True) @@ -491,6 +498,7 @@ showHeader field = "dload" -> ("lDsk", True) "nload" -> ("lNet", True) "ptags" -> ("PrimaryTags", False) + "peermap" -> ("PeerMap", False) _ -> (T.unknownField, False) -- | String converter for the node list functionality. @@ -501,6 +509,6 @@ list fields t = map (showField t) fields defaultFields :: [String] defaultFields = [ "status", "name", "tmem", "nmem", "imem", "xmem", "fmem" - , "rmem", "tdsk", "fdsk", "tcpu", "ucpu", "plist", "slist" + , "rmem", "tdsk", "fdsk", "tcpu", "ucpu", "pcnt", "scnt" , "pfmem", "pfdsk", "rcpu" , "cload", "mload", "dload", "nload" ] diff --git a/hbal.1 b/hbal.1 index 1790fd12a971af74fa87df1236c01ada2fbdeda7..0a60f012826652e0ff62f1dcaa520a068a617525 100644 --- a/hbal.1 +++ b/hbal.1 @@ -298,10 +298,10 @@ the number of physical cpus on the node .B vcpu the number of virtual cpus allocated to primary instances .TP -.B pri +.B pcnt number of primary instances .TP -.B sec +.B scnt number of secondary instances .TP .B p_fmem diff --git a/hspace.1 b/hspace.1 index 066d08fe45d68bd86822283263a35d7caf2d2d49..2f73f171063ebbec2c2c0e783e6fed721e597a64 100644 --- a/hspace.1 +++ b/hspace.1 @@ -289,10 +289,10 @@ the number of physical cpus on the node .B vcpu the number of virtual cpus allocated to primary instances .TP -.B pri +.B pcnt number of primary instances .TP -.B sec +.B pcnt number of secondary instances .TP .B p_fmem