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
|
'\" te
.\" Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2019 Joyent, Inc.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PSRINFO 1M "Apr 25, 2019"
.SH NAME
psrinfo \- displays information about processors
.SH SYNOPSIS
.LP
.nf
\fBpsrinfo\fR [\fB-p\fR] [\fB-v\fR] [\fIprocessor_id\fR]...
.fi
.LP
.nf
\fBpsrinfo\fR \fB-t\fR [\fB-S state\fR | \fB-c\fR | \fB-p\fR]
.fi
.LP
.nf
\fBpsrinfo\fR \fB-r\fR [\fB<propname>\fR | \fBall\fR]
.fi
.SH DESCRIPTION
.LP
\fBpsrinfo\fR displays information about processors. Each physical socket may
contain multiple cores, which in turn can contain multiple virtual processors
(also referred to as CPUs). Each virtual processor is an entity
with its own \fBID\fR, capable of executing independent threads.
.sp
.LP
Without the \fIprocessor_id\fR operand, \fBpsrinfo\fR displays one line for each
configured processor, displaying whether it is on-line, non-interruptible
(designated by no-intr), spare, off-line, faulted, disabled, or powered off, and
when that status last changed. Use the processor_id operand to display
information about a specific processor. See \fBOPERANDS\fR.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 19n
When used with \fB-t\fR, report the total number of CPU cores.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 19n
Display the number of physical sockets in a system.
.sp
When combined with the \fB-v\fR option, reports additional information about
each physical socket.
.RE
.sp
.ne 2
.na
\fB\fB-r\fR \fIpropname\fR\fR
.ad
.RS 19n
Report CPU-specific properties that apply to the system as a whole. Supplying
"all" will list all such properties in \fBkey=value\fR format. Currently, the
only defined property is \fBsmt_enabled\fR, a boolean property indicating whether
simultaneous multi-threading (hyper-threading) is active or not.
.RE
.sp
.ne 2
.na
\fB\fB-S\fR \fIstate\fR\fR
.ad
.RS 19n
When used with \fB-t\fR, report the total number of CPUs in the given state.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR\fI processor_id\fR\fR
.ad
.RS 19n
Silent mode. Displays \fB1\fR if the specified processor is fully on-line,
or \fB0\fR otherwise.
.sp
Use silent mode when using \fBpsrinfo\fR in shell scripts.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 19n
Report totals. Without arguments, reports the total number of CPUs. This can be
combined with the \fB-p\fR, \fB-c\fR, or \fB-S\fR options to modify the total.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 19n
Verbose mode. Displays additional information about the specified processors,
including: processor type, floating point unit type and clock speed. If any of
this information cannot be determined, \fBpsrinfo\fR displays \fBunknown\fR.
.sp
When combined with the \fB-p\fR option, reports additional information about
each physical processor.
.RE
.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIprocessor_id\fR\fR
.ad
.RS 16n
The processor \fBID\fR of the processor about which information is to be
displayed.
.sp
Specify \fIprocessor_id\fR as an individual processor number (for example,
\fB3\fR), multiple processor numbers separated by spaces (for example, \fB1 2
3\fR), or a range of processor numbers (for example, \fB1-4\fR). It is also
possible to combine ranges and (individual or multiple) \fIprocessor_id\fRs
(for example, \fB1-3 5 7-8 9\fR).
.sp
This cannot be specified along with the \fB-r\fR or \fB-t\fR options.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRDisplaying Information About All Configured Processors in
Verbose Mode
.sp
.LP
The following example displays information about all configured processors in
verbose mode.
.sp
.in +2
.nf
\fBpsrinfo \fR\fB-v\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRDetermining If a Processor is On-line
.sp
.LP
The following example uses \fBpsrinfo\fR in a shell script to determine if a
processor is on-line.
.sp
.in +2
.nf
if [ "`psrinfo \fB-s\fR 3 2> /dev/null`" \(mieq 1 ]
then
echo "processor 3 is up"
fi
.fi
.in -2
.sp
.LP
\fBExample 3 \fRDisplaying Information About the Physical Sockets in the
System
.sp
.LP
Use the \fB-tp\fR options to report the number of sockets.
.sp
.in +2
.nf
> psrinfo -tp
2
.fi
.in -2
.sp
.sp
.LP
Without the \fB-t\fR option, \fB-p\fR also takes processor IDs:
.sp
.in +2
.nf
> psrinfo -p 0 28 # IDs 0 and 28 exist on the
1 # same socket
> psrinfo -p 0 1 # IDs 0 and 1 exist on different
2 # sockets
.fi
.in -2
.sp
.sp
.LP
In this example, virtual processors \fB0\fR and \fB28\fR exist on the same
socket. Virtual processors \fB0\fR and \fB1\fR do not. This is
specific to this example and is and not a general rule.
.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE
.SH SEE ALSO
.LP
\fBpsradm\fR(1M), \fBp_online\fR(2), \fBprocessor_info\fR(2),
\fBattributes\fR(5)
.SH DIAGNOSTICS
.ne 2
.na
\fB\fBpsrinfo:\fR \fBprocessor\fR \fB9:\fR \fBInvalid\fR \fBargument\fR\fR
.ad
.sp .6
.RS 4n
The specified processor does not exist.
.RE
|