From 8e61e98572dc4d9e3227ee27508d05d1e91174e6 Mon Sep 17 00:00:00 2001 From: "Saravanabalagi @ICHEC" Date: Mon, 16 Mar 2020 13:56:19 +0000 Subject: [PATCH] Adding check stats script --- sbatch_stats.sh | 12 ++++++++++++ script_check_stats.sh | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 sbatch_stats.sh create mode 100644 script_check_stats.sh diff --git a/sbatch_stats.sh b/sbatch_stats.sh new file mode 100644 index 0000000..f4f1725 --- /dev/null +++ b/sbatch_stats.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +#SBATCH --time=00:20:00 +#SBATCH --nodes=1 +#SBATCH -A nuim01 +#SBATCH -p GpuQ + +#SBATCH -o outfile # send stdout to outfile +#SBATCH -e outfile # send stderr to errfile +#SBATCH --job-name python-test-run + +srun /bin/sh ~/singularity/scripts/script_check_stats.sh diff --git a/script_check_stats.sh b/script_check_stats.sh new file mode 100644 index 0000000..1130d39 --- /dev/null +++ b/script_check_stats.sh @@ -0,0 +1,17 @@ +# Check number of cores +printf "CPU: $(cat /proc/cpuinfo | grep -m1 "model name" | awk -F': ' '{print $2}')\n" +printf "Number of Cores: $(cat /proc/cpuinfo | grep processor | wc -l)\n\n" + +# Check GPUs +nvidia-smi +printf "\n" + +# CHeck memory +printf "Memory Stats\n" +free -m --human + +# Print environment variables +printf -- "----------------\n\n" +echo "Environment Variables" +env +printf -- "----------------\n\n"