rawdump: only show dd progress bar when core_collector is not makedumpfile

When using makedumpfile as core_collector, makedumpfile will show its
own progress bar, it will mix with the monitor_dd_progress and cause confusion.
In this patch just call monitor_dd_progress when core_collector is not
makedumpfile

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
This commit is contained in:
Baoquan He 2013-06-25 16:40:43 +08:00
parent bdb3042f07
commit 315848036b

View File

@ -102,15 +102,12 @@ dump_raw()
echo "kdump: saving to raw disk $_raw"
if $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then
_src_size_mb="Unknown"
else
if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then
_src_size=`ls -l /proc/vmcore | cut -d' ' -f5`
_src_size_mb=$(($_src_size / 1048576))
monitor_dd_progress $_src_size_mb &
fi
monitor_dd_progress $_src_size_mb &
echo "kdump: saving vmcore"
$CORE_COLLECTOR /proc/vmcore | dd of=$_raw bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1