mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Change how the size is determined, in case there a decimal value is provided
This commit is contained in:
@@ -44,7 +44,7 @@ for i in $(/usr/sbin/so-elasticsearch-query _cat/allocation | grep -v {{ GLOBALS
|
|||||||
{% else %}
|
{% else %}
|
||||||
for i in $(/usr/sbin/so-elasticsearch-query _cat/allocation | awk '{print $5}'); do
|
for i in $(/usr/sbin/so-elasticsearch-query _cat/allocation | awk '{print $5}'); do
|
||||||
{% endif %}
|
{% endif %}
|
||||||
size=$(echo $i | grep -oE '[0-9]+')
|
size=$(echo $i | grep -oE '[0-9].*' | awk '{print int($1+0.5)}')
|
||||||
unit=$(echo $i | grep -oE '[A-Za-z]+')
|
unit=$(echo $i | grep -oE '[A-Za-z]+')
|
||||||
if [ $unit = "tb" ]; then
|
if [ $unit = "tb" ]; then
|
||||||
size=$(( size * 1024 ))
|
size=$(( size * 1024 ))
|
||||||
|
|||||||
Reference in New Issue
Block a user