Would you split it into 2 patches?
Thanks, Fengguang
On Sat, Oct 10, 2020 at 06:14:48PM +0800, Zhang Yu wrote:
Signed-off-by: Zhang Yu 2134782174@qq.com
tests/host-info | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/host-info b/tests/host-info index 9b8bfc50..6ee8df21 100755 --- a/tests/host-info +++ b/tests/host-info @@ -5,8 +5,8 @@ get_node() echo "nr_node: $(grep -Eo 'Node [0-9]+,' /proc/zoneinfo | uniq | wc -l)" echo "nr_cpu: $(nproc)" memory_total=$(cat /proc/meminfo |grep MemTotal | awk '{print $2}')
- memory_new=$(awk 'BEGIN{printf "%0.2f", '$memory_total'/1024/1024}')
- memory=$(echo $memory_new | awk '{print int($0)+1}')G
- memory_new=$(awk 'BEGIN{printf "%0.2f", '$memory_total'/1024/1024/16}')
- memory=$(echo `expr $(echo $memory_new | awk '{print int($0)+1}') * 16`)G echo "memory: $memory"
}
@@ -80,6 +80,11 @@ get_partitions() fi }
+get_ipmi_ip() +{
- echo "ipmi_ip: $(ipmitool lan print |grep -E "IP Address\s*:" | awk '{print $4}')"
+}
main() { get_node @@ -87,6 +92,7 @@ main() get_partitions get_mac get_model_name
- get_ipmi_ip
}
main
2.23.0