From 5687fdcf578eb44aa11f72646a11c284ea57838e Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 5 Mar 2024 17:46:43 -0500 Subject: [PATCH 1/2] fix pcapspace function --- salt/manager/tools/sbin/so-minion | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/manager/tools/sbin/so-minion b/salt/manager/tools/sbin/so-minion index d696e14c68..54587774f3 100755 --- a/salt/manager/tools/sbin/so-minion +++ b/salt/manager/tools/sbin/so-minion @@ -84,8 +84,8 @@ function pcapspace() { local SPACESIZE=$(df -k /nsm | tail -1 | awk '{print $2}' | tr -d \n) else - local NSMSIZE=$(salt '$MINION_ID' disk.usage --out=json | jq -r '.[]."/nsm"."1K-blocks" ') - local ROOTSIZE=$(salt '$MINION_ID' disk.usage --out=json | jq -r '.[]."/"."1K-blocks" ') + local NSMSIZE=$(salt "$MINION_ID" disk.usage --out=json | jq -r '.[]."/nsm"."1K-blocks" ') + local ROOTSIZE=$(salt "$MINION_ID" disk.usage --out=json | jq -r '.[]."/"."1K-blocks" ') if [[ "$NSMSIZE" == "null" ]]; then # Looks like there is no dedicated nsm partition. Using root @@ -97,7 +97,7 @@ function pcapspace() { local s=$(( $SPACESIZE / 1000000 )) local s1=$(( $s / 2 )) - local s2=$(( $s1 / $lb_procs )) + local s2=$(( $s1 / $CORECOUNT )) MAXPCAPFILES=$s2 From eaef076eba34104b5495aef002b8bab3e1b8422b Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Tue, 5 Mar 2024 17:52:24 -0500 Subject: [PATCH 2/2] Update so-minion --- salt/manager/tools/sbin/so-minion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/manager/tools/sbin/so-minion b/salt/manager/tools/sbin/so-minion index 6f037d3441..ab05fafcc6 100755 --- a/salt/manager/tools/sbin/so-minion +++ b/salt/manager/tools/sbin/so-minion @@ -96,8 +96,8 @@ function pcapspace() { fi local s=$(( $SPACESIZE / 1000000 )) - local s2=$(( $s1 / $CORECOUNT )) local s1=$(( $s / 4 )) + local s2=$(( $s1 / $CORECOUNT )) MAXPCAPFILES=$s2