sonic-buildimage/files
Liping Xu ddb4ce1040 update rsyslog log size conf (#15821)
Why I did it
For some devices whose log folder size is larger than 200M, for example, 256M, the LOG_FILE_ROTATE_SIZE_KB should be 16M. and
THRESHOLD_KB=$((USABLE_SPACE_KB - (NUM_LOGS_TO_ROTATE * LOG_FILE_ROTATE_SIZE_KB * 2)))
= $(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB)) - (NUM_LOGS_TO_ROTATE * LOG_FILE_ROTATE_SIZE_KB * 2)))
= $(( (256M * 90 / 100) - 4096)) - (8 * 16M * 2)))
the result would be a negative value

Work item tracking
Microsoft ADO (number only):
24524827
How I did it
Add a case for 400M, if the log folder size is between 200M and 400M, set the log file size to 2M

How to verify it
Do cmd "sudo logrotate -f /etc/logrotate.conf" on DUT which val/log folder size is 256M, and check the syslog.
2023-09-01 14:33:30 +08:00
..
Aboot allow docker_inram to kernel cmd list (#15374) 2023-06-15 14:33:58 +08:00
apt [Build] set apt Acquire::Retries to 3 for bullseye (#12758) 2022-12-10 10:33:21 +08:00
build/versions [ci/build]: Upgrade SONiC package versions (#15361) 2023-06-06 19:46:12 +08:00
build_scripts During build time mask only those feature/services that are disabled excplicitly (#13283) (#13651) 2023-02-13 01:15:26 +08:00
build_templates Run db_migrator for non first-time reboots (#16116) 2023-08-31 14:33:00 +08:00
dhcp ZTP infrastructure changes to support DHCP discovery provisioning data (#3298) 2019-12-10 08:16:56 -08:00
docker [dockerd] Force usage of cgo DNS resolver (#13649) 2023-02-22 20:55:46 +08:00
image_config update rsyslog log size conf (#15821) 2023-09-01 14:33:30 +08:00
initramfs-tools [Arista] Add initial support for 720DT-48S (#10656) 2022-06-29 09:56:24 -07:00
scripts Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#15685) 2023-08-25 02:32:24 +08:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) 2022-04-25 10:38:52 -07:00