@@ -30,7 +30,7 @@ prerequisite()
echo "CPU online/offline summary:"
online_cpus=`cat $SYSFS/devices/system/cpu/online`
- online_max=${online_cpus##*-}
+ online_max=${online_cpus##*[-|,]}
if [[ "$online_cpus" = "$online_max" ]]; then
echo "$msg: since there is only one cpu: $online_cpus"
@@ -38,7 +38,7 @@ prerequisite()
fi
present_cpus=`cat $SYSFS/devices/system/cpu/present`
- present_max=${present_cpus##*-}
+ present_max=${present_cpus##*[-|,]}
echo "present_cpus = $present_cpus present_max = $present_max"
echo -e "\t Cpus in online state: $online_cpus"
@@ -47,7 +47,7 @@ prerequisite()
if [[ "a$offline_cpus" = "a" ]]; then
offline_cpus=0
else
- offline_max=${offline_cpus##*-}
+ offline_max=${offline_cpus##*[-|,]}
fi
echo -e "\t Cpus in offline state: $offline_cpus"
}