mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[refactor] Use nproc to calculate number of cpu cores
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
total_mem=$(grep MemTotal /proc/meminfo | awk '{print $2}' | sed -r 's/.{3}$//')
|
||||
export total_mem
|
||||
|
||||
num_cpu_cores=$(grep -c "processor" /proc/cpuinfo | grep -v "KVM")
|
||||
num_cpu_cores=$(nproc)
|
||||
export num_cpu_cores
|
||||
|
||||
readarray -t cpu_core_list <<< "$(grep "processor" /proc/cpuinfo | grep -v "KVM" | awk '{print $3 ""}')"
|
||||
|
||||
Reference in New Issue
Block a user