From 7cf32a9fe82b5af46ca374f2a298a172b69f2575 Mon Sep 17 00:00:00 2001 From: davidm-arista <110118131+davidm-arista@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:36:12 -0800 Subject: [PATCH] Reduce generate_dump mem usage for cores (#3052) Add the core files to the tarball while they are been processed, this ensures that only one core file at a time will be consuming flash space inside the tarpath and the tarball. --- scripts/generate_dump | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_dump b/scripts/generate_dump index 552854bec..af1eef193 100755 --- a/scripts/generate_dump +++ b/scripts/generate_dump @@ -1536,9 +1536,9 @@ save_crash_files() { for file in $(find_files "/var/core/"); do # don't gzip already-gzipped log files :) if [ -z "${file##*.gz}" ]; then - save_file $file core false + save_file $file core false true else - save_file $file core true + save_file $file core true true fi done fi @@ -1549,9 +1549,9 @@ save_crash_files() { # don't gzip already-gzipped dmesg files :) if [ ! ${file} = "/var/crash/kexec_cmd" -a ! ${file} = "/var/crash/export" ]; then if [[ ${file} == *"kdump."* ]]; then - save_file $file kdump false + save_file $file kdump false true else - save_file $file kdump true + save_file $file kdump true true fi fi done