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.man.txt
          +++ new/usr/src/man/man1m/pbind.1m.man.txt
↓ open down ↓ 1 lines elided ↑ open up ↑
   2    2  
   3    3  
   4    4  
   5    5  NAME
   6    6         pbind - control and query bindings of processes or LWPs
   7    7  
   8    8  SYNOPSIS
   9    9         pbind -b processor_id pid [/lwpid]...
  10   10  
  11   11  
       12 +       pbind -e processor_id cmd [args...]
       13 +
       14 +
  12   15         pbind [-q] [pid [/lwpid]]...
  13   16  
  14   17  
  15   18         pbind -Q [processor_id]...
  16   19  
  17   20  
  18   21         pbind -u pid [/lwpid]...
  19   22  
  20   23  
  21   24         pbind -U [processor_id]...
↓ open down ↓ 9 lines elided ↑ open up ↑
  31   34         processor except when the LWP requires a resource that is provided only
  32   35         by another processor. The binding is not exclusive, that is, the
  33   36         processor is free to execute other LWPs as well.
  34   37  
  35   38  
  36   39         Bindings are inherited, so new LWPs and processes created by a bound
  37   40         LWP will have the same binding. Binding an interactive shell to a
  38   41         processor, for example, binds all commands executed by the shell.
  39   42  
  40   43  
       44 +       The processor_id must be present and on-line. Use the psrinfo(1M)
       45 +       command to determine which processors are available.
       46 +
       47 +
  41   48         Superusers may bind or unbind any process or LWP, while other users can
  42   49         bind or unbind any process or LWP for which they have permission to
  43   50         signal, that is, any process that has the same effective user ID as the
  44   51         user.
  45   52  
  46   53  OPTIONS
  47   54         The following options are supported:
  48   55  
  49   56         -b processor_id
  50      -           Binds all or a subset of the LWPs of the specified processes to the
  51      -           processor processor_id. Specify processor_id as the processor ID of
  52      -           the processor to be controlled or queried. processor_id must be
  53      -           present and on-line. Use the psrinfo command to determine whether
  54      -           or not processor_id is present and on-line. See psrinfo(1M).
       57 +           Binds all or a subset of the LWPs of the specified processes to
       58 +           processor_id.
  55   59  
  56   60  
       61 +       -e processor_id
       62 +           Execute a command while bound to processor_id.
       63 +
       64 +
  57   65         -q
  58   66             Displays the bindings of the specified processes or of all
  59   67             processes. If a process is composed of multiple LWPs which have
  60   68             different bindings and the LWPs are not explicitly specified, the
  61   69             bindings of only one of the bound LWPs will be displayed. The
  62   70             bindings of a subset of LWPs can be displayed by appending
  63   71             "/lwpids" to the process IDs. Multiple LWPs may be selected using
  64   72             "-" and "," delimiters. See EXAMPLES.
  65   73  
  66   74  
↓ open down ↓ 28 lines elided ↑ open up ↑
  95  103               2,3,4-8       LWP IDs 2, 3, and 4 through 8
  96  104               -4            LWPs whose IDs are 4 or below
  97  105               4-            LWPs whose IDs are 4 or above
  98  106  
  99  107  
 100  108  
 101  109         processor_id
 102  110             The processor ID of the processor to be controlled or queried.
 103  111  
 104  112  
      113 +       cmd [args...]
      114 +           The command to execute along with optional arguments.
      115 +
      116 +
 105  117  EXAMPLES
 106  118         Example 1 Binding Processes
 107  119  
 108  120  
 109  121         The following example binds processes 204 and 223 to processor 2:
 110  122  
 111  123  
 112  124           example% pbind -b 2 204 223
 113  125           process id 204: was 2, now 2
 114  126           process id 223: was 3, now 2
↓ open down ↓ 44 lines elided ↑ open up ↑
 159  171  
 160  172         The following example queries all LWPs bound to processor 2:
 161  173  
 162  174  
 163  175           example% pbind -Q 2
 164  176           lwp id 149/4: 2
 165  177           lwp id 149/5: 2
 166  178  
 167  179  
 168  180  
      181 +       Example 6 Executing a bound command:
      182 +
      183 +
      184 +       The following example executes ls while bound to processor 6:
      185 +
      186 +
      187 +         example% pbind -e 6 ls -la
      188 +
      189 +
      190 +
 169  191  EXIT STATUS
 170  192         The following exit values are returned:
 171  193  
 172  194         0
 173  195             Successful completion.
 174  196  
 175  197  
 176  198         >0
 177  199             An error occurred.
 178  200  
↓ open down ↓ 8 lines elided ↑ open up ↑
 187  209  
 188  210  
 189  211         pbind: cannot bind pid 31: Not owner
 190  212             The user does not have permission to bind the process.
 191  213  
 192  214  
 193  215         pbind: cannot bind pid 31: Invalid argument
 194  216             The specified processor is not on-line.
 195  217  
 196  218  
      219 +       pbind: failed to exec cmd
      220 +           Could not resolve the cmd from PATH.
 197  221  
      222 +
 198  223  
 199  224                                 February 25, 2008                     PBIND(1M)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX