Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section


  27 .\" The contents of this file are subject to the terms of the
  28 .\" Common Development and Distribution License (the "License").
  29 .\" You may not use this file except in compliance with the License.
  30 .\"
  31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  32 .\" or http://www.opensolaris.org/os/licensing.
  33 .\" See the License for the specific language governing permissions
  34 .\" and limitations under the License.
  35 .\"
  36 .\" When distributing Covered Code, include this CDDL HEADER in each
  37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38 .\" If applicable, add the following below this CDDL HEADER, with the
  39 .\" fields enclosed by brackets "[]" replaced with your own identifying
  40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41 .\"
  42 .\"
  43 .\" Copyright 1989 AT&T
  44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
  45 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
  46 .\" Copyright (c) 2013 Gary Mills
  47 .\" Copyright (c) 2017, Joyent, Inc.
  48 .\"
  49 .TH PS 1 "Jun 13, 2017"
  50 .SH NAME
  51 ps \- report process status
  52 .SH SYNOPSIS
  53 .LP
  54 .nf
  55 \fBps\fR [\fB-aAcdefjHlLPWyZ\fR] [\fB-g\fR \fIgrplist\fR] [\fB-h\fR \fIlgrplist\fR]
  56      [\fB-n\fR \fInamelist\fR] [\fB-o\fR \fIformat\fR]... [\fB-p\fR \fIproclist\fR]
  57      [\fB-s\fR \fIsidlist\fR] [\fB-t\fR \fIterm\fR] [\fB-u\fR \fIuidlist\fR] [\fB-U\fR \fIuidlist\fR]
  58      [\fB-G\fR \fIgidlist\fR] [\fB-z\fR \fIzonelist\fR]
  59 .fi
  60 
  61 .SH DESCRIPTION
  62 .LP
  63 The \fBps\fR command prints information about active processes. Without
  64 options, \fBps\fR prints information about processes that have the same
  65 effective user \fBID\fR and the same controlling terminal as the invoker. The
  66 output contains only the process \fBID\fR, terminal identifier, cumulative
  67 execution time, and the command name. Otherwise, the information that is
  68 displayed is controlled by the options.
  69 .sp


1032 .na
1033 \fB\fBopri\fR\fR
1034 .ad
1035 .RS 11n
1036 The obsolete priority of the process. Lower numbers mean higher priority.
1037 .RE
1038 
1039 .sp
1040 .ne 2
1041 .na
1042 \fB\fBlwp\fR\fR
1043 .ad
1044 .RS 11n
1045 The decimal value of the lwp \fBID\fR. Requesting this formatting option causes
1046 one line to be printed for each lwp in the process.
1047 .RE
1048 
1049 .sp
1050 .ne 2
1051 .na










1052 \fB\fBnlwp\fR\fR
1053 .ad
1054 .RS 11n
1055 The number of lwps in the process.
1056 .RE
1057 
1058 .sp
1059 .ne 2
1060 .na
1061 \fB\fBpsr\fR\fR
1062 .ad
1063 .RS 11n
1064 The number of the processor to which the process or lwp is bound.
1065 .RE
1066 
1067 .sp
1068 .ne 2
1069 .na
1070 \fB\fBpset\fR\fR
1071 .ad


1156 .ne 2
1157 .na
1158 \fB\fBlgrp\fR\fR
1159 .ad
1160 .RS 11n
1161 The home lgroup of the process.
1162 .RE
1163 
1164 .sp
1165 .ne 2
1166 .na
1167 \fB\fBdmodel\fR\fR
1168 .ad
1169 .RS 11n
1170 The data model of the process, printed in the same manner as via
1171 \fBpflags\fR(1). The currently supported data models are _ILP32 and _LP64.
1172 .RE
1173 
1174 .sp
1175 .LP
1176 Only \fBcomm\fR and \fBargs\fR are allowed to contain blank characters; all
1177 others, including the Solaris implementation variables, are not.
1178 .sp
1179 .LP
1180 The following table specifies the default header to be used in the POSIX locale
1181 corresponding to each format specifier.
1182 .sp
1183 
1184 .sp
1185 .TS
1186 box;
1187 c c c c
1188 c c c c .
1189 Format  Default Format  Default
1190 Specifier       Header  Specifier       Header
1191 _
1192 args    COMMAND ppid    PPID
1193 comm    COMMAND rgroup  RGROUP
1194 etime   ELAPSED ruser   RUSER
1195 group   GROUP   time    TIME
1196 nice    NI      tty     TT
1197 pcpu    %CPU    user    USER


1204 The following table lists the Solaris implementation format specifiers and the
1205 default header used with each.
1206 .sp
1207 
1208 .sp
1209 .TS
1210 box;
1211 c c c c
1212 c c c c .
1213 Format  Default Format  Default
1214 Specifier       Header  Specifier       Header
1215 _
1216 addr    ADDR    projid  PROJID
1217 c       C       project PROJECT
1218 class   CLS     psr     PSR
1219 f       F       rgid    RGID
1220 fname   COMMAND rss     RSS
1221 gid     GID     ruid    RUID
1222 lgrp    LGRP    s       S
1223 lwp     LWP     sid     SID
1224 nlwp    NLWP    stime   STIME
1225 opri    PRI     taskid  TASKID
1226 osz     SZ      uid     UID
1227 pmem    %MEM    wchan   WCHAN
1228 pri     PRI     zone    ZONE
1229 ctid    CTID    zoneid  ZONEID

1230 .TE
1231 
1232 .SH EXAMPLES
1233 .LP
1234 \fBExample 1 \fRUsing \fBps\fR Command
1235 .sp
1236 .LP
1237 The command:
1238 
1239 .sp
1240 .in +2
1241 .nf
1242 example% \fBps -o user,pid,ppid=MOM -o args\fR
1243 .fi
1244 .in -2
1245 .sp
1246 
1247 .sp
1248 .LP
1249 writes the following in the POSIX locale:




  27 .\" The contents of this file are subject to the terms of the
  28 .\" Common Development and Distribution License (the "License").
  29 .\" You may not use this file except in compliance with the License.
  30 .\"
  31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  32 .\" or http://www.opensolaris.org/os/licensing.
  33 .\" See the License for the specific language governing permissions
  34 .\" and limitations under the License.
  35 .\"
  36 .\" When distributing Covered Code, include this CDDL HEADER in each
  37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38 .\" If applicable, add the following below this CDDL HEADER, with the
  39 .\" fields enclosed by brackets "[]" replaced with your own identifying
  40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41 .\"
  42 .\"
  43 .\" Copyright 1989 AT&T
  44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
  45 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
  46 .\" Copyright (c) 2013 Gary Mills
  47 .\" Copyright (c) 2018, Joyent, Inc.
  48 .\"
  49 .TH PS 1 "August 22, 2018"
  50 .SH NAME
  51 ps \- report process status
  52 .SH SYNOPSIS
  53 .LP
  54 .nf
  55 \fBps\fR [\fB-aAcdefjHlLPWyZ\fR] [\fB-g\fR \fIgrplist\fR] [\fB-h\fR \fIlgrplist\fR]
  56      [\fB-n\fR \fInamelist\fR] [\fB-o\fR \fIformat\fR]... [\fB-p\fR \fIproclist\fR]
  57      [\fB-s\fR \fIsidlist\fR] [\fB-t\fR \fIterm\fR] [\fB-u\fR \fIuidlist\fR] [\fB-U\fR \fIuidlist\fR]
  58      [\fB-G\fR \fIgidlist\fR] [\fB-z\fR \fIzonelist\fR]
  59 .fi
  60 
  61 .SH DESCRIPTION
  62 .LP
  63 The \fBps\fR command prints information about active processes. Without
  64 options, \fBps\fR prints information about processes that have the same
  65 effective user \fBID\fR and the same controlling terminal as the invoker. The
  66 output contains only the process \fBID\fR, terminal identifier, cumulative
  67 execution time, and the command name. Otherwise, the information that is
  68 displayed is controlled by the options.
  69 .sp


1032 .na
1033 \fB\fBopri\fR\fR
1034 .ad
1035 .RS 11n
1036 The obsolete priority of the process. Lower numbers mean higher priority.
1037 .RE
1038 
1039 .sp
1040 .ne 2
1041 .na
1042 \fB\fBlwp\fR\fR
1043 .ad
1044 .RS 11n
1045 The decimal value of the lwp \fBID\fR. Requesting this formatting option causes
1046 one line to be printed for each lwp in the process.
1047 .RE
1048 
1049 .sp
1050 .ne 2
1051 .na
1052 \fB\fBlwpname\fR\fR
1053 .ad
1054 .RS 11n
1055 The name of the lwp, if set. Requesting this formatting option causes
1056 one line to be printed for each lwp in the process.
1057 .RE
1058 
1059 .sp
1060 .ne 2
1061 .na
1062 \fB\fBnlwp\fR\fR
1063 .ad
1064 .RS 11n
1065 The number of lwps in the process.
1066 .RE
1067 
1068 .sp
1069 .ne 2
1070 .na
1071 \fB\fBpsr\fR\fR
1072 .ad
1073 .RS 11n
1074 The number of the processor to which the process or lwp is bound.
1075 .RE
1076 
1077 .sp
1078 .ne 2
1079 .na
1080 \fB\fBpset\fR\fR
1081 .ad


1166 .ne 2
1167 .na
1168 \fB\fBlgrp\fR\fR
1169 .ad
1170 .RS 11n
1171 The home lgroup of the process.
1172 .RE
1173 
1174 .sp
1175 .ne 2
1176 .na
1177 \fB\fBdmodel\fR\fR
1178 .ad
1179 .RS 11n
1180 The data model of the process, printed in the same manner as via
1181 \fBpflags\fR(1). The currently supported data models are _ILP32 and _LP64.
1182 .RE
1183 
1184 .sp
1185 .LP
1186 Only \fBcomm\fR, \fBlwpname\fR, and \fBargs\fR are allowed to contain blank
1187 characters; all others, including the Solaris implementation variables, are not.
1188 .sp
1189 .LP
1190 The following table specifies the default header to be used in the POSIX locale
1191 corresponding to each format specifier.
1192 .sp
1193 
1194 .sp
1195 .TS
1196 box;
1197 c c c c
1198 c c c c .
1199 Format  Default Format  Default
1200 Specifier       Header  Specifier       Header
1201 _
1202 args    COMMAND ppid    PPID
1203 comm    COMMAND rgroup  RGROUP
1204 etime   ELAPSED ruser   RUSER
1205 group   GROUP   time    TIME
1206 nice    NI      tty     TT
1207 pcpu    %CPU    user    USER


1214 The following table lists the Solaris implementation format specifiers and the
1215 default header used with each.
1216 .sp
1217 
1218 .sp
1219 .TS
1220 box;
1221 c c c c
1222 c c c c .
1223 Format  Default Format  Default
1224 Specifier       Header  Specifier       Header
1225 _
1226 addr    ADDR    projid  PROJID
1227 c       C       project PROJECT
1228 class   CLS     psr     PSR
1229 f       F       rgid    RGID
1230 fname   COMMAND rss     RSS
1231 gid     GID     ruid    RUID
1232 lgrp    LGRP    s       S
1233 lwp     LWP     sid     SID
1234 lwpname LWPNAME stime   STIME
1235 nlwp    NLWP    taskid  TASKID
1236 opri    PRI     uid     UID
1237 osz     SZ      wchan   WCHAN
1238 pmem    %MEM    zone    ZONE
1239 pri     PRI     zoneid  ZONEID
1240 ctid    CTID
1241 .TE
1242 
1243 .SH EXAMPLES
1244 .LP
1245 \fBExample 1 \fRUsing \fBps\fR Command
1246 .sp
1247 .LP
1248 The command:
1249 
1250 .sp
1251 .in +2
1252 .nf
1253 example% \fBps -o user,pid,ppid=MOM -o args\fR
1254 .fi
1255 .in -2
1256 .sp
1257 
1258 .sp
1259 .LP
1260 writes the following in the POSIX locale: