Print this page
6535 Add pbind -e
Reviewed by: Mohamed Khalfella <khalfella@gmail.com>
Reviewed by: Cody Mello <melloc@joyent.com>
Reviewed by: Albert Lee <trisk@omniti.com>

*** 1,6 **** --- 1,7 ---- '\" te + .\" Copyright 2015 Ryan Zezeski .\" Copyright (c) 2008, Sun Microsystems, Inc. .\" All Rights Reserved .\" 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]
*** 13,22 **** --- 14,28 ---- \fBpbind\fR \fB-b\fR \fIprocessor_id\fR \fIpid\fR [\fI/lwpid\fR]... .fi .LP .nf + \fBpbind\fR \fB-e\fR \fIprocessor_id\fR \fIcmd\fR [\fIargs\fR...] + .fi + + .LP + .nf \fBpbind\fR [\fB-q\fR] [\fIpid\fR [\fI/lwpid\fR]]... .fi .LP .nf
*** 32,42 **** .nf \fBpbind\fR \fB-U\fR [\fIprocessor_id\fR]... .fi .SH DESCRIPTION - .sp .LP \fBpbind\fR controls and queries bindings of processes and LWPs (lightweight processes) to processors. \fBpbind\fR can also remove processor bindings that were previously established. .sp --- 38,47 ----
*** 50,83 **** Bindings are inherited, so new LWPs and processes created by a bound LWP will have the same binding. Binding an interactive shell to a processor, for example, binds all commands executed by the shell. .sp .LP Superusers may bind or unbind any process or LWP, while other users can bind or unbind any process or LWP for which they have permission to signal, that is, any process that has the same effective user ID as the user. .SH OPTIONS - .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-b\fR \fIprocessor_id\fR\fR .ad .sp .6 .RS 4n ! Binds all or a subset of the LWPs of the specified processes to the processor ! \fIprocessor_id\fR. Specify \fIprocessor_id\fR as the processor \fBID\fR of the ! processor to be controlled or queried. \fIprocessor_id\fR must be present and ! on-line. Use the \fBpsrinfo\fR command to determine whether or not ! \fIprocessor_id\fR is present and on-line. See \fBpsrinfo\fR(1M). .RE .sp .ne 2 .na \fB\fB-q\fR\fR .ad .sp .6 .RS 4n Displays the bindings of the specified processes or of all processes. If a --- 55,99 ---- Bindings are inherited, so new LWPs and processes created by a bound LWP will have the same binding. Binding an interactive shell to a processor, for example, binds all commands executed by the shell. .sp .LP + The \fIprocessor_id\fR must be present and on-line. Use the + \fBpsrinfo(1M)\fR command to determine which processors are + available. + .sp + .LP Superusers may bind or unbind any process or LWP, while other users can bind or unbind any process or LWP for which they have permission to signal, that is, any process that has the same effective user ID as the user. .SH OPTIONS .LP The following options are supported: .sp .ne 2 .na \fB\fB-b\fR \fIprocessor_id\fR\fR .ad .sp .6 .RS 4n ! Binds all or a subset of the LWPs of the specified processes to ! \fIprocessor_id\fR. .RE .sp .ne 2 .na + \fB-e\fR \fIprocessor_id\fR + .ad + .sp .6 + .RS 4n + Execute a command while bound to \fIprocessor_id\fR. + .RE + + .sp + .ne 2 + .na \fB\fB-q\fR\fR .ad .sp .6 .RS 4n Displays the bindings of the specified processes or of all processes. If a
*** 121,131 **** Removes the bindings of all LWPs bound to the specified list of processors, or to any processor if no argument is specified. .RE .SH OPERANDS - .sp .LP The following operands are supported: .sp .ne 2 .na --- 137,146 ----
*** 164,173 **** --- 179,198 ---- .sp .6 .RS 4n The processor \fBID\fR of the processor to be controlled or queried. .RE + .sp + .ne 2 + .na + \fB\fIcmd\fR \fI[args...]\fR + .ad + .sp .6 + .RS 4n + The command to execute along with optional arguments. + .RE + .SH EXAMPLES .LP \fBExample 1 \fRBinding Processes .sp .LP
*** 247,259 **** lwp id 149/5: 2 .fi .in -2 .sp ! .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR\fR --- 272,297 ---- lwp id 149/5: 2 .fi .in -2 .sp ! .LP ! \fBExample 6 \fRExecuting a bound command: .sp .LP + The following example executes ls while bound to processor 6: + + .sp + .in +2 + .nf + example% \fBpbind -e 6 ls -la + .fi + .in -2 + .sp + + .SH EXIT STATUS + .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR\fR
*** 272,287 **** .RS 4n An error occurred. .RE .SH SEE ALSO - .sp .LP \fBpsradm\fR(1M), \fBpsrinfo\fR(1M), \fBpsrset\fR(1M), \fBprocessor_bind\fR(2), \fBprocessor_info\fR(2), \fBsysconf\fR(3C), \fBattributes\fR(5) .SH DIAGNOSTICS - .sp .ne 2 .na \fB\fBpbind: cannot query pid 31: No such process\fR\fR .ad .sp .6 --- 310,323 ----
*** 307,311 **** --- 343,356 ---- .sp .6 .RS 4n The specified processor is not on-line. .RE + .sp + .ne 2 + .na + \fBpbind: failed to exec\fR \fIcmd\fR + .ad + .sp .6 + .RS 4n + Could not resolve the \fIcmd\fR from \fBPATH\fR. + .RE