Find cpu information in linux via script

ssh root@server.corp.com "bash -s" /tmp/server_cpu.txt

insert less than and greater symbols that include getcpu.sh after "bash -s" above

Save the following as getcpu.sh

cat /proc/cpuinfo | \
awk -v FS=':' ' \
/^physical id/ { if(nb_cpu<$2) { nb_cpu=$2 } } \
/^cpu cores/ { if(nb_cores<$2){ nb_cores=$2 } } \
/^processor/ { if(nb_units<$2){ nb_units=$2 } } \
/^model name/ { model=$2 } \
\
END{ \
nb_cpu=(nb_cpu+1); \
nb_units=(nb_units+1); \
\
print "CPU model:",model; \
print nb_cpu,"CPU,",nb_cores,"physical cores per CPU, total",nb_units,"logical CPU units" \
}'