[ To find cpu cores ]
AIX | lsdev -Cc processor | wc -l | awk '{ print $1 }' |
HP-UX | (pa-risc)
/opt/ignite/bin/print_manifest or ioscan -fknC processor (ia64) machinfo | grep -v 'core.*logical' | awk '/[0-9] core/ { print $1 }' |
SunOS | psrinfo -vp | awk '/processor has/ { sum+=$5 } END { print sum }' |
Linux | cat /proc/cpuinfo | grep 'core id' | sort | uniq | wc -l | awk '{ print $1 * "'${CPU_SOCKET}'" }' |
Windows | (wmic cpu get NumberOfCores | findstr /v NumberOfCores | findstr /v "^$" | Measure-Object -Sum | select Sum | findstr /v "^$" | select -Last 1).Trim() |
No comments:
Post a Comment