Re: questions about rbd used percentage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux