From e4a51f40d4c3dd371786ac558fe9d7364060684d Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Thu, 17 Jun 2021 12:11:57 +0800 Subject: [PATCH] get cpuinfo and ip info to status_log --- test/infer.sh | 6 ++++++ test/test.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/infer.sh b/test/infer.sh index 78057705..ad32ffc5 100644 --- a/test/infer.sh +++ b/test/infer.sh @@ -34,6 +34,12 @@ ${python} -m pip install pynvml; ${python} -m pip install psutil; ${python} -m pip install GPUtil; +paddle_info="$(python3.7 -c "import paddle;print(f'paddle_version:{paddle.__version__}');print(f'paddle_commit:{paddle.__git_commit__}')")" +echo -e "\033[33m $paddle_info \033[0m" | tee -a ${status_log} +cpu_model=`cat /proc/cpuinfo | grep "model name" | awk -F ':' '{print $2}' | sort | uniq` +echo -e "\033[33m cpu_info:$cpu_model \033[0m" | tee -a ${status_log} +ip=`ifconfig| grep -A 1 'eth0'|grep 'inet'|awk -F ':' '{print $2}'|awk '{print $1}'` +echo -e "\033[33m ip_info:$ip \033[0m" | tee -a ${status_log} function status_check(){ last_status=$1 # the exit code diff --git a/test/test.sh b/test/test.sh index 02379baa..63686401 100644 --- a/test/test.sh +++ b/test/test.sh @@ -75,6 +75,12 @@ ${python} -m pip install psutil; ${python} -m pip install GPUtil; ${python} -m pip install paddlesim==2.0.0 +paddle_info="$(python3.7 -c "import paddle;print(f'paddle_version:{paddle.__version__}');print(f'paddle_commit:{paddle.__git_commit__}')")" +echo -e "\033[33m $paddle_info \033[0m" | tee -a ${status_log} +cpu_model=`cat /proc/cpuinfo | grep "model name" | awk -F ':' '{print $2}' | sort | uniq` +echo -e "\033[33m cpu_info:$cpu_model \033[0m" | tee -a ${status_log} +ip=`ifconfig| grep -A 1 'eth0'|grep 'inet'|awk -F ':' '{print $2}'|awk '{print $1}'` +echo -e "\033[33m ip_info:$ip \033[0m" | tee -a ${status_log} function status_check(){ last_status=$1 # the exit code -- GitLab