455 | | KERNEL=$(uname) |
456 | | if test "$KERNEL" = "Linux"; then |
457 | | # Linux should have /proc/cpuinfo |
458 | | CPU_MODEL=$(awk -F ":" '/model name/ {print $2}' /proc/cpuinfo | head -n 1) |
459 | | CPU_SPEED=$(awk 'BEGIN { IGNORECASE = 1 } /MHz/ { print $4 }' /proc/cpuinfo | head -n 1) |
460 | | # Test for multiple CPUs. If they are available, try to use them. |
461 | | if test $(grep "^processor" /proc/cpuinfo | wc -l) -ge "2"; then |
462 | | MULTIPLE_CPUS=: |
463 | | else |
464 | | MULTIPLE_CPUS=false |
465 | | fi |
466 | | elif test "$KERNEL" = "Darwin"; then |
467 | | : |
| 454 | CPU_MODEL=$(sysctl -n -a machdep.cpu.brand_string) |
| 455 | CPU_SPEED=$(sysctl -n -a hw.cpufrequency) |
| 456 | CPU_SPEED=$(bc_math "$CPU_SPEED / 1000000000") |
| 457 | # Test for multiple CPUs. If they are available, try to use them. |
| 458 | if test $(sysctl -n -a hw.activecpu) -ge "2"; then |
| 459 | MULTIPLE_CPUS=: |
| 460 | else |
| 461 | MULTIPLE_CPUS=false |