Skip to content

Commit 1ccf07b

Browse files
committed
uwsgi/uwsgi_conf.sh updated to calculate cpu and thread number by shell script in app-server
1 parent 7afc70d commit 1ccf07b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config/app-server/uwsgi/uwsgi_conf.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ do
2121
fi
2222
done
2323

24-
p_num=$(grep -c processor /proc/cpuinfo) * 2
24+
let p_num=$(grep -c processor /proc/cpuinfo)*2
2525

2626
if [[ "$p_num" == "" ]]; then
2727
echo "this job can't access /proc/cpuinfo. so process number be setting as 4."
@@ -30,6 +30,8 @@ fi
3030

3131
th_num=$p_num
3232

33+
echo "process number is $p_num and thread number is $th_num "
34+
3335
while :
3436
do
3537
echo -n "Enter the service port number >"

0 commit comments

Comments
 (0)