-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Rancher customers sometimes use the system information script to determine the number of nodes being managed by Rancher for purposes of right-sizing subscriptions. With the current subscription model we look at sockets so it would be useful to list number of sockets per node as well as everything else. I have done some work on this but it needs improvement. Here's the code I have so far:
for node in $(kubectl get nodes -l 'node-role.kubernetes.io/worker=true' -o custom-columns=NAME:.metadata.name --no-headers);
do
echo -n "${node}: ";
kubectl debug -q -it node/${node} --image=registry.suse.com/bci/bci-base:15.7 -- bash -c 'grep "physical id" /proc/cpuinfo | sort -u | wc -l';
sleep 2;
kubectl delete pod $(kubectl get pods -o custom-columns=NAME:.metadata.name | grep node-debugger-${node}) > /dev/null;
done
Ideally this socket information would be included inline with the other node information, not as a separate script as I've done here.
Metadata
Metadata
Assignees
Labels
No labels