The allssh command in a Nutanix CVM

The allssh command in a Nutanix CVM is an alias to __allssh which is a bash function defined in /usr/local/nutanix/profile.d/bashrc.

$ which allssh
alias allssh='__allssh'
$ type __allssh
__allssh is a function
__allssh () 
{ 
    CMDS=$@;
    OPTS="-t -o LogLevel=ERROR -o StrictHostKeyChecking=no";
    echo "Executing $CMDS on the cluster";
    for i in `svmips`;
    do
        echo "================== "$i" =================";
        /usr/bin/ssh $OPTS $i "source /etc/profile;$@";
    done
}
The allssh command in a Nutanix CVM

How to find the number of processors from dmidecode output?

If you have access to the system, you would probably use lscpu, nproc or /proc/cpuinfo. How do you find the number of available CPUs in a Linux server from dmidecode output if that is all you have?

$ grep CPU dmidecode_output.txt 
Socket Designation: CPU 0
Socket Designation: CPU 1
Socket Designation: CPU 2
Socket Designation: CPU 3
Socket Designation: CPU 4
Socket Designation: CPU 5
Socket Designation: CPU 6
Socket Designation: CPU 7
How to find the number of processors from dmidecode output?