X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fredraw.ml;h=0403158dd30a759eacc3a9a10b4024fa90caf95f;hb=9c8d3ba8382df450392a8c78ab45fc263742096c;hp=9ce889bd51d21ef933667a27bd6e61a71d365d2c;hpb=90d14bc151e488972d33eefaac2242d9a6e07578;p=virt-top.git diff --git a/src/redraw.ml b/src/redraw.ml index 9ce889b..0403158 100644 --- a/src/redraw.ml +++ b/src/redraw.ml @@ -155,8 +155,12 @@ let redraw display_mode sort_order | (name, Active rd) :: doms -> if lineno < lines then ( let state = show_state rd.rd_info.D.state in - let rd_req = Show.int64_option rd.rd_block_rd_info in - let wr_req = Show.int64_option rd.rd_block_wr_info in + let rd_info = + if block_in_bytes then Show.int64_option rd.rd_block_rd_bytes + else Show.int64_option rd.rd_block_rd_reqs in + let wr_info = + if block_in_bytes then Show.int64_option rd.rd_block_wr_bytes + else Show.int64_option rd.rd_block_wr_reqs in let rx_bytes = Show.int64_option rd.rd_net_rx_bytes in let tx_bytes = Show.int64_option rd.rd_net_tx_bytes in let percent_cpu = Show.percent rd.rd_percent_cpu in @@ -166,7 +170,7 @@ let redraw display_mode sort_order let line = sprintf "%5d %c %s %s %s %s %s %s %s %s" - rd.rd_domid state rd_req wr_req rx_bytes tx_bytes + rd.rd_domid state rd_info wr_info rx_bytes tx_bytes percent_cpu percent_mem time name in let line = pad cols line in mvaddstr lineno 0 line;