README 1.6 KB

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