ceph - sort osds by utilisation
Posted on Thu 20 September 2018 in Ceph • Tagged with ceph, crush, linux, notepad, code • 1 min read
Version 1: keep it simple
$ ceph osd df | awk '{ print "osd."$1, "size: "$5, "usage: " $8 }' | sort -nk5
OSDs can be listed twice - depends on the crushmap.
Version 2: json + python
$ ceph osd df tree -f json | python sort_hdd_osds.py
osd.28 utilization: 15.278888
osd.15 utilization: 19.700484 …
Continue reading