jjb: fix memory printing on FreeBSD
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Jan 2024 18:17:48 +0000 (13:17 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Jan 2024 18:17:59 +0000 (13:17 -0500)
Change-Id: I0f5b56d9008e08134f81563d9c54f1bb15cb843b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/common/print.sh

index e101a9c24df3c088cd4fa3a3d817a319a08fd4ae..89c904335b6221dc821f782809a07677d52382dd 100755 (executable)
@@ -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
This page took 0.024589 seconds and 4 git commands to generate.