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>

@@ -7,10 +7,13 @@
 
 SYNOPSIS
        pbind -b processor_id pid [/lwpid]...
 
 
+       pbind -e processor_id cmd [args...]
+
+
        pbind [-q] [pid [/lwpid]]...
 
 
        pbind -Q [processor_id]...
 

@@ -36,26 +39,31 @@
        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.
 
 
+       The processor_id must be present and on-line. Use the psrinfo(1M)
+       command to determine which processors are available.
+
+
        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.
 
 OPTIONS
        The following options are supported:
 
        -b processor_id
-           Binds all or a subset of the LWPs of the specified processes to the
-           processor processor_id. Specify processor_id as the processor ID of
-           the processor to be controlled or queried. processor_id must be
-           present and on-line. Use the psrinfo command to determine whether
-           or not processor_id is present and on-line. See psrinfo(1M).
+           Binds all or a subset of the LWPs of the specified processes to
+           processor_id.
 
 
+       -e processor_id
+           Execute a command while bound to processor_id.
+
+
        -q
            Displays the bindings of the specified processes or of all
            processes. If a process is composed of multiple LWPs which have
            different bindings and the LWPs are not explicitly specified, the
            bindings of only one of the bound LWPs will be displayed. The

@@ -100,10 +108,14 @@
 
        processor_id
            The processor ID of the processor to be controlled or queried.
 
 
+       cmd [args...]
+           The command to execute along with optional arguments.
+
+
 EXAMPLES
        Example 1 Binding Processes
 
 
        The following example binds processes 204 and 223 to processor 2:

@@ -164,10 +176,20 @@
          lwp id 149/4: 2
          lwp id 149/5: 2
 
 
 
+       Example 6 Executing a bound command:
+
+
+       The following example executes ls while bound to processor 6:
+
+
+         example% pbind -e 6 ls -la
+
+
+
 EXIT STATUS
        The following exit values are returned:
 
        0
            Successful completion.

@@ -192,8 +214,11 @@
 
        pbind: cannot bind pid 31: Invalid argument
            The specified processor is not on-line.
 
 
+       pbind: failed to exec cmd
+           Could not resolve the cmd from PATH.
 
+
 
                                February 25, 2008                     PBIND(1M)