mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
计算优化
This commit is contained in:
@@ -53,7 +53,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$cpuCore" -gt "1" ];then
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'`
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user