Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com>
---
 Documentation/howto/dpdk.rst | 95 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index dc63f7d..26f702c 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -400,6 +400,101 @@ If ``N`` is set to 1, an insertion will be performed for 
every flow. If set to
 
 For more information on the EMC refer to :doc:`/intro/install/dpdk` .
 
+.. _keepalive:
+
+KeepAlive
+---------
+
+OvS KeepAlive(KA) feature is disabled by default. To enable KA feature::
+
+    'ovs-vsctl --no-wait set Open_vSwitch . other_config:keepalive=true'
+
+Default timer interval for monitoring packet processing cores is 100ms.
+To set a different timer value::
+
+    'ovs-vsctl --no-wait set Open_vSwitch . \
+        other_config:keepalive-interval="50"'
+
+The events comprise of core states and the last seen timestamps.The events
+are written in to shared memory region ``/dev/shm/dpdk_keepalive_shm_name``.
+To write in to a different shared memory region::
+
+    'ovs-vsctl --no-wait set Open_vSwitch . \
+        other_config:keepalive-shm-name="/<shared memory region>"'
+
+The events in the shared memory block can be read by external monitoring
+framework (or) applications. `collectd <https://collectd.org/>`__ has builtin
+support for DPDK and implements dpdkevents plugin that can be enabled to
+relay the datapath core status to OpenStack service `Ceilometer
+<https://docs.openstack.org/developer/ceilometer/>`__.
+
+To install and configure ``collectd``::
+
+    # Clone collectd from Git repository
+    $ git clone https://github.com/collectd/collectd.git
+
+    # configure and install collectd
+    $ ./build.sh
+    $ ./configure --enable-syslog --enable-logfile --with-libdpdk=/usr
+    $ make
+    $ make install
+
+collectd is defacto installed in /opt/collectd directory. Edit configuration
+file in ``/opt/collectd/etc/collectd.conf`` to enable logfile, dpdkevents
+and csv plugin.
+
+Enable ``logfile`` and ``syslog`` plugins and make sure the logs get
+redirected appropriately::
+
+   LoadPlugin logfile
+   <Plugin logfile>
+       LogLevel debug
+       File "/var/log/collectd/collectd.log"
+       Timestamp true
+       PrintSeverity false
+   </Plugin>
+
+   <Plugin syslog>
+       LogLevel info
+   </Plugin>
+
+Enable ``dpdkevents`` plugin and update the plugindetails as below::
+
+   LoadPlugin dpdkevents
+
+   <Plugin "dpdkevents">
+     <EAL>
+       Coremask "0x2"
+       MemoryChannels "4"
+       ProcessType "secondary"
+       FilePrefix "rte"
+     </EAL>
+     <Event "keep_alive">
+       SendEventsOnUpdate true
+       LCoreMask "0xf"
+       KeepAliveShmName "/dpdk_keepalive_shm_name"
+       SendNotification false
+      </Event>
+   </Plugin>
+
+``LCoreMask`` should be set to the PMD cores that were earlier registered
+for keepalive monitoring. ``KeepAliveShmName`` refers to shared memory block
+region.
+
+Enable ``csv`` plugin as below::
+
+   LoadPlugin csv
+
+   <Plugin csv>
+       DataDir "/var/log/collectd/csv"
+       StoreRates false
+   </Plugin>
+
+With csv plugin enabled, meter(gauge) file is created and timestamp and core
+status gets updated which are sent to ceilometer service. For example
+``../csv/localhost/dpdkevents-keepalive/gauge-lcore3-2017-04-01`` is the file
+for pmd thread running on core 3.
+
 .. _dpdk-ovs-in-guest:
 
 OVS with DPDK Inside VMs
-- 
2.4.11

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to