Skip to content

Commit

Permalink
Merge pull request #435 from oarribas/test_object_count
Browse files Browse the repository at this point in the history
RFE-5765: Collect etcd object count
  • Loading branch information
openshift-merge-bot[bot] authored Oct 8, 2024
2 parents 175ca71 + 265f6d9 commit a3ddf7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions collection-scripts/gather_etcd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ echo "INFO: Getting etcdctl alarm list"
ocp4etcdctl alarm list -w json > ${ETCD_LOG_PATH}/alarm_list.json &
PIDS+=($!)

# object count
echo "INFO: Getting object count"
ocp4etcdctl get / --prefix --keys-only | sed '/^$/d' | cut -d/ -f3 | sort | uniq -c | sort -rn | awk '{print $2 ":" $1}' | jq -nRc ' [inputs | index(":") as $ix | {(.[:$ix]): .[$ix+1:]}] | add' > ${ETCD_LOG_PATH}/object_count.json &
PIDS+=($!)

echo "INFO: Waiting for etcd info collection to complete ..."
wait "${PIDS[@]}"
echo "INFO: Done collecting etcd information"
Expand Down

0 comments on commit a3ddf7f

Please sign in to comment.