Skip to content

Commit

Permalink
Decrease usable space in log partition to 90% (sonic-net#1648)
Browse files Browse the repository at this point in the history
95 is too close to the edge because by default 5% is already reserved for super-user

Signed-off-by: Andriy Moroz <[email protected]>

    RB=1315593
    G=lnos-reviewers
    R=pchaudha,pmao,rmolina,zxu
    A=
  • Loading branch information
andriymoroz-mlnx authored and zhenggen-xu committed May 25, 2018
1 parent aa9eb4d commit 72954d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions files/image_config/logrotate/logrotate.d/rsyslog
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

VAR_LOG_SIZE_KB=$(df -k /var/log | sed -n 2p | awk '{ print $2 }')

# Limit usable space to 95% of the partition minus the reserved space for other logs
USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 95 / 100) - RESERVED_SPACE_KB))
# Limit usable space to 90% of the partition minus the reserved space for other logs
USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB))

# Set our threshold so as to maintain enough space to write all logs from empty to full
# Most likely, some logs will have non-zero size when this is called, so this errs on the side
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/sonic-platform-modules-cel

0 comments on commit 72954d0

Please sign in to comment.