Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 3 of 3
  1. #1
    guest1 is offline Registered User
    Join Date
    Jul 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    command is used to get the usage of each CPU

    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

  2. #2
    artov is offline Registered User
    Join Date
    Mar 2005
    Posts
    363
    Thanks
    0
    Thanked 15 Times in 14 Posts
    I am not sure about command line utility, but Activity Monitor shows CPU usage per core.

  3. #3
    Giaguara's Avatar
    Giaguara is offline Chmod 760
    Join Date
    Nov 2002
    Location
    ~
    Posts
    9,534
    Thanks
    18
    Thanked 191 Times in 186 Posts
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •