Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /lib/dracut/modules.d/99kdumpbase/ |
#!/bin/sh SRC_FILE_MB=$1 while true do DD_PID=`pidof dd` if [ -n "$DD_PID" ]; then break fi done while true do sleep 5 if [ ! -d /proc/$DD_PID ]; then break fi kill -s USR1 $DD_PID CURRENT_SIZE=`tail -n 1 /tmp/dd_progress_file | sed "s/[^0-9].*//g"` [ -n "$CURRENT_SIZE" ] && { CURRENT_MB=$(($CURRENT_SIZE / 1048576)) echo -e "Copied $CURRENT_MB MB / $SRC_FILE_MB MB\r" } done rm -f /tmp/dd_progress_file