Skip to content

[Feature Request] Add number of sockets to system information script #378

@nbornstein

Description

@nbornstein

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions