1524d6569d
Why I did it The existing log file size in sonic is 1 Mb. Over a period of time this leads to huge number of log files which becomes difficult for monitoring applications to handle. Instead of large number of small files, the size of the log file is not set to 16 Mb which reduces the number of files over a period of time. How I did it Changed the size parameter and related macros in logrotate config for rsyslog How to verify it Execute logrotate manually and verify the limit when the file gets rotated. Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
5 lines
173 B
Bash
Executable File
5 lines
173 B
Bash
Executable File
#!/bin/bash
|
|
|
|
sonic-cfggen -d -t /usr/share/sonic/templates/rsyslog.j2 -a "{\"var_log_kb\":$(df -k /var/log | sed -n 2p | awk '{ print $2 }') }" > /etc/logrotate.d/rsyslog
|
|
|