------=_Part_1975_22825888.1395147966654
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Nice !=20
----- Original Message -----
D=C5=88a 18.03.2014 13:24, Federico Alberto Sayd wrote /
nap=C3=ADsal(a):
> On 24/02/14 13:59, Itamar Heim wrote:
=20
> > with oVirt 3.4 getting close to GA with many many great
features,
> > time to collect requests for 3.5...
>=20
=20
> Add progress bar to task tab to indicate the progress percent
of
> snapshot creation, vm clonation, migration, etc.
=20
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=3D1
PROC=3D${1:-"qemu-img"}
PID=3D`pidof $PROC`
if [ "x$PID" =3D=3D "x" ]
then
echo "No $PROC running"
exit 1
fi
LV=3D$(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=3D$(/sbin/lvs --noheadings --unquoted --options lv_size --units
b
$LV | sed -e 's/B//g' )
LAST=3D0
while [[ -e /proc/$PID/fd/ ]] ;
do
CUR=3D$(grep rchar /proc/$PID/io | cut -f 2 -d " ")
PERC=3D$(echo $CUR*100/$SIZE | bc)
SPEED=3D$(echo \($CUR-$LAST\)/1024/1024 | bc)
SIZE2=3D$(echo $SIZE / 1024 / 1024 / 1024| bc)
echo "$SIZE2 GB / $CUR B [$PERC%] - $SPEED MB/s"
sleep $SECS;
LAST=3D$CUR
done
--
Ernest Beinrohr, AXON PRO
Ing , RHCE , RHCVA , LPIC , VCA , +421-2--6241-0360 ,
+421-903--482-603
icq:28153343, gtalk: oernii(a)axonpro.sk , jabber:oernii@jabber.org
=E2=80=9CFor a successful technology, reality must take precedence
over
public relations, for Nature cannot be fooled.=E2=80=9D Richard Feynman
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
------=_Part_1975_22825888.1395147966654
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D'text/css'>p { margin: 0;
}</style></head><body><=
div style=3D'font-family: arial,helvetica,sans-serif; font-size: 10pt; colo=
r: #000000'>Nice !<br><br><hr
id=3D"zwchr"><blockquote style=3D"border-left=
:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:=
normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,s=
ans-serif;font-size:12pt;">
=20
=20
=20
=20
<div class=3D"moz-cite-prefix">D=C5=88a 18.03.2014 13:24, Federico
Albe=
rto
Sayd wrote / nap=C3=ADsal(a):<br>
</div>
<blockquote cite=3D"mid:53283AF4.1050500@uncu.edu.ar">On
24/02/14 13:59, Itamar Heim wrote:
<br>
<blockquote>with oVirt 3.4 getting close to GA with
many many great features, time to collect requests for 3.5...
<br>
<br>
</blockquote>
Add progress bar to task tab to indicate the progress percent of
snapshot creation, vm clonation, migration, etc.
<br>
</blockquote>
<br>
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.<br>
<br>
<tt
<br>
</tt><tt>#!/bin/bash</tt><tt
<br>
</tt><tt
<br>
</tt><tt>SECS=3D1</tt><tt
<br>
</tt><tt>PROC=3D${1:-"qemu-img"}</tt><tt
<br>
</tt><tt>PID=3D`pidof
$PROC`</tt><tt
<br>
</tt><tt
<br>
</tt><tt>if [ "x$PID"
=3D=3D "x" ]</tt><tt
<br>
</tt><tt>then</tt><tt
<br>
</tt><tt>
echo "No $PROC runn=
ing"</tt><tt
<br>
</tt><tt>
exit 1</tt><tt
<br>
</tt><tt>fi</tt><tt
<br>
</tt><tt
<br>
</tt><tt>LV=3D$(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')</tt><tt><=
br>
</tt><tt
<br>
</tt><tt>SIZE=3D$(/sbin/lvs --noheadings --unquoted --options lv_size
--units b $LV | sed -e 's/B//g' )</tt><tt
<br>
</tt><tt
<br>
</tt><tt>LAST=3D0</tt><tt
<br>
</tt><tt>while [[ -e /proc/$PID/fd/ ]] ;</tt><tt
<br>
</tt><tt>do</tt><tt
<br>
</tt><tt>
CUR=3D$(grep rchar =
/proc/$PID/io | cut -f 2 -d " ")</tt><tt
<br>
</tt><tt>
PERC=3D$(echo $CUR*=
100/$SIZE | bc)</tt><tt
<br>
</tt><tt>
SPEED=3D$(echo \($C=
UR-$LAST\)/1024/1024 | bc)</tt><tt
<br>
</tt><tt>
SIZE2=3D$(echo $SIZ=
E / 1024 / 1024 / 1024| bc)</tt><tt
<br>
</tt><tt>
echo "$SIZE2 GB / $=
CUR B [$PERC%] - $SPEED MB/s"</tt><tt
<br>
</tt><tt>
sleep $SECS;</tt><t=
t
<br>
</tt><tt>
LAST=3D$CUR</tt><tt=
<br>
</tt><tt>done</tt
<br>
<br>
<div class=3D"moz-signature">-- <br>
<div id=3D"oernii_footer" style=3D"color: gray;">
<span style=3D"font-family: Lucida Console, Luxi Mono, Courier,
monospace; font-size: 90%;">
Ernest Beinrohr, AXON PRO<br>
<a style=3D"text-decoration: none; color: gray;"
href=3D"http://w=
ww.beinrohr.sk/ing.php" target=3D"_blank">Ing</a>, <a
style=3D"text-decorat=
ion: none; color: gray;" href=3D"http://www.beinrohr.sk/rhce.php"
target=3D=
"_blank">RHCE</a>, <a style=3D"text-decoration: none; color:
gray;" href=3D=
"http://www.beinrohr.sk/rhce.php"
target=3D"_blank">RHCVA</a>, <a style=3D"=
text-decoration: none; color: gray;" href=3D"http://www.beinrohr.sk/lpic.ph=
p" target=3D"_blank">LPIC</a>, <a
style=3D"text-decoration: none; color: gr=
ay;" href=3D"http://www.beinrohr.sk/vca.php"
target=3D"_blank">VCA</a>, <a =
style=3D"text-decoration: none; color: gray;"
href=3D"callto://+421-2--6241=
-0360" target=3D"_blank">+421-2--6241-0360</a>, <a
style=3D"text-decoration=
: none; color: gray;" href=3D"callto://+421-903--482-603"
target=3D"_blank"=
>+421-903--482-603</a
<br>
icq:28153343,
gtalk: <a class=3D"moz-txt-link-abbreviated" href=
=3D"mailto:oernii@axonpro.sk"
target=3D"_blank">oernii(a)axonpro.sk</a>,
<a class=3D"moz-txt-link-abbreviated"
href=3D"mailto:jabber:oerni=
i(a)jabber.org" target=3D"_blank">jabber:oernii@jabber.org</a>
<br>
</span>
<hr style=3D"height: 1px; width: 95%"> <span
style=3D"font-size:
70%;">
=E2=80=9CFor a successful technology, reality must take precedenc=
e
over public relations, for Nature cannot be fooled.=E2=80=9D Rich=
ard
Feynman </span> </div>
</div>
<img border=3D"0" width=3D"1" height=3D"1"
src=3D"http://nojsstats.apps=
pot.com/UA-44497096-1/email.beinrohr.sk">
=20
<br>_______________________________________________<br>Users mailing
list<b=
r>Users@ovirt.org<br>http://lists.ovirt.org/mailman/listinfo/users<br></blo=
ckquote><br></div></body></html>
------=_Part_1975_22825888.1395147966654--