There are three reasons:
1. As designed now, do NOT output total virtual image size.
2. For monitoring and maintenance, just each node size info is enough
most of the time.
3. Getting total vdi size is time-consuming, especially where the
cluster is in recovery and inodes are not cached in memory.
Signed-off-by: Meng Lingkun <
mengl...@cmss.chinamobile.com>
---
dog/node.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dog/node.c b/dog/node.c
index 741f00c..607c691 100644
--- a/dog/node.c
+++ b/dog/node.c
@@ -130,9 +130,10 @@ static int node_info(int argc, char **argv)
return EXIT_SYSFAIL;
}
- if (parse_vdi(cal_total_vdi_size, SD_INODE_HEADER_SIZE,
- &total_vdi_size, true) < 0)
- return EXIT_SYSFAIL;
+ if (!raw_output)
+ if (parse_vdi(cal_total_vdi_size, SD_INODE_HEADER_SIZE,
+ &total_vdi_size, true) < 0)
+ return EXIT_SYSFAIL;
printf(raw_output ? "Total %s %s %s %d%% %s\n"
: "Total\t%s\t%s\t%s\t%3d%%\n\n"
--
1.8.3.1