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>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1m/pbind.1m
          +++ new/usr/src/man/man1m/pbind.1m
   1    1  '\" te
        2 +.\"  Copyright 2015 Ryan Zezeski
   2    3  .\"  Copyright (c) 2008, Sun Microsystems, Inc.
   3    4  .\"  All Rights Reserved
   4    5  .\" 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.
   5    6  .\" 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.
   6    7  .\" 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]
   7    8  .TH PBIND 1M "Feb 25, 2008"
   8    9  .SH NAME
   9   10  pbind \- control and query bindings of processes or LWPs
  10   11  .SH SYNOPSIS
  11   12  .LP
  12   13  .nf
  13   14  \fBpbind\fR \fB-b\fR \fIprocessor_id\fR \fIpid\fR [\fI/lwpid\fR]...
  14   15  .fi
  15   16  
  16   17  .LP
  17   18  .nf
       19 +\fBpbind\fR \fB-e\fR \fIprocessor_id\fR \fIcmd\fR [\fIargs\fR...]
       20 +.fi
       21 +
       22 +.LP
       23 +.nf
  18   24  \fBpbind\fR [\fB-q\fR] [\fIpid\fR [\fI/lwpid\fR]]...
  19   25  .fi
  20   26  
  21   27  .LP
  22   28  .nf
  23   29  \fBpbind\fR \fB-Q\fR [\fIprocessor_id\fR]...
  24   30  .fi
  25   31  
  26   32  .LP
  27   33  .nf
  28   34  \fBpbind\fR \fB-u\fR \fIpid\fR [\fI/lwpid\fR]...
  29   35  .fi
  30   36  
  31   37  .LP
  32   38  .nf
  33   39  \fBpbind\fR \fB-U\fR [\fIprocessor_id\fR]...
  34   40  .fi
  35   41  
  36   42  .SH DESCRIPTION
  37      -.sp
  38   43  .LP
  39   44  \fBpbind\fR controls and queries bindings of processes and LWPs (lightweight
  40   45  processes) to processors. \fBpbind\fR can also remove processor bindings that
  41   46  were previously established.
  42   47  .sp
  43   48  .LP
  44   49  When an LWP is bound to a processor, it will be executed only by that processor
  45   50  except when the LWP requires a resource that is provided only by another
  46   51  processor. The binding is not exclusive, that is, the processor is free to
  47   52  execute other LWPs as well.
  48   53  .sp
  49   54  .LP
  50   55  Bindings are inherited, so new LWPs and processes created by a bound LWP will
  51   56  have the same binding. Binding an interactive shell to a processor, for
  52   57  example, binds all commands executed by the shell.
  53   58  .sp
  54   59  .LP
       60 +The \fIprocessor_id\fR must be present and on-line. Use the
       61 +\fBpsrinfo(1M)\fR command to determine which processors are
       62 +available.
       63 +.sp
       64 +.LP
  55   65  Superusers may bind or unbind any process or LWP, while other users can bind or
  56   66  unbind any process or LWP for which they have permission to signal, that is,
  57   67  any process that has the same effective user ID as the user.
  58   68  .SH OPTIONS
  59      -.sp
  60   69  .LP
  61   70  The following options are supported:
  62   71  .sp
  63   72  .ne 2
  64   73  .na
  65   74  \fB\fB-b\fR \fIprocessor_id\fR\fR
  66   75  .ad
  67   76  .sp .6
  68   77  .RS 4n
  69      -Binds all or a subset of the LWPs of the specified processes to the processor
  70      -\fIprocessor_id\fR. Specify \fIprocessor_id\fR as the processor \fBID\fR of the
  71      -processor to be controlled or queried. \fIprocessor_id\fR must be present and
  72      -on-line. Use the \fBpsrinfo\fR command to determine whether or not
  73      -\fIprocessor_id\fR is present and on-line. See \fBpsrinfo\fR(1M).
       78 +Binds all or a subset of the LWPs of the specified processes to
       79 +\fIprocessor_id\fR.
  74   80  .RE
  75   81  
  76   82  .sp
  77   83  .ne 2
  78   84  .na
       85 +\fB-e\fR \fIprocessor_id\fR
       86 +.ad
       87 +.sp .6
       88 +.RS 4n
       89 +Execute a command while bound to \fIprocessor_id\fR.
       90 +.RE
       91 +
       92 +.sp
       93 +.ne 2
       94 +.na
  79   95  \fB\fB-q\fR\fR
  80   96  .ad
  81   97  .sp .6
  82   98  .RS 4n
  83   99  Displays the bindings of the specified processes or of all processes. If a
  84  100  process is composed of multiple LWPs which have different bindings and the LWPs
  85  101  are not explicitly specified, the bindings of only one of the bound LWPs will
  86  102  be displayed. The bindings of a subset of LWPs can be displayed by appending
  87  103  "/lwpids" to the process \fBID\fRs. Multiple LWPs may be selected using "-" and
  88  104  "," delimiters. See EXAMPLES.
↓ open down ↓ 27 lines elided ↑ open up ↑
 116  132  .na
 117  133  \fB\fB-U\fR\fR
 118  134  .ad
 119  135  .sp .6
 120  136  .RS 4n
 121  137  Removes the bindings of all LWPs bound to the specified list of processors, or
 122  138  to any processor if no argument is specified.
 123  139  .RE
 124  140  
 125  141  .SH OPERANDS
 126      -.sp
 127  142  .LP
 128  143  The following operands are supported:
 129  144  .sp
 130  145  .ne 2
 131  146  .na
 132  147  \fB\fIpid\fR\fR
 133  148  .ad
 134  149  .sp .6
 135  150  .RS 4n
 136  151  The process \fBID\fR of the process to be controlled or queried.
↓ open down ↓ 22 lines elided ↑ open up ↑
 159  174  .sp
 160  175  .ne 2
 161  176  .na
 162  177  \fB\fIprocessor_id\fR\fR
 163  178  .ad
 164  179  .sp .6
 165  180  .RS 4n
 166  181  The processor \fBID\fR of the processor to be controlled or queried.
 167  182  .RE
 168  183  
      184 +.sp
      185 +.ne 2
      186 +.na
      187 +\fB\fIcmd\fR \fI[args...]\fR
      188 +.ad
      189 +.sp .6
      190 +.RS 4n
      191 +The command to execute along with optional arguments.
      192 +.RE
      193 +
 169  194  .SH EXAMPLES
 170  195  .LP
 171  196  \fBExample 1 \fRBinding Processes
 172  197  .sp
 173  198  .LP
 174  199  The following example binds processes 204 and 223 to processor 2:
 175  200  
 176  201  .sp
 177  202  .in +2
 178  203  .nf
↓ open down ↓ 63 lines elided ↑ open up ↑
 242  267  .sp
 243  268  .in +2
 244  269  .nf
 245  270  example% \fBpbind -Q 2\fR
 246  271  lwp id 149/4: 2
 247  272  lwp id 149/5: 2
 248  273  .fi
 249  274  .in -2
 250  275  .sp
 251  276  
 252      -.SH EXIT STATUS
      277 +.LP
      278 +\fBExample 6 \fRExecuting a bound command:
 253  279  .sp
 254  280  .LP
      281 +The following example executes ls while bound to processor 6:
      282 +
      283 +.sp
      284 +.in +2
      285 +.nf
      286 +example% \fBpbind -e 6 ls -la
      287 +.fi
      288 +.in -2
      289 +.sp
      290 +
      291 +.SH EXIT STATUS
      292 +.LP
 255  293  The following exit values are returned:
 256  294  .sp
 257  295  .ne 2
 258  296  .na
 259  297  \fB\fB0\fR\fR
 260  298  .ad
 261  299  .sp .6
 262  300  .RS 4n
 263  301  Successful completion.
 264  302  .RE
↓ open down ↓ 2 lines elided ↑ open up ↑
 267  305  .ne 2
 268  306  .na
 269  307  \fB\fB>0\fR\fR
 270  308  .ad
 271  309  .sp .6
 272  310  .RS 4n
 273  311  An error occurred.
 274  312  .RE
 275  313  
 276  314  .SH SEE ALSO
 277      -.sp
 278  315  .LP
 279  316  \fBpsradm\fR(1M), \fBpsrinfo\fR(1M), \fBpsrset\fR(1M), \fBprocessor_bind\fR(2),
 280  317  \fBprocessor_info\fR(2), \fBsysconf\fR(3C), \fBattributes\fR(5)
 281  318  .SH DIAGNOSTICS
 282      -.sp
 283  319  .ne 2
 284  320  .na
 285  321  \fB\fBpbind: cannot query pid 31: No such process\fR\fR
 286  322  .ad
 287  323  .sp .6
 288  324  .RS 4n
 289  325  The process specified did not exist or has exited.
 290  326  .RE
 291  327  
 292  328  .sp
↓ open down ↓ 9 lines elided ↑ open up ↑
 302  338  .sp
 303  339  .ne 2
 304  340  .na
 305  341  \fB\fBpbind: cannot bind pid 31: Invalid argument\fR\fR
 306  342  .ad
 307  343  .sp .6
 308  344  .RS 4n
 309  345  The specified processor is not on-line.
 310  346  .RE
 311  347  
      348 +.sp
      349 +.ne 2
      350 +.na
      351 +\fBpbind: failed to exec\fR \fIcmd\fR
      352 +.ad
      353 +.sp .6
      354 +.RS 4n
      355 +Could not resolve the \fIcmd\fR from \fBPATH\fR.
      356 +.RE
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX