X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Fcommon%2Fprint.sh;h=89c904335b6221dc821f782809a07677d52382dd;hb=46e62ae0432d3eac15d2040762eb2c2820c7703a;hp=5da444401c4b2ffe79d4001f490b34b27bafdd92;hpb=2ecf17f9bc8a9b9a0cfc19ef012086ae411aa66f;p=lttng-ci.git diff --git a/scripts/common/print.sh b/scripts/common/print.sh index 5da4444..89c9043 100755 --- a/scripts/common/print.sh +++ b/scripts/common/print.sh @@ -1,19 +1,7 @@ #!/bin/bash # -# Copyright (C) 2020 Michael Jeanson -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# SPDX-FileCopyrightText: 2020 Michael Jeanson +# SPDX-License-Identifier: GPL-2.0-or-later set -exu @@ -24,6 +12,24 @@ print_blue() { echo -e "${COLOR_BLUE}$1${COLOR_NONE}" } +print_hardware() { + if command -v lscpu >/dev/null 2>&1; then + print_blue "CPU Details" + lscpu + fi + + 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 +} + print_os() { set +ex