You can halve the time by running "rbd du" once, keep the output and run the grep over the output instead.
Den tors 2 aug. 2018 kl 12:53 skrev <xiang.dai@xxxxxxxxxxx>:
_______________________________________________Hi!I want to monitor rbd image size to enable enlager size when use percentage above 80%.I find a way with `rbd du`:total=$(rbd du $rbd_name | grep $rbd_name | awk '{print $2}')used=$(rbd du $rbd_name | grep $rbd_name | awk '{print $3}')percentage=((used/total))But in this way, it speed a lot time since fast-diff do not enable.Is there a better way to check this?Thanks
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
May the most significant bit of your life be positive.
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com