[Users] oVirt 3.5 planning
Ernest Beinrohr
Ernest.Beinrohr at axonpro.sk
Tue Mar 18 12:38:42 UTC 2014
Dn(a 18.03.2014 13:24, Federico Alberto Sayd wrote / napísal(a):
> On 24/02/14 13:59, Itamar Heim wrote:
>> with oVirt 3.4 getting close to GA with many many great features,
>> time to collect requests for 3.5...
>>
> Add progress bar to task tab to indicate the progress percent of
> snapshot creation, vm clonation, migration, etc.
I needed this a long time ago, so i hacked this together. You shoud run
it on the SPM host. Also, i only use iscsi storage.
#!/bin/bash
SECS=1
PROC=${1:-"qemu-img"}
PID=`pidof $PROC`
if [ "x$PID" == "x" ]
then
echo "No $PROC running"
exit 1
fi
LV=$(ls -l /dev/mapper/ | grep `ls -l /proc/$PID/fd/|grep dm- | cut -f 3
-d/ | head -n1` | gawk '{print $9}' | sed -e 's/--/XX/g' -e 's/-/\//g'
-e 's/XX/-/g' -e 's/^/\/dev\//g')
SIZE=$(/sbin/lvs --noheadings --unquoted --options lv_size --units b $LV
| sed -e 's/B//g' )
LAST=0
while [[ -e /proc/$PID/fd/ ]] ;
do
CUR=$(grep rchar /proc/$PID/io | cut -f 2 -d " ")
PERC=$(echo $CUR*100/$SIZE | bc)
SPEED=$(echo \($CUR-$LAST\)/1024/1024 | bc)
SIZE2=$(echo $SIZE / 1024 / 1024 / 1024| bc)
echo "$SIZE2 GB / $CUR B [$PERC%] - $SPEED MB/s"
sleep $SECS;
LAST=$CUR
done
--
Ernest Beinrohr, AXON PRO
Ing <http://www.beinrohr.sk/ing.php>, RHCE
<http://www.beinrohr.sk/rhce.php>, RHCVA
<http://www.beinrohr.sk/rhce.php>, LPIC
<http://www.beinrohr.sk/lpic.php>, VCA <http://www.beinrohr.sk/vca.php>,
+421-2--6241-0360 <callto://+421-2--6241-0360>, +421-903--482-603
<callto://+421-903--482-603>
icq:28153343, gtalk: oernii at axonpro.sk, jabber:oernii at jabber.org
------------------------------------------------------------------------
"For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled." Richard Feynman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140318/946c4a12/attachment-0001.html>
More information about the Users
mailing list