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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989
|
'\" t
.\" (The preceding line is a note to broken versions of man to tell
.\" Man page for ps.
.\" Quick hack conversion by Albert Cahalan, 1998.
.\" Licensed under version 2 of the Gnu General Public License.
.\"
.TH PS 1 2018-01-13 "procps-ng" "User Commands"
.\"
.\" To render this page:
.\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
.\" groff -t -b -man -X -TX100 ps.1 &
.\" tbl ps.1 | troff -Ww -man -z
.\" groff -t -man -Tps ps.1 | ps2pdf - - > ps.pdf
.\"
.\" Ragged-right text.
.na
.\" Disable hyphenation.
.nh
.\"
.\" ColSize is used for the format spec table.
.\" It's the left margin, minus the right, minus
.\" the space needed for the 1st two columns.
.\" Making it messy: inches, ens, points, scaled points...
.\"
.nr ColSize ((\n[.l] - \n[.i]) / 1n - 29)
.\"
.SH NAME
ps \- report a snapshot of the current processes.
.SH SYNOPSIS
\fBps\fR [\fIoptions\fR]
.PP
.PP
.SH DESCRIPTION
.B ps
displays information about a selection of the active processes. If you want
a repetitive update of the selection and the displayed information, use
.IR top (1)
instead.
.P
This version of
.B ps
accepts several kinds of options:
.IP
.PD 0
.IP 1 4
UNIX options, which may be grouped and must be preceded by a dash.
.IP 2 4
BSD options, which may be grouped and must not be used with a dash.
.IP 3 4
GNU long options, which are preceded by two dashes.
.PD
.PP
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
implementations that this
.B ps
is compatible with.
.P
Note that "\fBps \-aux\fR" is distinct from "\fBps\ aux\fR". The POSIX and
UNIX standards require that "\fBps\ \-aux\fR" print all processes owned by a
user named "x", as well as printing all processes that would be selected by
the
.B \-a
option. If the user named "x" does not exist, this
.B ps
may interpret the command as "\fBps\ aux\fR" 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
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
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
will be considered identical to \fBZ\fR 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.
.PP
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH "EXAMPLES"
.TP 3
To see every process on the system using standard syntax:
.B ps\ \-e
.br
.B ps\ \-ef
.br
.B ps\ \-eF
.br
.B ps\ \-ely
.TP
To see every process on the system using BSD syntax:
.B ps\ ax
.br
.B ps\ axu
.TP
To print a process tree:
.B ps\ -ejH
.br
.B ps\ axjf
.TP
To get info about threads:
.B ps\ -eLf
.br
.B ps\ axms
.TP
To get security info:
.B ps\ -eo euser,ruser,suser,fuser,f,comm,label
.br
.B ps\ axZ
.br
.B ps\ -eM
.TP
To see every process running as root (real\ &\ effective\ ID) in user format:
.B ps\ \-U\ root\ \-u\ root\ u
.TP
To see every process with a user\-defined format:
.B ps\ \-eo\ pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
.br
.B ps\ axo\ stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
.br
.B ps\ \-Ao\ pid,tt,user,fname,tmout,f,wchan
.TP
Print only the process IDs of syslogd:
.B ps\ \-C\ syslogd\ \-o\ pid=
.TP
Print only the name of PID 42:
.B ps\ \-q\ 42\ \-o\ comm=
.PP
.PP
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH "SIMPLE PROCESS SELECTION"
.TP
.BR a
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
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
to list all processes with a terminal (tty), or to list all processes when
used together with the
.B x
option.
.TP
.B \-A
Select all processes. Identical to
.BR \-e .
.TP
.B \-a
Select all processes except both session leaders (see
.IR getsid (2))
and processes not associated with a terminal.
.TP
.B \-d
Select all processes except session leaders.
.TP
.B \-\-deselect
Select all processes except those that fulfill the specified conditions
(negates the selection). Identical to
.BR \-N .
.TP
.B \-e
Select all processes. Identical to
.BR \-A .
.\" Current "g" behavior: add in the session leaders, which would
.\" be excluded in the sunos4 personality. Supposed "g" behavior:
.\" add in the group leaders -- at least according to the SunOS 4
.\" man page on the FreeBSD site. Uh oh. I think I had tested SunOS
.\" though, so maybe the code is correct.
.TP
.B g
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
flag, and is only useful when operating in the sunos4 personality.
.TP
.B \-N
Select all processes except those that fulfill the specified conditions
(negates the selection). Identical to
.BR \-\-deselect .
.TP
.B T
Select all processes associated with this terminal. Identical to the
.B t
option without any argument.
.TP
.B r
Restrict the selection to only running processes.
.TP
.B x
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
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
to list all processes owned by you (same EUID as
.BR ps ),
or to list all processes when used together with the
.B a
option.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH "PROCESS SELECTION BY LIST"
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:
\fBps\ \-p\ "1\ 2"\ \-p\ 3,4\fR
.TP
.RI \- 123
Identical to \fB\-\-pid\ \fI123\fR.
.TP
.I 123
Identical to \fB\-\-pid\ \fI123\fR.
.TP
.BI \-C \ cmdlist
Select by command name. This selects the processes whose executable name is
given in
.IR cmdlist .
.TP
.BI \-G \ grplist
Select by real group ID (RGID) or name. This selects the processes whose
real group name or ID is in the
.I grplist
list. The real group ID identifies the group of the user who created the
process, see
.IR getgid (2).
.TP
.BI \-g \ grplist
Select by session OR by effective group name. 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
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
and
.B \-\-group
options.
.TP
.BI \-\-Group \ grplist
Select by real group ID (RGID) or name. Identical to
.BR \-G .
.TP
.BI \-\-group \ grplist
Select by effective group ID (EGID) or name. This selects the processes
whose effective group name or ID is in
.IR grplist .
The effective group ID describes the group whose file access permissions are
used by the process (see
.IR getegid (2)).
The
.B \-g
option is often an alternative to
.BR \-\-group .
.TP
.BI p \ pidlist
Select by process ID. Identical to
.B \-p
and
.BR \-\-pid .
.TP
.BI \-p \ pidlist
Select by PID. This selects the processes whose process ID numbers appear in
.IR pidlist .
Identical to
.B p
and
.BR \-\-pid .
.TP
.BI \-\-pid \ pidlist
Select by process\ ID. Identical to
.B \-p
and
.BR p .
.TP
.BI \-\-ppid \ pidlist
Select by parent process ID. This selects the processes with a parent
process\ ID in
.IR pidlist .
That is, it selects processes that are children of those listed in
.IR pidlist .
.TP
.BI q \ pidlist
Select by process ID (quick mode). Identical to
.B \-q
and
.BR \-\-quick\-pid .
.TP
.BI \-q \ pidlist
Select by PID (quick mode). This selects the processes whose process ID numbers appear in
.IR pidlist .
With this option \fBps\fR reads the necessary info only
for the pids listed in the \fIpidlist\fR and doesn't apply
additional filtering rules. The order of pids is unsorted
and preserved. No additional selection options, sorting
and forest type listings are allowed in this mode.
Identical to
.B q
and
.BR \-\-quick\-pid .
.TP
.BI \-\-quick\-pid \ pidlist
Select by process\ ID (quick mode). Identical to
.B \-q
and
.BR q .
.TP
.BI \-s \ sesslist
Select by session ID. This selects the processes with a session ID specified
in
.IR sesslist .
.TP
.BI \-\-sid \ sesslist
Select by session\ ID. Identical to
.BR \-s .
.TP
.BI t \ ttylist
Select by tty. Nearly identical to
.B \-t
and
.BR \-\-tty ,
but can also
be used with an empty
.I ttylist
to indicate the terminal associated with
.BR ps .
Using the
.B T
option is considered cleaner than using
.B t
with an empty
.IR ttylist .
.TP
.BI \-t \ ttylist
Select by tty. This selects the processes associated with the terminals
given in
.IR ttylist .
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.
.TP
.BI \-\-tty \ ttylist
Select by terminal. Identical to
.B \-t
and
.BR t .
.TP
.BI U \ userlist
Select by effective user ID (EUID) or name. This selects the processes whose
effective user name or ID is in
.IR userlist .
The effective user ID describes the user whose file access permissions are
used by the process (see
.IR geteuid (2)).
Identical to
.B \-u
and
.BR \-\-user .
.TP
.BI \-U \ userlist
Select by real user ID (RUID) or name. It selects the processes whose real
user name or ID is in the
.I userlist
list. The real user ID identifies the user who created the process, see
.IR getuid (2).
.TP
.BI \-u \ userlist
Select by effective user ID (EUID) or name. This selects the processes whose
effective user name or ID is in
.IR userlist .
The effective user ID describes the user whose file
access permissions are used by the process (see
.IR geteuid (2)).
Identical to
.B U
and
.BR \-\-user .
.TP
.BI \-\-User \ userlist
Select by real user ID (RUID) or name. Identical to
.BR \-U .
.TP
.BI \-\-user \ userlist
Select by effective user ID (EUID) or name. Identical to
.B \-u
and
.BR U .
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH "OUTPUT FORMAT CONTROL"
These options are used to choose the information displayed by
.BR ps .
The output may differ by personality.
.PP
.TP
.B \-c
Show different scheduler information for the
.B \-l
option.
.TP
.B \-\-context
Display security context format (for SELinux).
.TP
.B \-f
Do 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
.BR \-L ,
the NLWP (number of threads) and LWP (thread ID) columns will be added. See
the
.B c
option, the format keyword
.BR args ,
and the format keyword
.BR comm .
.TP
.B \-F
Extra full format. See the
.B \-f
option, which
.B \-F
implies.
.TP
.BI \-\-format \ format
user\-defined format. Identical to
.B \-o
and
.BR o .
.TP
.B j
BSD job control format.
.TP
.B \-j
Jobs format.
.TP
.B l
Display BSD long format.
.TP
.B \-l
Long format. The
.B \-y
option is often useful with this.
.TP
.B \-M
Add a column of security data. Identical to
.B Z
(for SELinux).
.TP
.BI O \ format
is preloaded
.B o
(overloaded). The BSD
.B O
option can act like
.B \-O
(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
or
.BR \-\-sort ).
When used as a formatting option, it is identical to
.BR \-O ,
with the BSD personality.
.TP
.BI \-O \ format
Like
.BR \-o ,
but preloaded with some default columns. Identical to
\fB\-o\ pid,\:\fIformat\fB,\:state,\:tname,\:time,\:command\fR or
\fB\-o\ pid,\:\fIformat\fB,\:tname,\:time,\:cmd\fR,
see
.B \-o
below.
.TP
.BI o \ format
Specify user\-defined format. Identical to
.B \-o
and
.BR \-\-format .
.TP
.BI \-o \ format
User\-defined format.
.I format
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
section below. Headers may be renamed
.RB ( "ps \-o pid,\:ruser=RealUser \-o comm=Command" )
as desired.
If all column headers are empty
.RB ( "ps \-o pid= \-o comm=" )
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
.RB ( "ps \-o pid,\:wchan=\:WIDE\-\:WCHAN\-\:COLUMN \-o comm" ).
Explicit width
control
.RB ( "ps opid,\:wchan:42,\:cmd" )
is offered too. The behavior of
.B ps -o pid=X,\:comm=Y
varies with personality; output may be one column named "X,\:comm=Y" or two
columns named "X" and "Y". Use multiple
.B \-o
options when in doubt. Use the
.B PS_FORMAT
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.
.TP
.B s
Display signal format.
.TP
.B u
Display user\-oriented format.
.TP
.B v
Display virtual memory format.
.TP
.B X
Register format.
.TP
.B \-y
Do not show flags; show rss in place of addr. This option can only be used
with
.BR \-l .
.TP
.B Z
Add a column of security data. Identical to
.B \-M
(for SELinux).
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH "OUTPUT MODIFIERS"
.\" .TP
.\" .B C
.\" use raw CPU time for %CPU instead of decaying average
.TP
.B c
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
format keyword into the
.B comm
format keyword; it is useful with the
.B \-f
format option and with the various BSD\-style format options, which all
normally display the command arguments. See the
.B \-f
option, the format
keyword
.BR args ,
and the format keyword
.BR comm .
.TP
.BI \-\-cols \ n
Set screen width.
.TP
.BI \-\-columns \ n
Set screen width.
.TP
.B \-\-cumulative
Include some dead child process data (as a sum with the parent).
.TP
.B e
Show the environment after the command.
.TP
.B f
ASCII art process hierarchy (forest).
.TP
.B \-\-forest
ASCII art process tree.
.TP
.B h
No header. (or, one header per screen in the BSD personality). The
.B h
option is problematic. Standard BSD
.B ps
uses this option to print a header on each page of output, but older Linux
.B ps
uses this option to totally disable the header. This version of
.B ps
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
and
.B \-\-no\-headers
to enable printing headers each page or disable headers entirely,
respectively.
.TP
.B \-H
Show process hierarchy (forest).
.TP
.B \-\-headers
Repeat header lines, one per page of output.
.TP
.BI k \ spec
Specify sorting order. Sorting syntax is
[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]].
Choose a multi\-letter key from the
.B STANDARD FORMAT SPECIFIERS
section. The "+" is optional since default direction is increasing
numerical or lexicographic order. Identical to
.BR \-\-sort .
.RS 8
.IP
Examples:
.br
.B ps jaxkuid,\-ppid,+pid
.br
.B ps axk comm o comm,args
.br
.B ps kstart_time \-ef
.RE
.TP
.BI \-\-lines \ n
Set screen height.
.TP
.B n
Numeric output for WCHAN and USER (including all types of UID and GID).
.TP
.B \-\-no\-headers
Print no header line at all.
.B \-\-no\-heading
is an alias for this option.
.TP
.BI O \ order
Sorting order (overloaded).
The BSD
.B O
option can act like
.B \-O
(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
or
.BR \-\-sort ).
.IP
For sorting, obsolete BSD
.B O
option syntax is
\fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]].
It orders the processes listing according to the multilevel sort specified by
the sequence of one\-letter short keys
.IR k1 , k2 ", ..."
described in the
.B OBSOLETE SORT KEYS
section below. The\ "+" is currently optional, merely re\-iterating the
default direction on a key, but may help to distinguish an
.B O
sort from an
.B O
format. The "\-" reverses direction only on the key it precedes.
.TP
.BI \-\-rows \ n
Set screen height.
.TP
.B S
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.
.TP
.BI \-\-sort \ spec
Specify sorting order. Sorting syntax is
[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]. Choose a
multi\-letter key from the
.B STANDARD FORMAT SPECIFIERS
section. The "+" is optional since default direction is increasing numerical
or lexicographic order. Identical to
.BR k .
For example:
.B ps jax \-\-sort=\:uid,\:\-ppid,\:+pid
.TP
.B w
Wide output. Use this option twice for unlimited width.
.TP
.B \-w
Wide output. Use this option twice for unlimited width.
.TP
.BI \-\-width \ n
Set screen width.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH "THREAD DISPLAY"
.TP
.B H
Show threads as if they were processes.
.TP
.B \-L
Show threads, possibly with LWP and NLWP columns.
.TP
.B m
Show threads after processes.
.TP
.B \-m
Show threads after processes.
.TP
.B \-T
Show threads, possibly with SPID column.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH "OTHER INFORMATION"
.TP
.BI \-\-help \ section
Print a help message. The section argument can be one of
\fIs\fRimple,
\fIl\fRist,
\fIo\fRutput,
\fIt\fRhreads,
\fIm\fRisc or
\fIa\fRll.
The argument can be shortened to one of the underlined letters as in: s|l|o|t|m|a.
.TP
.B \-\-info
Print debugging info.
.TP
.B L
List all format specifiers.
.TP
.B V
Print the procps-ng version.
.TP
.B \-V
Print the procps-ng version.
.TP
.B \-\-version
Print the procps-ng version.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
.PP
.SH NOTES
This
.B ps
works by reading the virtual files in /proc. This
.B ps
does not need to be setuid kmem or have any privileges to run. Do not give
this
.B ps
any special permissions.
.PP
.PP
CPU usage is currently expressed as the percentage of time spent running
during the entire lifetime of a process. This is not ideal, and\ it does not
conform to the standards that
.B ps
otherwise conforms to. CPU usage is unlikely to add up to exactly 100%.
.PP
The SIZE and RSS fields don't count some parts of a process including the
page tables, kernel stack, struct thread_info, and struct task_struct. This
is usually at least 20 KiB of memory that is always resident. SIZE is the
virtual size of the process (code+\:data+\:stack).
.PP
Processes marked <defunct> are dead processes (so\-called "zombies") that
remain because their parent has not destroyed them properly. These processes
will be destroyed by
.IR init (8)
if the parent process exits.
.PP
If the length of the username is greater than the length of the display
column, the username will be truncated. See the -o and -O formatting
options to customize length.
.PP
Commands options such as
.B ps \-aux
are not recommended as it is a confusion of two different standards.
According to the POSIX and UNIX standards, the above command asks to
display all processes with a TTY (generally the commands users are
running) plus all processes owned by a user named "x". If that user
doesn't exist, then
.B ps
will assume you really meant "\fBps\fR \fIaux\fR".
.SH "PROCESS FLAGS"
The sum of these values is displayed in the "F" column,
which is provided by the
.B flags
output specifier:
.IP
.RS 8
.PD 0
.TP 5
1
forked but didn't exec
.TP
4
used super\-user privileges
.PD
.RE
.PP
.SH "PROCESS STATE CODES"
Here are the different values that the
.BR s , \ stat \ and \ state
output specifiers (header "STAT" or "S") will display to describe the state
of a process:
.IP
.RS 8
.PD 0
.TP 5
D
uninterruptible sleep (usually IO)
.TP
I
Idle kernel thread
.TP
R
running or runnable (on run queue)
.TP
S
interruptible sleep (waiting for an event to complete)
.TP
T
stopped by job control signal
.TP
t
stopped by debugger during the tracing
.TP
W
paging (not valid since the 2.6.xx kernel)
.TP
X
dead (should never be seen)
.TP
Z
defunct ("zombie") process, terminated but not reaped by its parent
.PD
.RE
.PP
For BSD formats and when the
.B stat
keyword is used, additional characters may be displayed:
.IP
.RS 8
.PD 0
.TP 5
<
high\-priority (not nice to other users)
.TP
N
low\-priority (nice to other users)
.TP
L
has pages locked into memory (for real\-time and custom IO)
.TP
s
is a session leader
.TP
l
is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
.TP
+
is in the foreground process group
.PD
.RE
.PP
.SH "OBSOLETE SORT KEYS"
These keys are used by the BSD
.B O
option (when it is used for sorting). The GNU
.B \-\-sort
option doesn't use these keys, but the specifiers described below in the
.B STANDARD FORMAT SPECIFIERS
section. Note that the values used in sorting are the internal values
.B ps
uses and not the "cooked" values used in some of the output format fields
(e.g. sorting on tty will sort into device number, not according to the
terminal name displayed). Pipe
.B ps
output into the
.BR sort (1)
command if you want to sort the cooked values.
.TS
l l lw(3i).
\fBKEY LONG DESCRIPTION\fR
c cmd simple name of executable
C pcpu cpu utilization
f flags flags as in long format F field
g pgrp process group ID
G tpgid controlling tty process group ID
j cutime cumulative user time
J cstime cumulative system time
k utime user time
m min_flt number of minor page faults
M maj_flt number of major page faults
n cmin_flt cumulative minor page faults
N cmaj_flt cumulative major page faults
o session session ID
p pid process ID
P ppid parent process ID
r rss resident set size
R resident resident pages
s size memory size in kilobytes
S share amount of shared pages
t tty the device number of the controlling tty
T start_time time process was started
U uid user ID number
u user user name
v vsize total VM size in KiB
y priority kernel scheduling priority
.\"K stime system time (conflict, system vs. start time)
.TE
.PP
.PP
.SH "AIX FORMAT DESCRIPTORS"
This
.B ps
supports AIX format descriptors, which work somewhat like the
formatting codes of
.IR printf (1)
and
.IR printf (3).
For example, the normal default output can be produced with this:
\fBps \-eo "%p %y %x %c"\fR.
The
.B NORMAL
codes are described in the next section.
.TS
l l l.
\fBCODE NORMAL HEADER\fR
%C pcpu %CPU
%G group GROUP
%P ppid PPID
%U user USER
%a args COMMAND
%c comm COMMAND
%g rgroup RGROUP
%n nice NI
%p pid PID
%r pgid PGID
%t etime ELAPSED
%u ruser RUSER
%x time TIME
%y tty TTY
%z vsz VSZ
.TE
.SH "STANDARD FORMAT SPECIFIERS"
Here are the different keywords that may be used to control the output
format (e.g. with option
.BR \-o )
or to sort the selected processes with the GNU\-style
.B \-\-sort
option.
.PP
For example:
.B ps \-eo pid,\:user,\:args \-\-sort user
.PP
This version of
.B ps
tries to recognize most of the keywords used in other implementations of
.BR ps .
.PP
The following user\-defined format specifiers may contain
spaces:
.BR args , \ cmd , \ comm , \ command , \ fname , \ ucmd , \ ucomm ,
.BR lstart , \ bsdstart , \ start .
.PP
Some keywords may not be available for sorting.
.\" #######################################################################
.\" lB1 lB1 lB1 lB1 s s s
.\" lB1 l1 l1 l1 s s s.
.\"
.\" lB1 lB1 lBw(5.5i)
.\" lB1 l1 l.
.\"
.TS
expand;
lB1 lB1 lBw(\n[ColSize]n)
lB1 l1 l.
CODE HEADER DESCRIPTION
%cpu %CPU T{
cpu utilization of the process in "##.#" format. Currently, it is the CPU
time used divided by the time the process has been running (cputime/realtime
ratio), expressed as a percentage. It will not add up to 100% unless you are
lucky. (alias
.BR pcpu ).
T}
%mem %MEM T{
ratio of the process's resident set size to the physical memory on the
machine, expressed as a percentage. (alias
.BR pmem ).
T}
args COMMAND T{
command with all its arguments as a string. Modifications to the arguments
may be shown. The output in this column may contain spaces. A process
marked <defunct> is partly dead, waiting to be fully destroyed by its parent.
Sometimes the process args will be unavailable; when this happens,
.B ps
will instead print the executable name in brackets. (alias
.BR cmd , \ command ).
See also the
.B comm
format keyword, the
.B \-f
option, and the
.B c
option.
.br
When specified last, this column will extend to the edge of the display. If
.B ps
can not determine display width, as when output is redirected (piped) into a
file or another command, the output width is undefined (it may be 80,
unlimited, determined by the
.B TERM
variable, and so on). The
.B COLUMNS
environment variable or
.B \-\-cols
option may be used to exactly determine the width in this case. The
.B w
or
.B \-w
option may be also be used to adjust width.
T}
blocked BLOCKED T{
mask of the blocked signals, see
.IR signal (7).
According to the width of the field, a 32 or 64\-bit mask in hexadecimal
format is displayed. (alias
.BR sig_block , \ sigmask ).
T}
bsdstart START T{
time the command started. If the process was started less than 24 hours ago,
the output format is "\ HH:MM", else it is " Mmm:SS" (where Mmm is the three
letters of the month). See also
.BR lstart , \ start , \ start_time ", and" \ stime .
T}
bsdtime TIME T{
accumulated cpu time, user + system. The display format is usually
"MMM:SS", but can be shifted to the right if the process used more than 999
minutes of cpu time.
T}
c C T{
processor utilization. Currently, this is the integer value of the percent
usage over the lifetime of the process. (see
.BR %cpu ).
T}
caught CAUGHT T{
mask of the caught signals, see
.IR signal (7).
According to the width of the field, a 32 or 64 bits mask in hexadecimal
format is displayed. (alias
.BR sig_catch , \ sigcatch ).
T}
cgname CGNAME T{
display name of control groups to which the process belongs.
T}
cgroup CGROUP T{
display control groups to which the process belongs.
T}
class CLS T{
scheduling class of the process. (alias
.BR policy , \ cls ).
Field's possible values are:
.IP "" 2
\- not reported
.br
TS SCHED_OTHER
.br
FF SCHED_FIFO
.br
RR SCHED_RR
.br
B SCHED_BATCH
.br
ISO SCHED_ISO
.br
IDL SCHED_IDLE
.br
DLN SCHED_DEADLINE
.br
? unknown value
T}
cls CLS T{
scheduling class of the process. (alias
.BR policy , \ cls ).
Field's possible values are:
.IP "" 2
\- not reported
.br
TS SCHED_OTHER
.br
FF SCHED_FIFO
.br
RR SCHED_RR
.br
B SCHED_BATCH
.br
ISO SCHED_ISO
.br
IDL SCHED_IDLE
.br
DLN SCHED_DEADLINE
.br
? unknown value
T}
cmd CMD T{
see
.BR args .
(alias
.BR args , \ command ).
T}
comm COMMAND T{
command name (only the executable name). Modifications to the command name
will not be shown. A process marked <defunct> is partly dead, waiting to be
fully destroyed by its parent. The output in this column may contain spaces.
(alias
.BR ucmd , \ ucomm ).
See also the
.B args format keyword,
the
.B \-f
option, and the
.B c
option.
.br
When specified last, this column will extend to the edge of the display. If
.B ps
can not determine display width, as when output is redirected (piped) into a
file or another command, the output width is undefined (it may be 80,
unlimited, determined by the
.B TERM
variable, and so on). The
.B COLUMNS
environment variable or
.B \-\-cols
option may be used to exactly determine the width in this case. The
.BR w \ or \ \-w
option may be also be used to adjust width.
T}
command COMMAND T{
See
.BR args .
(alias
.BR args , \ command ).
T}
cp CP T{
per\-mill (tenths of a percent) CPU usage. (see
.BR %cpu ).
T}
cputime TIME T{
cumulative CPU time, "[DD\-]hh:mm:ss" format. (alias
.BR time ).
T}
cputimes TIME T{
cumulative CPU time in seconds (alias
.BR times ).
T}
drs DRS T{
data resident set size, the amount of physical memory devoted to other than
executable code.
T}
egid EGID T{
effective group ID number of the process as a decimal integer. (alias
.BR gid ).
T}
egroup EGROUP T{
effective group ID of the process. This will be the textual group ID, if it
can be obtained and the field width permits, or a decimal representation
otherwise. (alias
.BR group ).
T}
eip EIP T{
instruction pointer.
T}
esp ESP T{
stack pointer.
T}
etime ELAPSED T{
elapsed time since the process was started, in the form [[DD\-]hh:]mm:ss.
T}
etimes ELAPSED T{
elapsed time since the process was started, in seconds.
T}
euid EUID T{
effective user ID (alias
.BR uid ).
T}
euser EUSER T{
effective user name. This will be the textual user ID, if it can be obtained
and the field width permits, or a decimal representation otherwise. The
.B n
option can be used to force the decimal representation. (alias
.BR uname , \ user ).
T}
f F T{
flags associated with the process, see the
.B PROCESS FLAGS
section. (alias
.BR flag , \ flags ).
T}
fgid FGID T{
filesystem access group\ ID. (alias
.BR fsgid ).
T}
fgroup FGROUP T{
filesystem access group ID. This will be the textual group ID, if it can
be obtained and the field width permits, or a decimal representation
otherwise. (alias
.BR fsgroup ).
T}
flag F T{
see
.BR f .
(alias
.BR f , \ flags ).
T}
flags F T{
see
.BR f .
(alias
.BR f , \ flag ).
T}
fname COMMAND T{
first 8 bytes of the base name of the process's executable file. The output
in this column may contain spaces.
T}
fuid FUID T{
filesystem access user ID. (alias
.BR fsuid ).
T}
fuser FUSER T{
filesystem access user ID. This will be the textual user ID, if it can be
obtained and the field width permits, or a decimal representation otherwise.
T}
gid GID T{
see
.BR egid .
(alias
.BR egid ).
T}
group GROUP T{
see
.BR egroup .
(alias
.BR egroup ).
T}
ignored IGNORED T{
mask of the ignored signals, see
.IR signal (7).
According to the width of the field, a 32 or 64 bits mask in hexadecimal
format is displayed. (alias
.BR sig_ignore , \ sigignore ).
T}
ipcns IPCNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
label LABEL T{
security label, most commonly used for SELinux context data. This is for
the
.I Mandatory Access Control
("MAC") found on high\-security systems.
T}
lstart STARTED T{
time the command started. See also
.BR bsdstart , \ start , \ start_time ", and" \ stime .
T}
lsession SESSION T{
displays the login session identifier of a process,
if systemd support has been included.
T}
luid LUID T{
displays Login ID associated with a process.
T}
lwp LWP T{
light weight process (thread) ID of the dispatchable entity (alias
.BR spid , \ tid ).
See
.B tid
for additional information.
T}
lxc LXC T{
The name of the lxc container within which a task is running.
If a process is not running inside a container, a dash ('\-') will be shown.
T}
machine MACHINE T{
displays the machine name for processes assigned to VM or container,
if systemd support has been included.
T}
maj_flt MAJFLT T{
The number of major page faults that have occurred with this process.
T}
min_flt MINFLT T{
The number of minor page faults that have occurred with this process.
T}
mntns MNTNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
netns NETNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
ni NI T{
nice value. This ranges from 19 (nicest) to \-20 (not nice to others),
see
.IR nice (1).
(alias
.BR nice ).
T}
nice NI T{
see
.BR ni . (alias
.BR ni ).
T}
nlwp NLWP T{
number of lwps (threads) in the process. (alias
.BR thcount ).
T}
numa NUMA T{
The node assocated with the most recently used processor.
A -1 means that NUMA information is unavailable.
T}
nwchan WCHAN T{
address of the kernel function where the process is sleeping (use
.B wchan
if you want the kernel function name). Running tasks will display a dash
('\-') in this column.
T}
ouid OWNER T{
displays the Unix user identifier of the owner of the session of a process,
if systemd support has been included.
T}
pcpu %CPU T{
see
.BR %cpu .
(alias
.BR %cpu ).
T}
pending PENDING T{
mask of the pending signals. See
.IR signal (7).
Signals pending on the process are distinct from signals pending on
individual threads. Use the
.B m
option or the
.B \-m
option to see both. According to the width of the field, a 32 or 64 bits
mask in hexadecimal format is displayed. (alias
.BR sig ).
T}
pgid PGID T{
process group ID or, equivalently, the process ID of the process group
leader. (alias
.BR pgrp ).
T}
pgrp PGRP T{
see
.BR pgid .
(alias
.BR pgid ).
T}
pid PID T{
a number representing the process ID (alias
.BR tgid ).
T}
pidns PIDNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
pmem %MEM T{
see
.BR %mem .
(alias
.BR %mem ).
T}
policy POL T{
scheduling class of the process. (alias
.BR class , \ cls ).
Possible values are:
.IP "" 2
\- not reported
.br
TS SCHED_OTHER
.br
FF SCHED_FIFO
.br
RR SCHED_RR
.br
B SCHED_BATCH
.br
ISO SCHED_ISO
.br
IDL SCHED_IDLE
.br
DLN SCHED_DEADLINE
.br
? unknown value
T}
ppid PPID T{
parent process ID.
T}
pri PRI T{
priority of the process. Higher number means lower priority.
T}
psr PSR T{
processor that process is currently assigned to.
T}
rgid RGID T{
real group ID.
T}
rgroup RGROUP T{
real group name. This will be the textual group ID, if it can be obtained
and the field width permits, or a decimal representation otherwise.
T}
rss RSS T{
resident set size, the non\-swapped physical memory that a task has used (in
kiloBytes). (alias
.BR rssize , \ rsz ).
T}
rssize RSS T{
see
.BR rss .
(alias
.BR rss , \ rsz ).
T}
rsz RSZ T{
see
.BR rss .
(alias
.BR rss , \ rssize ).
T}
rtprio RTPRIO T{
realtime priority.
T}
ruid RUID T{
real user ID.
T}
ruser RUSER T{
real user ID. This will be the textual user ID, if it can be obtained and
the field width permits, or a decimal representation otherwise.
T}
s S T{
minimal state display (one character). See section
.B PROCESS STATE CODES
for the different values. See also
.B stat
if you want additional information displayed. (alias
.BR state ).
T}
sched SCH T{
scheduling policy of the process. The policies SCHED_OTHER (SCHED_NORMAL),
SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, SCHED_IDLE and SCHED_DEADLINE are
respectively displayed as 0, 1, 2, 3, 4, 5 and 6.
T}
seat SEAT T{
displays the identifier associated with all hardware devices assigned
to a specific workplace,
if systemd support has been included.
T}
sess SESS T{
session ID or, equivalently, the process ID of the session leader. (alias
.BR session , \ sid ).
T}
sgi_p P T{
processor that the process is currently executing on. Displays "*" if the
process is not currently running or runnable.
T}
sgid SGID T{
saved group ID. (alias
.BR svgid ).
T}
sgroup SGROUP T{
saved group name. This will be the textual group ID, if it can be obtained
and the field width permits, or a decimal representation otherwise.
T}
sid SID T{
see
.BR sess .
(alias
.BR sess , \ session ).
T}
sig PENDING T{
see
.BR pending .
(alias
.BR pending , \ sig_pend ).
T}
sigcatch CAUGHT T{
see
.BR caught .
(alias
.BR caught , \ sig_catch ).
T}
sigignore IGNORED T{
see
.BR ignored .
(alias
.BR ignored , \ sig_ignore ).
T}
sigmask BLOCKED T{
see
.BR blocked .
(alias
.BR blocked , \ sig_block ).
T}
size SIZE T{
approximate amount of swap space that would be required if the process were
to dirty all writable pages and then be swapped out. This number is very
rough!
T}
slice SLICE T{
displays the slice unit which a process belongs to,
if systemd support has been included.
T}
spid SPID T{
see
.BR lwp .
(alias
.BR lwp , \ tid ).
T}
stackp STACKP T{
address of the bottom (start) of stack for the process.
T}
start STARTED T{
time the command started. If the process was started less than 24 hours ago,
the output format is "HH:MM:SS", else it is "\ \ Mmm\ dd" (where Mmm is a
three\-letter month name). See also
.BR lstart , \ bsdstart , \ start_time ", and" \ stime .
T}
start_time START T{
starting time or date of the process. Only the year will be displayed if the
process was not started the same year
.B ps
was invoked, or "MmmDD" if it was not started the same day, or "HH:MM"
otherwise. See also
.BR bsdstart , \ start , \ lstart ", and" \ stime .
T}
stat STAT T{
multi\-character process state. See section
.B PROCESS STATE CODES
for the different values meaning. See also
.BR s \ and \ state
if you just want the first character displayed.
T}
state S T{
see
.BR s ". (alias" \ s ).
T}
suid SUID T{
saved user ID. (alias
.BR svuid ).
T}
supgid SUPGID T{
group ids of supplementary groups, if any. See
.BR getgroups (2).
T}
supgrp SUPGRP T{
group names of supplementary groups, if any. See
.BR getgroups (2).
T}
suser SUSER T{
saved user name. This will be the textual user ID, if it can be obtained and
the field width permits, or a decimal representation otherwise. (alias
.BR svuser ).
T}
svgid SVGID T{
see
.BR sgid .
(alias
.BR sgid ).
T}
svuid SVUID T{
see
.BR suid .
(alias
.BR suid ).
T}
sz SZ T{
size in physical pages of the core image of the process. This includes text,
data, and stack space. Device mappings are currently excluded; this is
subject to change. See
.BR vsz \ and \ rss .
T}
tgid TGID T{
a number representing the thread group to which a task belongs (alias
.BR pid ).
It is the process ID of the thread group leader.
T}
thcount THCNT T{
see
.BR nlwp .
(alias
.BR nlwp ).
number of kernel threads owned by the process.
T}
tid TID T{
the unique number representing a dispatchable entity (alias
.BR lwp , \ spid ).
This value may also appear as: a process ID (pid); a process group ID (pgrp);
a session ID for the session leader (sid); a thread group ID for the thread
group leader (tgid); and a tty process group ID for the process group leader
(tpgid).
T}
time TIME T{
cumulative CPU\ time, "[DD\-]HH:MM:SS" format. (alias
.BR cputime ).
T}
times TIME T{
cumulative CPU\ time in seconds (alias
.BR cputimes ).
T}
tname TTY T{
controlling tty (terminal). (alias
.BR tt , \ tty ).
T}
tpgid TPGID T{
ID of the foreground process group on the tty (terminal) that the process is
connected to, or \-1 if the process is not connected to a tty.
T}
trs TRS T{
text resident set size, the amount of physical memory devoted to executable code.
T}
tt TT T{
controlling tty (terminal). (alias
.BR tname , \ tty ).
T}
tty TT T{
controlling tty (terminal). (alias
.BR tname , \ tt ).
T}
ucmd CMD T{
see
.BR comm .
(alias
.BR comm , \ ucomm ).
T}
ucomm COMMAND T{
see
.BR comm .
(alias
.BR comm , \ ucmd ).
T}
uid UID T{
see
.BR euid .
(alias
.BR euid ).
T}
uname USER T{
see
.BR euser .
(alias
.BR euser , \ user ).
T}
unit UNIT T{
displays unit which a process belongs to,
if systemd support has been included.
T}
user USER T{
see
.BR euser .
(alias
.BR euser , \ uname ).
T}
userns USERNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
utsns UTSNS T{
Unique inode number describing the namespace the process belongs to. See namespaces(7).
T}
uunit UUNIT T{
displays user unit which a process belongs to,
if systemd support has been included.
T}
vsize VSZ T{
see
.BR vsz .
(alias
.BR vsz ).
T}
vsz VSZ T{
virtual memory size of the process in KiB (1024\-byte units). Device
mappings are currently excluded; this is subject to change. (alias
.BR vsize ).
T}
wchan WCHAN T{
name of the kernel function in which the process is sleeping, a "\-" if the
process is running, or a "*" if the process is multi\-threaded and
.B ps
is not displaying threads.
T}
.TE
.\" #######################################################################
.PP
.PP
.SH "ENVIRONMENT VARIABLES"
The following environment variables could affect
.BR ps :
.TP 3
.B COLUMNS
Override default display width.
.TP
.B LINES
Override default display height.
.TP
.B PS_PERSONALITY
Set to one of posix, old, linux, bsd, sun, digital... (see section
.B PERSONALITY
below).
.TP
.B CMD_ENV
Set to one of posix, old, linux, bsd, sun, digital... (see section
.B PERSONALITY
below).
.TP
.B I_WANT_A_BROKEN_PS
Force obsolete command line interpretation.
.TP
.B LC_TIME
Date format.
.TP
.B PS_COLORS
Not currently supported.
.TP
.B PS_FORMAT
Default output format override. You may set this to a format
string of the type used for the
.B \-o
option.
The
.B DefSysV
and
.B DefBSD
values are particularly useful.
.TP
.B POSIXLY_CORRECT
Don't find excuses to ignore bad "features".
.TP
.B POSIX2
When set to "on", acts as
.BR POSIXLY_CORRECT .
.TP
.B UNIX95
Don't find excuses to ignore bad "features".
.TP
.B _XPG
Cancel \fBCMD_ENV\fR=\fIirix\fR non\-standard behavior.
.PP
In general, it is a bad idea to set these variables. The one exception is
.B CMD_ENV
or
.BR PS_PERSONALITY ,
which could be set to Linux for normal systems. Without that setting,
.B ps
follows the useless and bad parts of the Unix98 standard.
.PP
.SH "PERSONALITY"
.TS
l l.
390 like the OS/390 OpenEdition \fBps\fR
aix like AIX \fBps\fR
bsd like FreeBSD \fBps\fR (totally non\-standard)
compaq like Digital Unix \fBps\fR
debian like the old Debian \fBps\fR
digital like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
gnu like the old Debian \fBps\fR
hp like HP\-UX \fBps\fR
hpux like HP\-UX \fBps\fR
irix like Irix \fBps\fR
linux ***** \fBrecommended\fR *****
old like the original Linux \fBps\fR (totally non\-standard)
os390 like OS/390 Open Edition \fBps\fR
posix standard
s390 like OS/390 Open Edition \fBps\fR
sco like SCO \fBps\fR
sgi like Irix \fBps\fR
solaris2 like Solaris 2+ (SunOS 5) \fBps\fR
sunos4 like SunOS 4 (Solaris 1) \fBps\fR (totally non\-standard)
svr4 standard
sysv standard
tru64 like Tru64 (was Digital Unix, was OSF/1) \fBps\fR
unix standard
unix95 standard
unix98 standard
.TE
.PP
.PP
.SH "SEE ALSO"
.BR pgrep (1),
.BR pstree (1),
.BR top (1),
.BR proc (5).
.PP
.PP
.SH STANDARDS
This
.B ps
conforms to:
.PP
.PD 0
.IP 1 4
Version 2 of the Single Unix Specification
.IP 2 4
The Open Group Technical Standard Base Specifications, Issue\ 6
.IP 3 4
IEEE Std 1003.1, 2004\ Edition
.IP 4 4
X/Open System Interfaces Extension [UP\ XSI]
.IP 5 4
ISO/IEC 9945:2003
.PD
.PP
.SH AUTHOR
.B ps
was originally written by
.UR lankeste@\:fwi.\:uva.\:nl
Branko Lankester
.UE .
.UR johnsonm@\:redhat.\:com
Michael K. Johnson
.UE
re\-wrote it significantly to use the proc filesystem, changing a few things
in the process.
.UR mjshield@\:nyx.\:cs.\:du.\:edu
Michael Shields
.UE
added the pid\-list feature.
.UR cblake@\:bbn.\:com
Charles Blake
.UE
added multi\-level sorting, the dirent\-style library, the device
name\-to\-number mmaped database, the approximate binary search directly on
System.map, and many code and documentation cleanups. David Mossberger\-Tang
wrote the generic BFD support for psupdate.
.UR albert@\:users.\:sf.\:net
Albert Cahalan
.UE
rewrote ps for full Unix98 and BSD support, along with some ugly hacks for
obsolete and foreign syntax.
.PP
Please send bug reports to
.UR procps@\:freelists.\:org
.UE .
No subscription is required or suggested.
|