403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.216.3.63
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/dracut/modules.d/99kdumpbase/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/dracut/modules.d/99kdumpbase/monitor_dd_progress
#!/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

Youez - 2016 - github.com/yon3zu
LinuXploit