Skip to content

Commit

Permalink
feat(utils): add ceph disk size collector
Browse files Browse the repository at this point in the history
  • Loading branch information
HoKim98 committed Sep 8, 2024
1 parent 56a2447 commit 054de46
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/batch-reduce-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ SSH_KEYFILE_PATH="${SSH_KEYFILE_PATH:-$SSH_KEYFILE_PATH_DEFAULT}"
echo 'box,label,value' >>"${DST_PATH}"

echo 'Running for boxes'
for line in $(cat "${CSV_PATH}" | tail '+2'); do
box_id="$(echo "${line}" | cut '-d,' -f1)"
box_name="$(echo "${line}" | cut '-d,' -f2)"
for box_id in $(kubectl get box -o jsonpath='{.items[*].metadata.name}'); do
box_name=$(kubectl get box "${box_id}" --no-headers | awk '{print $2}')

echo -n "* ${box_name} -> "
echo -n "${box_id},${box_name}," >>"${DST_PATH}"
Expand Down
9 changes: 9 additions & 0 deletions utils/batch-reduce-template-ceph-disk-size.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

exec echo "$(
lsblk -bdno NAME,FSTYPE,SIZE,TYPE |
grep -P ' ceph_bluestore ' |
awk '{print $3}' |
paste -sd+ - |
bc
)"
Empty file modified utils/batch-reduce-template-estimate-speed.sh
100644 → 100755
Empty file.

0 comments on commit 054de46

Please sign in to comment.