Command to check CPU info on Linux

cat /proc/cpuinfo|grep processor|wc -l
OR
nproc --all
OR
getconf _NPROCESSORS_ONLN

Command to check CPU info on Solaris

psrinfo -v|grep "Status of processor"|wc -l

Command to check CPU info on AIX

lsdev -C|grep Process|wc -l

Command to check CPU info on HP/UX

ioscan -C processor | grep processor | wc -l