PDA

View Full Version : "top" command - how do I see more?




cleo
Jul 12, 2005, 10:39 PM
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:



Lacero
Jul 12, 2005, 10:43 PM
resize the window?

hi cleo

Whyren
Jul 12, 2005, 10:57 PM
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.

cazlar
Jul 12, 2005, 11:14 PM
I think "ps -ax" will give you the PIDs as well if that's all you need.

Westside guy
Jul 13, 2005, 02:05 AM
"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".