A.J. Clark

Solutions Architect

Archive for June 2009

Breaking your mac with the hwprefs command

without comments

The hwprefs(1) command shows you low level information about your Mac, It’s CPU, the Memory and OS X. It also lets you control low level CPU and memory options on your mac. You can also do things like disable a CPU and disable the L1/L2/L3 CPU caches. Similar to psradm(1) in Solaris / sparc64. Be warned!

hwprefs 4.5.0
usage: hwprefs [options] parameter
hwprefs [options] parameter=value
OPTIONS
-v verbose mode
-h display this help message
PROCESSOR COUNT
cpu_count {1..N} number of physical processors available to MacOS X
cpu_enable {1..N} enable a specific processor
cpu_disable {1..N} disable a specific processor
cpu_ht {true, false} processor hyperthreading
PROCESSOR CACHES
cpu_l1_cache {true, false} processor l1 cache
cpu_l2_cache {true, false} processor l2 cache
cpu_l3_cache {true, false} processor l3 cache
POWER SAVING
cpu_nap {true, false} processor nap
INFO AND STATUS (READ ONLY)
os_class displays OS class {Cheetah, Puma, Jaguar, Smeagol, Panther, Tiger}
os_type displays operating system type
machine_type displays machine type
memory_size displays system memory
cpu_type displays processor type and version
cpu_freq displays processor clock frequency
cpu_bus_freq displays processor bus frequency
memctl_type displays memory controller type
ioctl_type displays io controller type
hwprefs 4.5.0

usage: hwprefs [options] parameter      

       hwprefs [options] parameter=value

OPTIONS

 -v verbose mode

 -h display this help message

PROCESSOR COUNT

 cpu_count {1..N} number of physical processors available to MacOS X

 cpu_enable {1..N} enable a specific processor

 cpu_disable {1..N} disable a specific processor

 cpu_ht {true, false} processor hyperthreading

PROCESSOR CACHES

 cpu_l1_cache {true, false} processor l1 cache

 cpu_l2_cache {true, false} processor l2 cache

 cpu_l3_cache {true, false} processor l3 cache

POWER SAVING

 cpu_nap {true, false} processor nap

INFO AND STATUS (READ ONLY)

 os_class displays OS class {Cheetah, Puma, Jaguar, Smeagol, Panther, Tiger}

 os_type displays operating system type

 machine_type displays machine type

 memory_size displays system memory

 cpu_type displays processor type and version

 cpu_freq displays processor clock frequency

 cpu_bus_freq displays processor bus frequency

 memctl_type displays memory controller type

 ioctl_type displays io controller type

Written by napta2k

June 13, 2009 at 10:47 pm

Posted in OS X