歡迎您光臨本站 註冊首頁

linux ps手冊

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0
6 ps - report a snapshot of the current processes.
7
8 SYNOPSIS
9 ps [options]
10
11
12
58 EXAMPLES
59 To see every process on the system using standard syntax:
60 ps -e
61 ps -ef
62 ps -eF
63 ps -ely
64
65 To see every process on the system using BSD syntax:
66 ps ax
67 ps axu
68
69 To print a process tree:
70 ps -ejH
71 ps axjf
72
73 To get info about threads:
74 ps -eLf
75 ps axms
76
77 To get security info:
78 ps -eo euser,ruser,suser,fuser,f,comm,label
79 ps axZ
80 ps -eM
81
82 To see every process running as root (real & effective ID) in user format:
83 ps -U root -u root u
84
85 To see every process with a user-defined format:
86 ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
87 ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
88 ps -eopid,tt,user,fname,tmout,f,wchan
89
90 Print only the process IDs of syslogd:
91 ps -C syslogd -o pid=
92
93 Print only the name of PID 42:
94 ps -p 42 -o comm=
95
96
97
98 SIMPLE PROCESS SELECTION
99 -A Select all processes. Identical to -e.
100
101
102 -N Select all processes except those that fulfill the specified
103 conditions. (negates the selection) Identical to --deselect.
104
105
106 T Select all processes associated with this terminal. Identical
107 to the t option without any argument.
108
109
110 -a Select all processes except session leaders (see getsid(2))


111 and processes not associated with a terminal.
112
113
114 a Lift the BSD-style "only yourself" restriction, which is
115 imposed upon the set of all processes when some BSD-style
116 (without "-") options are used or when the ps personality
117 setting is BSD-like. The set of processes selected in this
118 manner is in addition to the set of processes selected by
119 other means. An alternate description is that this option
120 causes ps to list all processes with a terminal (tty), or to
121 list all processes when used together with the x option.
122
123
124 -d Select all processes except session leaders.
125
126
127 -e Select all processes. Identical to -A.
128
129
130 g Really all, even session leaders. This flag is obsolete and
131 may be discontinued in a future release. It is normally
132 implied by the a flag, and is only useful when operating in
133 the sunos4 personality.
134
135
136 r Restrict the selection to only running processes.
137
138
139 x Lift the BSD-style "must have a tty" restriction, which is
140 imposed upon the set of all processes when some BSD-style
141 (without "-") options are used or when the ps personality
142 setting is BSD-like. The set of processes selected in this
143 manner is in addition to the set of processes selected by
144 other means. An alternate description is that this option
145 causes ps to list all processes owned by you (same EUID as


146 ps), or to list all processes when used together with the a
147 option.
148
149
150 --deselect Select all processes except those that fulfill the specified
151 conditions. (negates the selection) Identical to -N.
152
153
154
155 PROCESS SELECTION BY LIST
156 These options accept a single argument in the form of a blank-separated or
157 comma-separated list. They can be used multiple times.
158 For example: ps -p "1 2" -p 3,4
159
160
161 -C cmdlist Select by command name.
162 This selects the processes whose executable name is given in
163 cmdlist.
164
165
166 -G grplist Select by real group ID (RGID) or name.
167 This selects the processes whose real group name or ID is in
168 the grplist list. The real group ID identifies the group of
169 the user who created the process, see getgid(2).
170
171
172 U userlist Select by effective user ID (EUID) or name.
173 This selects the processes whose effective user name or ID is
174 in userlist. The effective user ID describes the user whose
175 file access permissions are used by the process
176 (see geteuid(2)). Identical to -u and --user.
177
178
179 -U userlist select by real user ID (RUID) or name.
180 It selects the processes whose real user name or ID is in the
181 userlist list. The real user ID identifies the user who
182 created the process, see getuid(2).
183
184
185 -g grplist Select by session OR by effective group name.


186 Selection by session is specified by many standards, but
187 selection by effective group is the logical behavior that
188 several other operating systems use. This ps will select by
189 session when the list is completely numeric (as sessions are).
190 Group ID numbers will work only when some group names are also
191 specified. See the -s and --group options.
192
193
194 p pidlist Select by process ID. Identical to -p and --pid.
195
196
197 -p pidlist Select by PID.
198 This selects the processes whose process ID numbers appear in
199 pidlist. Identical to p and --pid.
200
201
202 -s sesslist Select by session ID.
203 This selects the processes with a session ID specified
204 in sesslist.
205
206
207 t ttylist Select by tty. Nearly identical to -t and --tty, but can also
208 be used with an empty ttylist to indicate the terminal
209 associated with ps. Using the T option is considered cleaner
210 than using T with an empty ttylist.
211
212
213 -t ttylist Select by tty.
214 This selects the processes associated with the terminals given
215 in ttylist. Terminals (ttys, or screens for text output) can
216 be specified in several forms: /dev/ttyS1, ttyS1, S1. A plain
217 "-" may be used to select processes not attached to any
218 terminal.
219
220
221 -u userlist Select by effective user ID (EUID) or name.
222 This selects the processes whose effective user name or ID is


223 in userlist. The effective user ID describes the user whose
224 file access permissions are used by the process
225 (see geteuid(2)). Identical to U and --user.
226
227
228 --Group grplist Select by real group ID (RGID) or name. Identical to -G.
229
230
231 --User userlist Select by real user ID (RUID) or name. Identical to -U.
232
233
234 --group grplist Select by effective group ID (EGID) or name.
235 This selects the processes whose effective group name or ID is
236 in grouplist. The effective group ID describes the group whose
237 file access permissions are used by the process
238 (see geteuid(2)). The -g option is often an alternative
239 to --group.
240
241
242 --pid pidlist Select by process ID. Identical to -p and p.
243
244
245 --ppid pidlist Select by parent process ID. This selects the processes with a
246 parent process ID in pidlist. That is, it selects processes
247 that are children of those listed in pidlist.
248
249
250 --sid sesslist Select by session ID. Identical to -s.
251
252
253 --tty ttylist Select by terminal. Identical to -t and t.
254
255
256 --user userlist Select by effective user ID (EUID) or name. Identical to -u
257 and U.
258
259
260 -123 Identical to --sid 123.
261
262
263 123 Identical to --pid 123.
264
265
266
267 OUTPUT FORMAT CONTROL
268 These options are used to choose the information displayed by ps. The output
269 may differ by personality.


270
271
272
273 -F extra full format. See the -f option, which -F implies.
274
275
276 -O format is like -o, but preloaded with some default columns. Identical
277 to -o pid,format,state,tname,time,command or
278 -o pid,format,tname,time,cmd, see -o below.
279
280
281 O format is preloaded o (overloaded).
282 The BSD O option can act like -O (user-defined output format
283 with some common fields predefined) or can be used to specify
284 sort order. Heuristics are used to determine the behavior of
285 this option. To ensure that the desired behavior is obtained
286 (sorting or formatting), specify the option in some other way
287 (e.g. with -O or --sort). When used as a formatting option, it
288 is identical to -O, with the BSD personality.
289
290
291 -M Add a column of security data. Identical to Z. (for SE Linux)
292
293
294 X Register format.
295
296
297 Z Add a column of security data. Identical to -M. (for SE Linux)
298
299
300 -c Show different scheduler information for the -l option.
301
302
303 -f does full-format listing. This option can be combined with
304 many other UNIX-style options to add additional columns. It
305 also causes the command arguments to be printed. When used
306 with -L, the NLWP (number of threads) and LWP (thread ID)
307 columns will be added. See the c option, the format keyword
308 args, and the format keyword comm.


309
310
311 j BSD job control format.
312
313
314 -j jobs format
315
316
317 l display BSD long format.
318
319
320 -l long format. The -y option is often useful with this.
321
322
323 o format specify user-defined format. Identical to -o and --format.
324
325
326 -o format user-defined format.
327 format is a single argument in the form of a blank-separated
328 or comma-separated list, which offers a way to specify
329 individual output columns. The recognized keywords are
330 described in the STANDARD FORMAT SPECIFIERS section below.
331 Headers may be renamed
332 (ps -o pid,ruser=RealUser -o comm=Command) as desired. If all
333 column headers are empty (ps -o pid= -o comm=) then the header
334 line will not be output. Column width will increase as needed
335 for wide headers; this may be used to widen up columns such as
336 WCHAN (ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit
337 width control (ps opid,wchan:42,cmd) is offered too. The
338 behavior of ps -o pid=X,comm=Y varies with personality; output
339 may be one column named "X,comm=Y" or two columns named "X"
340 and "Y". Use multiple -o options when in doubt. Use the
341 PS_FORMAT environment variable to specify a default as
342 desired; DefSysV and DefBSD are macros that may be used to
343 choose the default UNIX or BSD columns.
344
345
346 s display signal format


347
348
349 u display user-oriented format
350
351
352 v display virtual memory format
353
354
355 -y Do not show flags; show rss in place of addr. This option can
356 only be used with -l.
357
358
359 -Z display security context format (SELinux, etc.)
360
361
362 --format format user-defined format. Identical to -o and o.
363
364
365 --context Display security context format. (for SE Linux)
366
367
368
369 OUTPUT MODIFIERS
370 -H show process hierarchy (forest)
371
372
373 N namelist Specify namelist file. Identical to -n, see -n above.
374
375
376 O order Sorting order. (overloaded)
377 The BSD O option can act like -O (user-defined output format
378 with some common fields predefined) or can be used to specify
379 sort order. Heuristics are used to determine the behavior of
380 this option. To ensure that the desired behavior is obtained
381 (sorting or formatting), specify the option in some other way
382 (e.g. with -O or --sort).
383
384 For sorting, obsolete BSD O option syntax is
385 O[ |-]k1[,[ |-]k2[,...]]. It orders the processes listing
386 according to the multilevel sort specified by the sequence of
387 one-letter short keys k1, k2, ... described in the OBSOLETE
388 SORT KEYS section below. The " " is currently optional, merely
389 re-iterating the default direction on a key, but may help to
390 distinguish an O sort from an O format. The "-" reverses


391 direction only on the key it precedes.
392
393
394 S Sum up some information, such as CPU usage, from dead child
395 processes into their parent. This is useful for examining a
396 system where a parent process repeatedly forks off short-lived
397 children to do work.
398
399
400 c Show the true command name. This is derived from the name of
401 the executable file, rather than from the argv value. Command
402 arguments and any modifications to them (see setproctitle(3))
403 are thus not shown. This option effectively turns the args
404 format keyword into the comm format keyword; it is useful with
405 the -f format option and with the various BSD-style format
406 options, which all normally display the command arguments. See
407 the -f option, the format keyword args, and the format keyword
408 comm.
409
410
411 e Show the environment after the command.
412
413
414 f ASCII-art process hierarchy (forest)
415
416
417 h No header. (or, one header per screen in the BSD personality)
418 The h option is problematic. Standard BSD ps uses this option
419 to print a header on each page of output, but older Linux ps
420 uses this option to totally disable the header. This version
421 of ps follows the Linux usage of not printing the header
422 unless the BSD personality has been selected, in which case it
423 prints a header on each page of output. Regardless of the


424 current personality, you can use the long options --headers
425 and --no-headers to enable printing headers each page or
426 disable headers entirely, respectively.
427
428
429 k spec specify sorting order. Sorting syntax is
430 [ |-]key[,[ |-]key[,...]] Choose a multi-letter key from the
431 STANDARD FORMAT SPECIFIERS section. The " " is optional since
432 default direction is increasing numerical or lexicographic
433 order. Identical to --sort. Examples:
434 ps jaxkuid,-ppid, pid
435 ps axk comm o comm,args
436 ps kstart_time -ef
437
438
439 -n namelist set namelist file. Identical to N.
440 The namelist file is needed for a proper WCHAN display, and
441 must match the current Linux kernel exactly for correct
442 output. Without this option, the default search path for the
443 namelist is:
444
445 $PS_SYSMAP
446 $PS_SYSTEM_MAP
447 /proc/*/wchan
448 /boot/System.map-`uname -r`
449 /boot/System.map
450 /lib/modules/`uname -r`/System.map
451 /usr/src/linux/System.map
452 /System.map
453
454
455 n Numeric output for WCHAN and USER. (including all types of UID
456 and GID)
457
458
459 -w Wide output. Use this option twice for unlimited width.
460
461
462 w Wide output. Use this option twice for unlimited width.


463
464
465 --cols n set screen width
466
467
468 --columns n set screen width
469
470
471 --cumulative include some dead child process data (as a sum with the
472 parent)
473
474
475 --forest ASCII art process tree
476
477
478 --headers repeat header lines, one per page of output
479
480
481 --no-headers print no header line at all
482
483
484 --lines n set screen height
485
486
487 --rows n set screen height
488
489
490 --sort spec specify sorting order. Sorting syntax is
491 [ |-]key[,[ |-]key[,...]] Choose a multi-letter key from the
492 STANDARD FORMAT SPECIFIERS section. The " " is optional since
493 default direction is increasing numerical or lexicographic
494 order. Identical to k. For example:
495 ps jax --sort=uid,-ppid, pid
496
497
498 --width n set screen width
499
500
501
502 THREAD DISPLAY
503 H Show threads as if they were processes
504
505 -L Show threads, possibly with LWP and NLWP columns
506
507 -T Show threads, possibly with SPID column
508
509 m Show threads after processes
510
511 -m Show threads after processes
512
513
514
515 OTHER INFORMATION
516 L List all format specifiers.
517
518 -V Print the procps version.
519
520 V Print the procps version.
521
522 --help Print a help message.


523
524 --info Print debugging info.
525
526 --version Print the procps version.
527
528
529
530 NOTES
531 This ps works by reading the virtual files in /proc. This ps does not need to
532 be setuid kmem or have any privileges to run. Do not give this ps any special
533 permissions.
534
535 This ps needs access to namelist data for proper WCHAN display. For kernels
536 prior to 2.6, the System.map file must be installed.
537
538 CPU usage is currently expressed as the percentage of time spent running
539 during the entire lifetime of a process. This is not ideal, and it does not
540 conform to the standards that ps otherwise conforms to. CPU usage is unlikely
541 to add up to exactly 100%.
542
543 The SIZE and RSS fields don't count some parts of a process including the page
544 tables, kernel stack, struct thread_info, and struct task_struct. This is
545 usually at least 20 KiB of memory that is always resident. SIZE is the virtual
546 size of the process (code data stack).
547
548 Processes marked <defunct> are dead processes (so-called "zombies") that
549 remain because their parent has not destroyed them properly. These processes
550 will be destroyed by init(8) if the parent process exits.
551
552
553
554 PROCESS FLAGS
555 The sum of these values is displayed in the "F" column, which is provided by
556 the flags output specifier.
557 1 forked but didn't exec
558 4 used super-user privileges
559
560
561 PROCESS STATE CODES
562 Here are the different values that the s, stat and state output specifiers
563 (header "STAT" or "S") will display to describe the state of a process.
564 D Uninterruptible sleep (usually IO)


565 R Running or runnable (on run queue)
566 S Interruptible sleep (waiting for an event to complete)
567 T Stopped, either by a job control signal or because it is being traced.
568 W paging (not valid since the 2.6.xx kernel)
569 X dead (should never be seen)
570 Z Defunct ("zombie") process, terminated but not reaped by its parent.
571
572 For BSD formats and when the stat keyword is used, additional characters may
573 be displayed:
574 < high-priority (not nice to other users)
575 N low-priority (nice to other users)
576 L has pages locked into memory (for real-time and custom IO)
577 s is a session leader
578 l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
579 is in the foreground process group
580
581
582
583 OBSOLETE SORT KEYS
584 These keys are used by the BSD O option (when it is used for sorting). The GNU
585 --sort option doesn't use these keys, but the specifiers described below in
586 the STANDARD FORMAT SPECIFIERS section. Note that the values used in sorting
587 are the internal values ps uses and not the "cooked" values used in some of
588 the output format fields (e.g. sorting on tty will sort into device number,
589 not according to the terminal name displayed). Pipe ps output into the sort(1)
590 command if you want to sort the cooked values.
591
592
593 KEY LONG DESCRIPTION
594 c cmd simple name of executable
595 C pcpu cpu utilization
596 f flags flags as in long format F field
597 g pgrp process group ID
598 G tpgid controlling tty process group ID
599 j cutime cumulative user time
600 J cstime cumulative system time


601 k utime user time
602 m min_flt number of minor page faults
603 M maj_flt number of major page faults
604 n cmin_flt cumulative minor page faults
605 N cmaj_flt cumulative major page faults
606 o session session ID
607 p pid process ID
608 P ppid parent process ID
609
610 r rss resident set size
611 R resident resident pages
612 s size memory size in kilobytes
613 S share amount of shared pages
614 t tty the device number of the controlling tty
615 T start_time time process was started
616 U uid user ID number
617 u user user name
618 v vsize total VM size in kB
619 y priority kernel scheduling priority
620
621
622
623 AIX FORMAT DESCRIPTORS
624 This ps supports AIX format descriptors, which work somewhat like the
625 formatting codes of printf(1) and printf(3). For example, the normal default
626 output can be produced with this: ps -eo "%p %y %x %c". The NORMAL codes are
627 described in the next section.
628
629 CODE NORMAL HEADER
630 %C pcpu %CPU
631 %G group GROUP
632 %P ppid PPID
633 %U user USER
634 %a args COMMAND
635 %c comm COMMAND
636 %g rgroup RGROUP
637 %n nice NI
638 %p pid PID
639 %r pgid PGID
640 %t etime ELAPSED
641 %u ruser RUSER
642 %x time TIME
643 %y tty TTY
644 %z vsz VSZ
645
646
647 STANDARD FORMAT SPECIFIERS
648 Here are the different keywords that may be used to control the output format


649 (e.g. with option -o) or to sort the selected processes with the GNU-style
650 --sort option.
651
652 For example: ps -eo pid,user,args --sort user
653
654 This version of ps tries to recognize most of the keywords used in other
655 implementations of ps.
656
657 The following user-defined format specifiers may contain spaces: args, cmd,
658 comm, command, fname, ucmd, ucomm, lstart, bsdstart, start.
659
660 Some keywords may not be available for sorting.
661
662
663 CODE HEADER DESCRIPTION
664
665 %cpu %CPU cpu utilization of the process in "##.#" format.
666 Currently, it is the CPU time used divided by the time the
667 process has been running (cputime/realtime ratio),
668 expressed as a percentage. It will not add up to 100%
669 unless you are lucky. (alias pcpu).
670
671 %mem %MEM ratio of the process's resident set size to the physical
672 memory on the machine, expressed as a percentage.
673 (alias pmem).
674
675
676
677
678 args COMMAND command with all its arguments as a string. Modifications
679 to the arguments may be shown. The output in this column
680 may contain spaces. A process marked <defunct> is partly
681 dead, waiting to be fully destroyed by its parent.
682 Sometimes the process args will be unavailable; when this
683 happens, ps will instead print the executable name in
684 brackets. (alias cmd, command). See also the comm format
685 keyword, the -f option, and the c option.


686 When specified last, this column will extend to the edge
687 of the display. If ps can not determine display width, as
688 when output is redirected (piped) into a file or another
689 command, the output width is undefined. (it may be 80,
690 unlimited, determined by the TERM variable, and so on) The
691 COLUMNS environment variable or --cols option may be used
692 to exactly determine the width in this case. The w or -w
693 option may be also be used to adjust width.
694
695 blocked BLOCKED mask of the blocked signals, see signal(7). According to
696 the width of the field, a 32-bit or 64-bit mask in
697 hexadecimal format is displayed.
698 (alias sig_block, sigmask).
699
700 bsdstart START time the command started. If the process was started less
701 than 24 hours ago, the output format is " HH:MM", else it
702 is "mmm dd" (where mmm is the three letters of the month).
703
704 bsdtime TIME accumulated cpu time, user system. The display format is
705 usually "MMM:SS", but can be shifted to the right if the
706 process used more than 999 minutes of cpu time.
707
708 c C processor utilization. Currently, this is the integer
709 value of the percent usage over the lifetime of the
710 process. (see %cpu).
711
712 caught CAUGHT mask of the caught signals, see signal(7). According to
713 the width of the field, a 32 or 64 bits mask in


714 hexadecimal format is displayed.
715 (alias sig_catch, sigcatch).
716
717 class CLS scheduling class of the process. (alias policy, cls).
718 Field's possible values are:
719 - not reported
720 TS SCHED_OTHER
721 FF SCHED_FIFO
722 RR SCHED_RR
723 ? unknown value
724
725 cls CLS scheduling class of the process. (alias policy, class).
726 Field's possible values are:
727 - not reported
728 TS SCHED_OTHER
729 FF SCHED_FIFO
730 RR SCHED_RR
731 ? unknown value
732
733 cmd CMD see args. (alias args, command).
734
735
736
737
738
739
740
741
742
743
744
745
746 comm COMMAND command name (only the executable name). Modifications to
747 the command name will not be shown. A process marked
748 <defunct> is partly dead, waiting to be fully destroyed by
749 its parent. The output in this column may contain spaces.
750 (alias ucmd, ucomm). See also the args format keyword, the
751 -f option, and the c option.
752 When specified last, this column will extend to the edge
753 of the display. If ps can not determine display width, as
754 when output is redirected (piped) into a file or another
755 command, the output width is undefined. (it may be 80,


756 unlimited, determined by the TERM variable, and so on) The
757 COLUMNS environment variable or --cols option may be used
758 to exactly determine the width in this case. The w or -w
759 option may be also be used to adjust width.
760
761 command COMMAND see args. (alias args, cmd).
762
763 cp CP per-mill (tenths of a percent) CPU usage. (see %cpu).
764
765 cputime TIME cumulative CPU time, "[dd-]hh:mm:ss" format. (alias time).
766
767 egid EGID effective group ID number of the process as a decimal
768 integer. (alias gid).
769
770 egroup EGROUP effective group ID of the process. This will be the
771 textual group ID, if it can be obtained and the field
772 width permits, or a decimal representation otherwise.
773 (alias group).
774
775 eip EIP instruction pointer.
776
777 esp ESP stack pointer.
778
779 etime ELAPSED elapsed time since the process was started, in the
780 form [[dd-]hh:]mm:ss.
781
782 euid EUID effective user ID. (alias uid).
783
784 euser EUSER effective user name. This will be the textual user ID,
785 if it can be obtained and the field width permits,
786 or a decimal representation otherwise. The n option can be
787 used to force the decimal representation.
788 (alias uname, user).
789
790 f F flags associated with the process, see the PROCESS FLAGS
791 section. (alias flag, flags).


792
793 fgid FGID filesystem access group ID. (alias fsgid).
794
795 fgroup FGROUP filesystem access group ID. This will be the textual
796 user ID, if it can be obtained and the field width
797 permits, or a decimal representation otherwise.
798 (alias fsgroup).
799
800 flag F see f. (alias f, flags).
801
802 flags F see f. (alias f, flag).
803
804 fname COMMAND first 8 bytes of the base name of the process's executable
805 file. The output in this column may contain spaces.
806
807 fuid FUID filesystem access user ID. (alias fsuid).
808
809 fuser FUSER filesystem access user ID. This will be the textual
810 user ID, if it can be obtained and the field width
811 permits, or a decimal representation otherwise.
812
813
814 gid GID see egid. (alias egid).
815
816 group GROUP see egroup. (alias egroup).
817
818 ignored IGNORED mask of the ignored signals, see signal(7). According to
819 the width of the field, a 32-bit or 64-bit mask in
820 hexadecimal format is displayed. (alias sig_ignore,
821 sigignore).
822
823 label LABEL security label, most commonly used for SE Linux context
824 data. This is for the Mandatory Access Control ("MAC")
825 found on high-security systems.
826
827 lstart STARTED time the command started.
828
829 lwp LWP lwp (light weight process, or thread) ID of the lwp being
830 reported. (alias spid, tid).


831
832 ni NI nice value. This ranges from 19 (nicest) to -20 (not nice
833 to others), see nice(1). (alias nice).
834
835 nice NI see ni. (alias ni).
836
837 nlwp NLWP number of lwps (threads) in the process. (alias thcount).
838
839 nwchan WCHAN address of the kernel function where the process is
840 sleeping (use wchan if you want the kernel function name).
841 Running tasks will display a dash ('-') in this column.
842
843 pcpu %CPU see %cpu. (alias %cpu).
844
845 pending PENDING mask of the pending signals. See signal(7). Signals
846 pending on the process are distinct from signals pending
847 on individual threads. Use the m option or the -m option
848 to see both. According to the width of the field, a 32-bit
849 or 64-bit mask in hexadecimal format is displayed.
850 (alias sig).
851
852 pgid PGID process group ID or, equivalently, the process ID of the
853 process group leader. (alias pgrp).
854
855 pgrp PGRP see pgid. (alias pgid).
856
857 pid PID process ID number of the process.
858
859 pmem %MEM see %mem. (alias %mem).
860
861 policy POL scheduling class of the process. (alias class, cls).
862 Possible values are:
863 - not reported
864 TS SCHED_OTHER
865 FF SCHED_FIFO
866 RR SCHED_RR
867 ? unknown value
868
869 ppid PPID parent process ID.


870
871 psr PSR processor that process is currently assigned to.
872
873 rgid RGID real group ID.
874
875 rgroup RGROUP real group name. This will be the textual group ID, if it
876 can be obtained and the field width permits, or a decimal
877 representation otherwise.
878
879 rss RSS resident set size, the non-swapped physical memory that a
880 task has used (in kiloBytes). (alias rssize, rsz).
881
882
883 rssize RSS see rss. (alias rss, rsz).
884
885 rsz RSZ see rss. (alias rss, rssize).
886
887 rtprio RTPRIO realtime priority.
888
889 ruid RUID real user ID.
890
891 ruser RUSER real user ID. This will be the textual user ID, if it can
892 be obtained and the field width permits, or a decimal
893 representation otherwise.
894
895 s S minimal state display (one character). See section PROCESS
896 STATE CODES for the different values. See also stat if you
897 want additional information displayed. (alias state).
898
899 sched SCH scheduling policy of the process. The policies
900 sched_other, sched_fifo, and sched_rr are respectively
901 displayed as 0, 1, and 2.
902
903 sess SESS session ID or, equivalently, the process ID of the
904 session leader. (alias session, sid).
905
906 sgi_p P processor that the process is currently executing on.
907 Displays "*" if the process is not currently running or


908 runnable.
909
910 sgid SGID saved group ID. (alias svgid).
911
912 sgroup SGROUP saved group name. This will be the textual group ID, if it
913 can be obtained and the field width permits, or a decimal
914 representation otherwise.
915
916 sid SID see sess. (alias sess, session).
917
918 sig PENDING see pending. (alias pending, sig_pend).
919
920 sigcatch CAUGHT see caught. (alias caught, sig_catch).
921
922 sigignore IGNORED see ignored. (alias ignored, sig_ignore).
923
924 sigmask BLOCKED see blocked. (alias blocked, sig_block).
925
926 size SZ approximate amount of swap space that would be required if
927 the process were to dirty all writable pages and then be
928 swapped out. This number is very rough!
929
930 spid SPID see lwp. (alias lwp, tid).
931
932 stackp STACKP address of the bottom (start) of stack for the process.
933
934 start STARTED time the command started. If the process was started less
935 than 24 hours ago, the output format is "HH:MM:SS", else
936 it is " mmm dd" (where mmm is a three-letter month name).
937
938 start_time START starting time or date of the process. Only the year will
939 be displayed if the process was not started the same year
940 ps was invoked, or "mmmdd" if it was not started the same
941 day, or "HH:MM" otherwise.
942
943 stat STAT multi-character process state. See section PROCESS STATE
944 CODES for the different values meaning. See also s and


945 state if you just want the first character displayed.
946
947 state S see s. (alias s).
948
949
950 suid SUID saved user ID. (alias svuid).
951
952 suser SUSER saved user name. This will be the textual user ID, if it
953 can be obtained and the field width permits, or a decimal
954 representation otherwise. (alias svuser).
955
956 svgid SVGID see sgid. (alias sgid).
957
958 svuid SVUID see suid. (alias suid).
959
960 sz SZ size in physical pages of the core image of the process.
961 This includes text, data, and stack space. Device mappings
962 are currently excluded; this is subject to change. See vsz
963 and rss.
964
965 thcount THCNT see nlwp. (alias nlwp). number of kernel threads owned by
966 the process.
967
968 tid TID see lwp. (alias lwp).
969
970 time TIME cumulative CPU time, "[dd-]hh:mm:ss" format.
971 (alias cputime).
972
973 tname TTY controlling tty (terminal). (alias tt, tty).
974
975 tpgid TPGID ID of the foreground process group on the tty (terminal)
976 that the process is connected to, or -1 if the process is
977 not connected to a tty.
978
979 tt TT controlling tty (terminal). (alias tname, tty).
980
981 tty TT controlling tty (terminal). (alias tname, tt).
982
983 ucmd CMD see comm. (alias comm, ucomm).
984
985 ucomm COMMAND see comm. (alias comm, ucmd).


986
987 uid UID see euid. (alias euid).
988
989 uname USER see euser. (alias euser, user).
990
991 user USER see euser. (alias euser, uname).
992
993 vsize VSZ see vsz. (alias vsz).
994
995 vsz VSZ virtual memory size of the process in KiB
996 (1024-byte units). Device mappings are currently excluded;
997 this is subject to change. (alias vsize).
998
999 wchan WCHAN name of the kernel function in which the process is
1000 sleeping, a "-" if the process is running, or a "*" if the
1001 process is multi-threaded and ps is not displaying
1002 threads.


[火星人 ] linux ps手冊已經有890次圍觀

http://coctec.com/docs/linux/show-post-52665.html