Commit 352806f7 authored by Iustin Pop's avatar Iustin Pop
Browse files

Show offline nodes in the node status list

This patch adds a new ‘-’ flag for the node status which denotes offline
nodes.
parent 40d4eba0
......@@ -640,7 +640,7 @@ printNodes ktn nl =
m_name = maximum . (map length) . fst . unzip $ snl'
helper = Node.list m_name
header = printf "%2s %-*s %5s %5s %5s %5s %5s %3s %3s %7s %7s"
"N1" m_name "Name" "t_mem" "f_mem" "r_mem"
" F" m_name "Name" "t_mem" "f_mem" "r_mem"
"t_dsk" "f_dsk"
"pri" "sec" "p_fmem" "p_fdsk"
in unlines $ (header:map (uncurry helper) snl')
......
......@@ -219,10 +219,11 @@ list mname n t =
sl = slist t
mp = p_mem t
dp = p_dsk t
off = offline t
fn = failN1 t
in
printf " %c %-*s %5.0f %5d %5d %5.0f %5d %3d %3d %.5f %.5f"
(if fn then '*' else ' ')
(if off then '-' else if fn then '*' else ' ')
mname n (t_mem t) (f_mem t) (r_mem t)
((t_dsk t) / 1024) ((f_dsk t) `div` 1024)
(length pl) (length sl)
......
......@@ -106,8 +106,9 @@ Prints the before and after node status, in a format designed to allow
the user to understand the node's most important parameters.
The node list will contain these informations:
- a character denoting the N+1 status of the node, with blank
meaning pass and an asterisk ('*') meaning fail
- a character denoting the status of the node, with '-' meaning an
offline node, '*' meaning N+1 failure and blank meaning a good
node
- the node name
- the total node memory
- the free node memory
......
......@@ -92,8 +92,9 @@ Prints the before and after node status, in a format designed to allow
the user to understand the node's most important parameters.
The node list will contain these informations:
- a character denoting the N+1 status of the node, with blank
meaning pass and an asterisk ('*') meaning fail
- a character denoting the status of the node, with '-' meaning an
offline node, '*' meaning N+1 failure and blank meaning a good
node
- the node name
- the total node memory
- the free node memory
......
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