-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathman_page_of_ps.html
2057 lines (1597 loc) · 65.7 KB
/
man_page_of_ps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Content-type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PS</TITLE>
</HEAD><BODY>
<H1>PS</H1>
Section: Linux User's Manual (1)<BR>Updated: February 25, 2010<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
ps - report a snapshot of the current processes.
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>ps</B> [<I>options</I>]
<P>
<P>
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<B>ps</B>
displays information about a selection of the active processes.
If you want a repetitive update of the selection and the
displayed information, use <I><A HREF="/cgi-bin/man/man2html?1+top">top</A></I>(1) instead.
<P>
This version of <B>ps</B> accepts several kinds of options:
<DL COMPACT>
<DT>1<DD>
UNIX options, which may be grouped and must be preceded by a dash.
<DT>2<DD>
BSD options, which may be grouped and must not be used with a dash.
<DT>3<DD>
GNU long options, which are preceded by two dashes.
</DL>
<P>
Options of different types may be freely mixed, but conflicts can appear.
There are some synonymous options, which are functionally identical, due
to the many standards and <B>ps</B> implementations that this <B>ps</B> is
compatible with.
<P>
Note that "<B>ps -aux</B>" is distinct from "<B>ps aux</B>".
The POSIX and UNIX standards require that "<B>ps -aux</B>" print all
processes owned by a user named "x", as well as printing all processes
that would be selected by the <B>-a</B> option. If the user named "x" does
not exist, this <B>ps</B> may interpret the command as "<B>ps aux</B>"
instead and print a warning. This behavior is intended to aid in
transitioning old scripts and habits. It is fragile, subject to change,
and thus should not be relied upon.
<P>
By default, <B>ps</B> selects all processes
with the same effective user ID (euid=EUID) as the current user
and
associated with the same terminal as the invoker.
It displays the process ID (pid=PID),
the terminal associated with the process (tname=TTY),
the cumulated CPU time in [dd-]hh:mm:ss format (time=TIME),
and the executable name (ucmd=CMD).
Output is unsorted by default.
<P>
The use of BSD-style options will add process state (stat=STAT) to the
default display and show the command args (args=COMMAND) instead of the
executable name. You can override this with the <B>PS_FORMAT</B>
environment variable. The use of BSD-style options will also change the
process selection to include processes on other terminals (TTYs) that
are owned by you; alternately, this may be described as setting the
selection to be the set of all processes filtered to exclude
processes owned by other users or not on a terminal. These effects
are not considered when options are described as being "identical" below,
so <B>-M</B> will be considered identical to <B>Z</B> and so on.
<P>
Except as described below, process selection options are additive.
The default selection is discarded, and then the selected processes
are added to the set of processes to be displayed.
A process will thus be shown if it meets any of the given
selection criteria.
<P>
<A NAME="lbAE"> </A>
<H2>EXAMPLES</H2>
<DL COMPACT>
<DT>To see every process on the system using standard syntax:<DD>
<B>ps -e</B>
<BR>
<B>ps -ef</B>
<BR>
<B>ps -eF</B>
<BR>
<B>ps -ely</B>
<DT>To see every process on the system using BSD syntax:<DD>
<B>ps ax</B>
<BR>
<B>ps axu</B>
<DT>To print a process tree:<DD>
<B>ps -ejH</B>
<BR>
<B>ps axjf</B>
<DT>To get info about threads:<DD>
<B>ps -eLf</B>
<BR>
<B>ps axms</B>
<DT>To get security info:<DD>
<B>ps -eo euser,ruser,suser,fuser,f,comm,label</B>
<BR>
<B>ps axZ</B>
<BR>
<B>ps -eM</B>
<DT>To see every process running as root (real & effective ID) in user format:<DD>
<B>ps -U root -u root u</B>
<DT>To see every process with a user-defined format:<DD>
<B>ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm</B>
<BR>
<B>ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm</B>
<BR>
<B>ps -eopid,tt,user,fname,tmout,f,wchan</B>
<DT>Print only the process IDs of syslogd:<DD>
<B>ps -C syslogd -o pid=</B>
<DT>Print only the name of PID 42:<DD>
<B>ps -p 42 -o comm=</B>
</DL>
<P>
<P>
<A NAME="lbAF"> </A>
<H2>SIMPLE PROCESS SELECTION</H2>
<P>
<DL COMPACT>
<DT><B>a</B>
<DD>
Lift the BSD-style "only yourself" restriction, which is imposed upon
the set of all processes when some BSD-style (without "-") options
are used or when the <B>ps</B> personality setting is BSD-like.
The set of processes selected in this manner is
in addition to the set of processes selected by other means.
An alternate description is that this option causes <B>ps</B> to
list all processes with a terminal (tty),
or to list all processes when used together with the <B>x</B> option.
<P>
<DT><B>-A</B>
<DD>
Select all processes. Identical to <B>-e</B>.
<P>
<DT><B>-a</B>
<DD>
Select all processes except both session leaders (see <I><A HREF="/cgi-bin/man/man2html?2+getsid">getsid</A></I>(2)) and
processes not associated with a terminal.
<P>
<DT><B>-d</B>
<DD>
Select all processes except session leaders.
<P>
<DT><B>--deselect</B>
<DD>
Select all processes except those that fulfill the specified conditions.
(negates the selection) Identical to <B>-N</B>.
<P>
<DT><B>-e</B>
<DD>
Select all processes. Identical to <B>-A</B>.
<P>
<P>
<DT><B>g</B>
<DD>
Really all, even session leaders. This flag is obsolete and may be
discontinued in a future release. It is normally implied by the <B>a</B> flag,
and is only useful when operating in the sunos4 personality.
<P>
<DT><B>-N</B>
<DD>
Select all processes except those that fulfill the specified conditions.
(negates the selection) Identical to <B>--deselect</B>.
<P>
<DT><B>T</B>
<DD>
Select all processes associated with this terminal. Identical to the
<B>t</B> option without any argument.
<P>
<DT><B>r</B>
<DD>
Restrict the selection to only running processes.
<P>
<DT><B>x</B>
<DD>
Lift the BSD-style "must have a tty" restriction, which is imposed upon
the set of all processes when some BSD-style (without "-") options
are used or when the <B>ps</B> personality setting is BSD-like.
The set of processes selected in this manner is
in addition to the set of processes selected by other means.
An alternate description is that this option causes <B>ps</B> to
list all processes owned by you (same EUID as <B>ps</B>),
or to list all processes when used together with the <B>a</B> option.
<P>
</DL>
<P>
<A NAME="lbAG"> </A>
<H2>PROCESS SELECTION BY LIST</H2>
These options accept a single argument in the form of a blank-separated
or comma-separated list. They can be used multiple times.
For example: <B>ps -p "1 2" -p 3,4</B>
<P>
<P>
<DL COMPACT>
<DT><B>-<I>123</I></B>
<DD>
Identical to <B>--sid </B><I>123</I>.
<P>
<DT><B><I>123</I></B>
<DD>
Identical to <B>--pid </B><I>123</I>.
<P>
<DT><B>-C cmdlist</B>
<DD>
Select by command name.
<BR>
This selects the processes whose executable name is given in
<I>cmdlist</I>.
<P>
<DT><B>-G grplist</B>
<DD>
Select by real group ID (RGID) or name.
<BR>
This selects the processes whose real group name or ID is in the
<I>grplist</I> list. The real group ID identifies the group of the user
who created the process, see <I><A HREF="/cgi-bin/man/man2html?2+getgid">getgid</A></I>(2).
<P>
<DT><B>-g grplist</B>
<DD>
Select by session OR by effective group name.
<BR>
Selection by session is specified by many standards,
but selection by effective group is the logical behavior that
several other operating systems use.
This <B>ps</B> will select by session when the list
is completely numeric (as sessions are).
Group ID numbers will work only when some group names are also specified.
See the <B>-s</B> and <B>--group</B> options.
<P>
<DT><B>--Group grplist</B>
<DD>
Select by real group ID (RGID) or name. Identical to <B>-G</B>.
<P>
<DT><B>--group grplist</B>
<DD>
Select by effective group ID (EGID) or name.
<BR>
This selects the processes whose effective group name or ID is in
<I>grouplist</I>. The effective group ID describes the group whose file
access permissions are used by the process (see <I><A HREF="/cgi-bin/man/man2html?2+geteuid">geteuid</A></I>(2)).
The <B>-g</B> option is often an alternative to <B>--group</B>.
<P>
<DT><B>p pidlist</B>
<DD>
Select by process ID. Identical to <B>-p</B> and <B>--pid</B>.
<P>
<DT><B>-p pidlist</B>
<DD>
Select by PID.
<BR>
This selects the processes whose process ID numbers appear in
<I>pidlist</I>. Identical to <B>p</B> and <B>--pid</B>.
<P>
<DT><B>--pid pidlist</B>
<DD>
Select by process ID. Identical to <B>-p</B> and <B>p</B>.
<P>
<DT><B>--ppid pidlist</B>
<DD>
Select by parent process ID.
This selects the processes
with a parent process ID in pidlist.
That is, it selects processes that are children
of those listed in pidlist.
<P>
<DT><B>-s sesslist</B>
<DD>
Select by session ID.
<BR>
This selects the processes
with a session ID specified in <I>sesslist</I>.
<P>
<DT><B>--sid sesslist</B>
<DD>
Select by session ID. Identical to <B>-s</B>.
<P>
<DT><B>t ttylist</B>
<DD>
Select by tty. Nearly identical to <B>-t</B> and <B>--tty</B>,
but can also be used with an empty <I>ttylist</I> to indicate
the terminal associated with <B>ps</B>.
Using the <B>T</B> option is considered cleaner than using <B>T</B> with
an empty <I>ttylist</I>.
<P>
<DT><B>-t ttylist</B>
<DD>
Select by tty.
<BR>
This selects the processes associated with the terminals
given in <I>ttylist</I>.
Terminals (ttys, or screens for text output) can be specified in several
forms: /dev/ttyS1, ttyS1, S1.
A plain "-" may be used to select processes not attached to any terminal.
<P>
<DT><B>--tty ttylist</B>
<DD>
Select by terminal. Identical to <B>-t</B> and <B>t</B>.
<P>
<DT><B>U userlist</B>
<DD>
Select by effective user ID (EUID) or name.
<BR>
This selects the processes whose effective user name
or ID is in <I>userlist</I>.
The effective user ID describes the user whose file
access permissions are used by the process
(see <I><A HREF="/cgi-bin/man/man2html?2+geteuid">geteuid</A></I>(2)).
Identical to <B>-u</B> and <B>--user</B>.
<P>
<DT><B>-U userlist</B>
<DD>
select by real user ID (RUID) or name.
<BR>
It selects the processes whose real user name or ID is in the
<I>userlist</I> list.
The real user ID identifies the user who created the process,
see <I><A HREF="/cgi-bin/man/man2html?2+getuid">getuid</A></I>(2).
<P>
<DT><B>-u userlist</B>
<DD>
Select by effective user ID (EUID) or name.
<BR>
This selects the processes whose effective user name or ID is in
<I>userlist</I>. The effective user ID describes the user whose file
access permissions are used by the process (see <I><A HREF="/cgi-bin/man/man2html?2+geteuid">geteuid</A></I>(2)).
Identical to <B>U</B> and <B>--user</B>.
<P>
<DT><B>--User userlist</B>
<DD>
Select by real user ID (RUID) or name. Identical to <B>-U</B>.
<P>
<DT><B>--user userlist</B>
<DD>
Select by effective user ID (EUID) or name.
Identical to <B>-u</B> and <B>U</B>.
<P>
</DL>
<P>
<A NAME="lbAH"> </A>
<H2>OUTPUT FORMAT CONTROL</H2>
These options are used to choose the information displayed by <B>ps</B>.
The output may differ by personality.
<P>
<P>
<DL COMPACT>
<DT><B>-c</B>
<DD>
Show different scheduler information for the <B>-l</B> option.
<P>
<DT><B>--context</B>
<DD>
Display security context format. (for SE Linux)
<P>
<DT><B>-f</B>
<DD>
does full-format listing. This option can be combined with many
other UNIX-style options to add additional columns. It also causes
the command arguments to be printed. When used with <B>-L</B>, the
NLWP (number of threads) and LWP (thread ID) columns will be added.
See the <B>c</B> option, the format keyword <B>args</B>, and the
format keyword <B>comm</B>.
<P>
<DT><B>-F</B>
<DD>
extra full format. See the <B>-f</B> option, which <B>-F</B> implies.
<P>
<DT><B>--format format</B>
<DD>
user-defined format. Identical to <B>-o</B> and <B>o</B>.
<P>
<DT><B>j</B>
<DD>
BSD job control format.
<P>
<DT><B>-j</B>
<DD>
jobs format
<P>
<DT><B>l</B>
<DD>
display BSD long format.
<P>
<DT><B>-l</B>
<DD>
long format. The <B>-y</B> option is often useful with this.
<P>
<DT><B>-M</B>
<DD>
Add a column of security data. Identical to <B>Z</B>. (for SE Linux)
<P>
<DT><B>O format</B>
<DD>
is preloaded <B>o</B> (overloaded).
<BR>
The BSD <B>O</B> option can act like <B>-O</B> (user-defined output
format with some common fields predefined) or can be used to specify
sort order. Heuristics are used to determine the behavior of this
option. To ensure that the desired behavior is obtained (sorting or
formatting), specify the option in some other way
(e.g. with <B>-O</B> or <B>--sort</B>).
When used as a formatting option, it is identical to <B>-O</B>, with the
BSD personality.
<P>
<DT><B>-O format</B>
<DD>
is like <B>-o</B>, but preloaded with some default columns.
Identical to <B>-o pid,</B><I>format</I><B>,state,tname,time,command</B>
or <B>-o pid,</B><I>format</I><B>,tname,time,cmd</B>, see <B>-o</B> below.
<P>
<DT><B>o format</B>
<DD>
specify user-defined format. Identical to <B>-o</B> and
<B>--format</B>.
<P>
<DT><B>-o format</B>
<DD>
user-defined format.
<BR>
<I>format</I> is a single argument in the form of a
blank-separated or comma-separated list, which offers
a way to specify individual output columns.
The recognized keywords are described in the <B>STANDARD FORMAT
SPECIFIERS</B> section below.
Headers may be
renamed (<B>ps -o pid,ruser=RealUser -o comm=Command</B>) as desired.
If all column headers are empty (<B>ps -o pid= -o comm=</B>) then the
header line will not be output. Column width will increase as
needed for wide headers; this may be used to widen up columns
such as WCHAN (<B>ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm</B>).
Explicit width control (<B>ps opid,wchan:42,cmd</B>) is offered too.
The behavior of <B>ps -o pid=X,comm=Y</B> varies with personality;
output may be one column named "X,comm=Y" or two columns
named "X" and "Y". Use multiple <B>-o</B> options when in doubt.
Use the <B>PS_FORMAT</B> environment variable to specify a default
as desired; DefSysV and DefBSD are macros that may be used to
choose the default UNIX or BSD columns.
<P>
<DT><B>s</B>
<DD>
display signal format
<P>
<DT><B>u</B>
<DD>
display user-oriented format
<P>
<DT><B>v</B>
<DD>
display virtual memory format
<P>
<DT><B>X</B>
<DD>
Register format.
<P>
<DT><B>-y</B>
<DD>
Do not show flags; show rss in place of addr.
This option can only be used with <B>-l</B>.
<P>
<DT><B>Z</B>
<DD>
Add a column of security data. Identical to <B>-M</B>. (for SE Linux)
<P>
</DL>
<P>
<A NAME="lbAI"> </A>
<H2>OUTPUT MODIFIERS</H2>
<P>
<P>
<DL COMPACT>
<DT><B>c</B>
<DD>
Show the true command name. This is derived from the name of the
executable file, rather than from the argv value. Command arguments
and any modifications to them are
thus not shown. This option
effectively turns the <B>args</B> format keyword into the <B>comm</B>
format keyword; it is useful with the <B>-f</B> format option and with
the various BSD-style format options, which all normally
display the command arguments.
See the <B>-f</B> option, the format keyword <B>args</B>, and the
format keyword <B>comm</B>.
<P>
<DT><B>--cols n</B>
<DD>
set screen width
<P>
<DT><B>--columns n</B>
<DD>
set screen width
<P>
<DT><B>--cumulative</B>
<DD>
include some dead child process data (as a sum with the parent)
<P>
<DT><B>e</B>
<DD>
Show the environment after the command.
<P>
<DT><B>f</B>
<DD>
ASCII-art process hierarchy (forest)
<P>
<DT><B>--forest</B>
<DD>
ASCII art process tree
<P>
<DT><B>h</B>
<DD>
No header. (or, one header per screen in the BSD personality)
<BR>
The <B>h</B> option is problematic. Standard BSD <B>ps</B> uses
this option to print a header on each page of output, but older
Linux <B>ps</B> uses this option to totally disable the header.
This version of <B>ps</B> follows the Linux usage of not printing
the header unless the BSD personality has been selected, in which
case it prints a header on each page of output. Regardless of the
current personality, you can use the long options <B>--headers</B>
and <B>--no-headers</B> to enable printing headers each page or
disable headers entirely, respectively.
<P>
<DT><B>-H</B>
<DD>
show process hierarchy (forest)
<P>
<DT><B>--headers</B>
<DD>
repeat header lines, one per page of output
<P>
<DT><B>k spec</B>
<DD>
specify sorting order. Sorting syntax is
[<B>+</B>|<B>-</B>]<I>key</I>[,[<B>+</B>|<B>-</B>]<I>key</I>[,...]]
Choose a multi-letter key from the <B>STANDARD FORMAT SPECIFIERS</B> section.
The "+" is optional since default direction is increasing numerical or
lexicographic order. Identical to <B>--sort</B>. Examples:
<BR>
<B>ps jaxkuid,-ppid,+pid</B>
<BR>
<B>ps axk comm o comm,args</B>
<BR>
<B>ps kstart_time -ef</B>
<P>
<DT><B>-n namelist</B>
<DD>
set namelist file. Identical to <B>N</B>.
<BR>
The namelist file is needed for a proper WCHAN display, and must match
the current Linux kernel exactly for correct output.
Without this option, the default search path for the namelist is:
<P>
<TT> </TT>$PS_SYSMAP<BR>
<BR>
<TT> </TT>$PS_SYSTEM_MAP<BR>
<BR>
<TT> </TT>/proc/*/wchan<BR>
<BR>
<TT> </TT>/boot/System.map-`uname -r`<BR>
<BR>
<TT> </TT>/boot/System.map<BR>
<BR>
<TT> </TT>/lib/modules/`uname -r`/System.map<BR>
<BR>
<TT> </TT>/usr/src/linux/System.map<BR>
<BR>
<TT> </TT>/System.map<BR>
<P>
<DT><B>--lines n</B>
<DD>
set screen height
<P>
<DT><B>n</B>
<DD>
Numeric output for WCHAN and USER. (including all types of UID and GID)
<P>
<DT><B>N namelist</B>
<DD>
Specify namelist file. Identical to <B>-n</B>, see <B>-n</B> above.
<P>
<DT><B>O order</B>
<DD>
Sorting order. (overloaded)
<BR>
The BSD <B>O</B> option can act like <B>-O</B> (user-defined output
format with some common fields predefined) or can be used to specify
sort order. Heuristics are used to determine the behavior of this
option. To ensure that the desired behavior is obtained (sorting or
formatting), specify the option in some other way (e.g. with <B>-O</B>
or <B>--sort</B>).
<P>
For sorting, obsolete BSD <B>O</B> option syntax is
<B>O</B>[<B>+</B>|<B>-</B>]<I>k1</I>[,[<B>+</B>|<B>-</B>]<I>k2</I>[,...]].
It orders the processes listing according to the multilevel sort specified by
the sequence of one-letter short keys <I>k1</I>, <I>k2</I>, ... described
in the <B>OBSOLETE SORT KEYS</B> section below.
The "+" is currently optional,
merely re-iterating the default direction on a key,
but may help to distinguish an <B>O</B> sort from an <B>O</B> format.
The "-" reverses direction only on the key it precedes.
<P>
<DT><B>--no-headers</B>
<DD>
print no header line at all. --no-heading is an alias for this
option.
<P>
<DT><B>--rows n</B>
<DD>
set screen height
<P>
<DT><B>S</B>
<DD>
Sum up some information, such as CPU usage, from dead child processes
into their parent. This is useful for examining a system where a
parent process repeatedly forks off short-lived children to do work.
<P>
<DT><B>--sort spec</B>
<DD>
specify sorting order. Sorting syntax is
[<B>+</B>|<B>-</B>]<I>key</I>[,[<B>+</B>|<B>-</B>]<I>key</I>[,...]]
Choose a multi-letter key from the <B>STANDARD FORMAT SPECIFIERS</B> section.
The "+" is optional since default direction is increasing numerical or
lexicographic order. Identical to <B>k</B>.
For example: <B>ps jax --sort=uid,-ppid,+pid</B>
<P>
<DT><B>w</B>
<DD>
Wide output. Use this option twice for unlimited width.
<P>
<DT><B>-w</B>
<DD>
Wide output. Use this option twice for unlimited width.
<P>
<DT><B>--width n</B>
<DD>
set screen width
<P>
</DL>
<P>
<A NAME="lbAJ"> </A>
<H2>THREAD DISPLAY</H2>
<P>
<DL COMPACT>
<DT><B>H</B>
<DD>
Show threads as if they were processes
<P>
<DT><B>-L</B>
<DD>
Show threads, possibly with LWP and NLWP columns
<P>
<DT><B>m</B>
<DD>
Show threads after processes
<P>
<DT><B>-m</B>
<DD>
Show threads after processes
<P>