table of contents
other versions
- wheezy 1.4.1-4
- jessie 1.10.0-3
- testing 1.11.5-1
- unstable 1.11.5-1
- experimental 1.11.7-1
HWLOC-BIND(1) | hwloc | HWLOC-BIND(1) |
NAME¶
hwloc-bind - Launch a command that is bound to specific processors and/or memory.SYNOPSIS¶
hwloc-bind [ options] <location1> [<location2> [...] ] [--] <command> ...OPTIONS¶
See below for a description of valid <location> formats.- --cpubind
- Use following arguments for CPU binding (default).
- --membind
- Use following arguments for memory binding. If --mempolicy is not also given, the default policy is bind.
- --mempolicy <policy>
- Change the memory binding policy. The available policies are default, firsttouch, bind, interleave replicate and nexttouch. This option is only meaningful when an actual binding is also given with --membind. If --membind is given without --mempolicy, the default policy is bind.
- --get
- Report the current bindings. When combined with --membind, report the memory binding instead of CPU binding.
- --get-last-cpu-location
- Report the last processors where the process ran. Note that the result may already be outdated when reported since the operating system may move the process to other processors at any time according to the binding. This option cannot be combined with --membind.
- --single
- Bind on a single CPU to prevent migration.
- --strict
- Require strict binding.
- --get
- Retrieve the current process binding
- --pid <pid>
- Operate on pid <pid>
- -p --physical
- take OS/physical indexes instead of logical indexes
- -l --logical
- take logical indexes instead of physical/OS indexes (default)
- --taskset
- Display CPU set strings in the format recognized by the taskset command-line program instead of hwloc-specific CPU set string format. This option has no impact on the format of input CPU set strings, both formats are always accepted.
- -v
- Verbose output.
- --version
- Report version and exit.
DESCRIPTION¶
hwloc-bind execs an executable (with optional command line arguments) that is bound to the specified location (or list of locations). Upon successful execution, hwloc-bind simply sets bindings and then execs the executable over itself. NOTE: It is highly recommended that you read the hwloc(7) overview page before reading this man page. Most of the concepts described in hwloc(7) directly apply to the hwloc-bind utility.EXAMPLES¶
hwloc-bind's operation is best described through several examples. More details about how locations are specified on the hwloc-bind command line are described in hwloc(7). To run the echo command on the first logical processor of the second socket:hwloc-bind socket:1.pu:0 -- echo hello
hwloc-bind socket:1.pu:0 echo hello
hwloc-bind socket:1.core:0 socket:0.core:1 echo hello
hwloc-bind node:1-2.socket:0:3 echo hello
hwloc-bind node:1-2.socket:0-2 echo hello
hwloc-bind --physical socket:1.core:2 echo hello
hwloc-bind socket:even.core:odd echo hello
hwloc-bind socket:0 ~socket:0.core:1 ~socket:0.core:4 echo hello
hwloc-bind all ~socket:0 echo hello
hwloc-bind os=eth0 echo hello
hwloc-bind pci=0000:01:02.0 echo hello
hwloc-bind --cpubind node:1 --membind node:0 echo hello
hwloc-bind node:1.socket:2 hwloc-bind --get
hwloc-bind 0x00004444,0x44000000 echo hello
hwloc-bind `hwloc-calc node:1.socket:2` echo hello
hwloc-bind --membind node:1 --mempolicy interleave -- hwloc-bind --get --membind
RETURN VALUE¶
Upon successful execution, hwloc-bind execs the command over itself. The return value is therefore whatever the return value of the command is. hwloc-bind will return nonzero if any kind of error occurs, such as (but not limited to): failure to parse the command line, failure to retrieve process bindings, or lack of a command to execute.SEE ALSO¶
hwloc(7), lstopo(1), hwloc-calc(1), hwloc-distrib(1)February 27, 2012 | 1.4.1 |