| 1 |
This tool displays process and thread binding in an interative web page. |
| 2 |
|
| 3 |
|
| 4 |
1) Basic Usage |
| 5 |
|
| 6 |
Run the hwloc-ps tool in JSON server mode: |
| 7 |
|
| 8 |
$ hwloc-ps --json-server |
| 9 |
server running on port 8888... |
| 10 |
|
| 11 |
Export the topology as a SVG file using the native backend: |
| 12 |
|
| 13 |
$ lstopo filename.svg --of nativesvg |
| 14 |
|
| 15 |
Now run the client side for displaying the binding: |
| 16 |
|
| 17 |
$ cd /path/to/hwloc-ps.www/ |
| 18 |
$ node client.js /path/to/filename.svg |
| 19 |
|
| 20 |
This should open a webpage in your browser. |
| 21 |
Otherwise add -u to see the URL that you should open (usually http://localhost:3000). |
| 22 |
|
| 23 |
|
| 24 |
2) Installing node.js and JS dependencies |
| 25 |
|
| 26 |
The "node" command is available in the "nodejs" package in most Linux distributions, |
| 27 |
but you should rather install the "npm" package to get additional utilities: |
| 28 |
|
| 29 |
# apt instal npm |
| 30 |
# yum install npm |
| 31 |
|
| 32 |
Then install the dependencies needed by client.js: |
| 33 |
|
| 34 |
$ cd /path/to/hwloc-ps.www/ |
| 35 |
$ npm install |
| 36 |
|
| 37 |
If you don't have write-access to the hwloc-ps.www/ directory, |
| 38 |
copy it somewhere else, run "npm install" from there, |
| 39 |
and then run the client from there: |
| 40 |
|
| 41 |
$ cp -a /path/to/hwloc-ps.www/ $HOME/myhwloc-ps.www/ |
| 42 |
$ cd $HOME/myhwloc-ps.www/ |
| 43 |
$ npm install |
| 44 |
$ node client.js /path/to/filename.svg |
| 45 |
|
| 46 |
|
| 47 |
3) Running on a remote server |
| 48 |
|
| 49 |
This tool is often useful for debugging process placement on remote servers, hence: |
| 50 |
|
| 51 |
* hwloc-ps and lstopo should run on that remote server |
| 52 |
(this requires a recent hwloc on the remote side). |
| 53 |
|
| 54 |
* you must copy the SVG file back to your machine: |
| 55 |
|
| 56 |
$ scp target:/path/to/filename.svg . |
| 57 |
|
| 58 |
* if the target machine port 8888 is not directly accessible, you may |
| 59 |
have to forward its 8888 port: |
| 60 |
|
| 61 |
$ ssh target -L 8888:localhost:8888 -Nf |