'\" 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 8 "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\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 .BR p_online (2), .BR processor_info (2), .BR attributes (7), .BR psradm (8) .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