From: Michael Jeanson Date: Tue, 16 Jan 2024 18:17:48 +0000 (-0500) Subject: jjb: fix memory printing on FreeBSD X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=da09719d635dd3bd5e1688c8c1fe113dbfaccb0d;hp=d0ffdf18a1f18f7fd4eaac5882ab18d846b08725;p=lttng-ci.git jjb: fix memory printing on FreeBSD Change-Id: I0f5b56d9008e08134f81563d9c54f1bb15cb843b Signed-off-by: Michael Jeanson --- 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