Applications should not use /tmp to store unix domain sockets.

Signed-off-by: Stephen Hemminger <[email protected]>
---
 doc/guides/sample_app_ug/vm_power_management.rst | 13 ++-----------
 examples/vm_power_manager/channel_manager.h      |  2 +-
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/doc/guides/sample_app_ug/vm_power_management.rst 
b/doc/guides/sample_app_ug/vm_power_management.rst
index 1955140bb3..eb9228f0eb 100644
--- a/doc/guides/sample_app_ug/vm_power_management.rst
+++ b/doc/guides/sample_app_ug/vm_power_management.rst
@@ -195,7 +195,7 @@ The XML structure is as follows:
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' 
function='0x0'/>
    </controller>
    <channel type='unix'>
-      <source mode='bind' path='/tmp/powermonitor/{vm_name}.{channel_num}'/>
+      <source mode='bind' 
path='/run/dpdk/powermonitor/{vm_name}.{channel_num}'/>
       <target type='virtio' 
name='virtio.serial.port.poweragent.{vm_channel_num}'/>
       <address type='virtio-serial' controller='0' bus='0' port='{N}'/>
    </channel>
@@ -208,18 +208,9 @@ channel. Likewise, the port value ``{N}`` must be 
incremented for each
 channel.
 
 On the host, for each channel to appear in the path, ensure the creation
-of the ``/tmp/powermonitor/`` directory and the assignment of ``qemu``
+of the ``/run/dpdk/powermonitor/`` directory and the assignment of ``qemu``
 permissions:
 
-.. code-block:: console
-
-   mkdir /tmp/powermonitor/
-   chown qemu:qemu /tmp/powermonitor
-
-Note that files and directories in ``/tmp`` are generally removed when
-rebooting the host and you may need to perform the previous steps after
-each reboot.
-
 The serial device as it appears on a VM is configured with the target
 element attribute name and must be in the form:
 ``virtio.serial.port.poweragent.{vm_channel_num}``, where
diff --git a/examples/vm_power_manager/channel_manager.h 
b/examples/vm_power_manager/channel_manager.h
index 6f70539815..5fc93ae0be 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -22,7 +22,7 @@ extern "C" {
 #define CHANNEL_MGR_DEFAULT_HV_PATH "qemu:///system"
 
 /* File socket directory */
-#define CHANNEL_MGR_SOCKET_PATH     "/tmp/powermonitor/"
+#define CHANNEL_MGR_SOCKET_PATH     "/run/dpdk/powermonitor/"
 
 /* FIFO file name template */
 #define CHANNEL_MGR_FIFO_PATTERN_NAME   "fifo"
-- 
2.51.0

Reply via email to