"top" command - how do I see more?

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

  1. macrumors 65816

    cleo

    Joined:
    Jan 21, 2002
    Location:
    Florida, USA
    #1
    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

    Lacero

    Joined:
    Jan 20, 2005
  3. macrumors 6502a

    Whyren

    Joined:
    Jun 3, 2004
    Location:
    east of the West and west of the East
    #3
    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

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

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy part of the Pacific NW
    #5
    "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