From da09719d635dd3bd5e1688c8c1fe113dbfaccb0d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 16 Jan 2024 13:17:48 -0500 Subject: [PATCH] jjb: fix memory printing on FreeBSD Change-Id: I0f5b56d9008e08134f81563d9c54f1bb15cb843b Signed-off-by: Michael Jeanson --- scripts/common/print.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/common/print.sh b/scripts/common/print.sh index e101a9c..89c9043 100755 --- a/scripts/common/print.sh +++ b/scripts/common/print.sh @@ -18,8 +18,13 @@ print_hardware() { lscpu fi - print_blue "Memory Details" - free + if command -v free >/dev/null 2>&1; then + print_blue "Memory Details" + free -m + else + print_blue "Memory Details" + vmstat free + fi print_blue "Storage Details" df -H -T -- 2.34.1