"top" command - how do I see more?

Discussion in 'OS X' started by cleo, Jul 12, 2005.

  1. macrumors 65816


    Jan 21, 2002
    Florida, USA
    This is probably an incredibly dumb question for most of you, but...

    When I use "top" I can only see the first page of output. I'm trying to find the pid of a process that's not on that first page; how do I move down the list? :confused:
  2. macrumors 604


    Jan 20, 2005
  3. macrumors 6502a


    Jun 3, 2004
    east of the West and west of the East
    You can also order how the data is output by typing

    top -o <key> where "<key>" can be:
    command - Command name.

    cpu - CPU usage.

    pid - Process ID (default).

    prt - Number of Mach ports.

    reg - Number of memory regions.

    rprvt - Resident private address space size.

    rshrd - Resident shared address space size.

    rsize - Resident memory size.

    th - Number of threads.

    time - Execution time.

    uid - User ID.

    username - Username.

    vprvt - Private address space size.

    vsize - Total memory size. ​

    By default, top uses the pid to sort.
  4. macrumors 6502

    Oct 2, 2003
    Sydney, Australia
    I think "ps -ax" will give you the PIDs as well if that's all you need.
  5. macrumors 601

    Westside guy

    Oct 15, 2003
    The soggy part of the Pacific NW
    "top -l 0" (that's "ell zero") runs top as a one-shot command, listing all the processes. For your purposes it's just like the aforementioned "ps -ax".

Share This Page