Skip to content

Commit 72954d0

Browse files
andriymoroz-mlnxzhenggen-xu
authored andcommitted
Decrease usable space in log partition to 90% (sonic-net#1648)
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=
1 parent aa9eb4d commit 72954d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

files/image_config/logrotate/logrotate.d/rsyslog

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555

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

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

6161
# Set our threshold so as to maintain enough space to write all logs from empty to full
6262
# Most likely, some logs will have non-zero size when this is called, so this errs on the side

0 commit comments

Comments
 (0)