qemu-vmsr-helper.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ==================================
  2. QEMU virtual RAPL MSR helper
  3. ==================================
  4. Synopsis
  5. --------
  6. **qemu-vmsr-helper** [*OPTION*]
  7. Description
  8. -----------
  9. Implements the virtual RAPL MSR helper for QEMU.
  10. Accessing the RAPL (Running Average Power Limit) MSR enables the RAPL powercap
  11. driver to advertise and monitor the power consumption or accumulated energy
  12. consumption of different power domains, such as CPU packages, DRAM, and other
  13. components when available.
  14. However those registers are accessible under privileged access (CAP_SYS_RAWIO).
  15. QEMU can use an external helper to access those privileged registers.
  16. :program:`qemu-vmsr-helper` is that external helper; it creates a listener
  17. socket which will accept incoming connections for communication with QEMU.
  18. If you want to run VMs in a setup like this, this helper should be started as a
  19. system service, and you should read the QEMU manual section on "RAPL MSR
  20. support" to find out how to configure QEMU to connect to the socket created by
  21. :program:`qemu-vmsr-helper`.
  22. After connecting to the socket, :program:`qemu-vmsr-helper` can
  23. optionally drop root privileges, except for those capabilities that
  24. are needed for its operation.
  25. :program:`qemu-vmsr-helper` can also use the systemd socket activation
  26. protocol. In this case, the systemd socket unit should specify a
  27. Unix stream socket, like this::
  28. [Socket]
  29. ListenStream=/var/run/qemu-vmsr-helper.sock
  30. Options
  31. -------
  32. .. program:: qemu-vmsr-helper
  33. .. option:: -d, --daemon
  34. run in the background (and create a PID file)
  35. .. option:: -q, --quiet
  36. decrease verbosity
  37. .. option:: -v, --verbose
  38. increase verbosity
  39. .. option:: -f, --pidfile=PATH
  40. PID file when running as a daemon. By default the PID file
  41. is created in the system runtime state directory, for example
  42. :file:`/var/run/qemu-vmsr-helper.pid`.
  43. .. option:: -k, --socket=PATH
  44. path to the socket. By default the socket is created in
  45. the system runtime state directory, for example
  46. :file:`/var/run/qemu-vmsr-helper.sock`.
  47. .. option:: -T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE]
  48. .. include:: ../qemu-option-trace.rst.inc
  49. .. option:: -u, --user=USER
  50. user to drop privileges to
  51. .. option:: -g, --group=GROUP
  52. group to drop privileges to
  53. .. option:: -h, --help
  54. Display a help message and exit.
  55. .. option:: -V, --version
  56. Display version information and exit.