From f2475579f6e7bd624a932d0fa5e6a8d8a9e82215 Mon Sep 17 00:00:00 2001 From: "Ricaro.Cui" Date: Fri, 30 Jul 2021 10:17:50 +0800 Subject: [PATCH 1/2] add cpu instruction detected --- simpleInstall/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simpleInstall/install.sh b/simpleInstall/install.sh index 2b50685b5..f092048ee 100644 --- a/simpleInstall/install.sh +++ b/simpleInstall/install.sh @@ -156,6 +156,11 @@ function check_os() { info "The required value should be greater than ${conn_floor}. You can modify it in file '/etc/sysctl.conf'." exit 1 fi + # check cpu instruction + if [ X"$(cat /proc/cpuinfo | grep rdtscp | uniq)" == X"" ] + then + echo "The cpu instruction rdtscp is missing." && exit 1 + fi } function change_gausshome_owner() { From 81a52b291a90a33a1acc2689ca96dfa4cddffa01 Mon Sep 17 00:00:00 2001 From: "Ricaro.Cui" Date: Fri, 30 Jul 2021 14:18:08 +0800 Subject: [PATCH 2/2] add rdtscp detect --- simpleInstall/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/simpleInstall/install.sh b/simpleInstall/install.sh index f092048ee..d56b0e2a4 100644 --- a/simpleInstall/install.sh +++ b/simpleInstall/install.sh @@ -157,9 +157,11 @@ function check_os() { exit 1 fi # check cpu instruction - if [ X"$(cat /proc/cpuinfo | grep rdtscp | uniq)" == X"" ] - then - echo "The cpu instruction rdtscp is missing." && exit 1 + CPU_BIT=$(uname -m) + if [ X"$CPU_BIT" == X"x86_64" ]; then + if [ X"$(cat /proc/cpuinfo | grep rdtscp | uniq)" == X"" ]; then + echo "The cpu instruction rdtscp is missing." && exit 1 + fi fi }