Skip to content

Commit

Permalink
优化CPU_CORES获取
Browse files Browse the repository at this point in the history
  • Loading branch information
guohongze committed Dec 1, 2017
1 parent 5c94647 commit 92be22c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install/client/adminset_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_cpu_model():


def get_cpu_cores():
cpu_cores = {"logical": psutil.cpu_count(logical=False), "physical": psutil.cpu_count()}
cpu_cores = {"physical": psutil.cpu_count(logical=False) if psutil.cpu_count(logical=False) else 0, "logical": psutil.cpu_count()}
return cpu_cores


Expand Down

0 comments on commit 92be22c

Please sign in to comment.