Skip to content

Commit

Permalink
Reduce generate_dump mem usage for cores (sonic-net#3052)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidm-arista authored Dec 8, 2023
1 parent 50380e1 commit 377e581
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -1611,9 +1611,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
Expand All @@ -1624,9 +1624,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
Expand Down

0 comments on commit 377e581

Please sign in to comment.