#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

hostname=$(hostname)
arch=$(lscpu | grep "^Architecture:" | awk '{print $NF}')
nr_cpu=$(lscpu | grep "^CPU(s):" | awk '{print $NF}')
nr_node=$(lscpu | grep "^NUMA node(s):" | awk '{print $NF}')
memory=$(lsmem | grep "^Total online memory:" | awk '{print $NF}')

echo "hostname: $hostname
arch: $arch
nr_cpu: $nr_cpu
nr_node: $nr_node
memory: $memory"
