mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
[refactor] Formatting change to calculate_useable_cores
This commit is contained in:
@@ -194,15 +194,11 @@ bro_logs_enabled() {
|
|||||||
calculate_useable_cores() {
|
calculate_useable_cores() {
|
||||||
|
|
||||||
# Calculate reasonable core usage
|
# Calculate reasonable core usage
|
||||||
local CORES4BRO=$(( CPUCORES/2 - 1 ))
|
local cores_for_bro=$(( CPUCORES/2 - 1 ))
|
||||||
LBPROCSROUND=$(printf "%.0f\n" $CORES4BRO)
|
local lb_procs_round
|
||||||
# We don't want it to be 0
|
lb_procs_round=$(printf "%.0f\n" $cores_for_bro)
|
||||||
if [ "$LBPROCSROUND" -lt 1 ]; then
|
|
||||||
LBPROCS=1
|
|
||||||
else
|
|
||||||
LBPROCS=$LBPROCSROUND
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ "$lb_procs_round" -lt 1 ]; then LBPROCS=1; else LBPROCS=$lb_procs_round; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_admin_pass() {
|
check_admin_pass() {
|
||||||
|
|||||||
Reference in New Issue
Block a user