I am not sure about command line utility, but Activity Monitor shows CPU usage per core.
Machine using dual-core processor. I need to find out the load on each CPU core
I have tried using "top" command. But, top command is showing the overall usage of cpu.
What is command is used to get the usage of each CPU?
-Thanks
I am not sure about command line utility, but Activity Monitor shows CPU usage per core.
cpuwalk.d - Measure which CPUs a process runs on. Uses DTrace
dispqlen.d - dispatcher queue length by CPU. Uses DTrace
runocc.d - run queue occupancy by CPU. Uses DTrace
sampleproc - sample processes on the CPUs. Uses DTrace
cpuwalk.d is probably what you want. Run it with sudo.
NAME
cpuwalk.d - Measure which CPUs a process runs on. Uses DTrace.
SYNOPSIS
cpuwalk.d [duration]
DESCRIPTION
This program is for multi-CPU servers, and can help identify if a
process is running on multiple CPUs concurrently or not.
A duration may be specified in seconds.
Since this uses DTrace, only the root user or users with the
dtrace_kernel privilege can run this command.
EXAMPLES
this runs until Ctrl-C is hit,
# cpuwalk.d
run for 5 seconds,
# cpuwalk.d 5
FIELDS
PID process ID
CMD process name
value CPU id
count number of samples (sample at 100 hz)
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs direc-
tory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
cpuwalk.d will run until Ctrl-C is hit, or the duration specified is
reached.
SEE ALSO
threaded.d(1M), dtrace(1M)
Mac Mini Server | MacBook Pro | iPhone | Other Macs + a bunch of iPods, Newtons and other toys
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | G's corner | Photos | @ Plus+ and Game Center
Bookmarks