From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 90B0F1B101 for ; Mon, 4 Feb 2019 04:15:04 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x143F3pl023163; Mon, 4 Feb 2019 12:15:03 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 018CC638D76; Mon, 4 Feb 2019 12:15:03 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id E81E6638A69; Mon, 4 Feb 2019 12:15:02 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Mon, 4 Feb 2019 12:12:52 +0900 Message-Id: <1549249973-31741-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549249973-31741-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1549249973-31741-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/3] docs: add usage of pri launch command X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:15:05 -0000 From: Yasufumi Ogawa This update is to add how to launch secondary process with `pri; launch` command and how to find log file to `How to Use` section. Signed-off-by: Yasufumi Ogawa --- docs/guides/setup/howto_use.rst | 54 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/guides/setup/howto_use.rst b/docs/guides/setup/howto_use.rst index f8a33bc..4207abc 100644 --- a/docs/guides/setup/howto_use.rst +++ b/docs/guides/setup/howto_use.rst @@ -301,6 +301,58 @@ unique among all of secondaries. If you attempt to launch a secondary process with the same ID, it is failed. + +Launch from SPP CLI +~~~~~~~~~~~~~~~~~~~ + +You can launch SPP secondary processes from SPP CLI wihtout openning +other terminals. ``pri; launch`` command is for any of secondary processes +with specific options. It takes secondary type, ID and options of EAL +and application itself as similar to launching from terminal. +Here is an example of launching ``spp_nfv``. You notice that there is no +``--proc-type secondary`` which should be required for secondary. +It is added to the options by SPP CLI before launching the process. + +.. code-block:: none + + # launch spp_nfv with sec ID 2 + spp > pri; launch nfv 2 -l 1,2 -m 512 -- -n 2 -s 192.168.1.100:6666 + Send request to launch nfv:2. + +After running this command, you can find ``nfv:2`` is launched +successfully. + +.. code-block:: none + + spp > status + - spp-ctl: + - address: 192.168.1.100:7777 + - primary: + - status: running + - secondary: + - processes: + 1: nfv:2 + +Instead of displaying log messages in terminal, it outputs the messages +in a log file. All of log files of secondary processes launched with +``pri`` are located in ``log/`` directory under the project root. +The name of log file is found ``log/spp_nfv-2.log``. + +.. code-block:: console + + $ tail -f log/spp_nfv-2.log + SPP_NFV: Used lcores: 1 2 + SPP_NFV: entering main loop on lcore 2 + SPP_NFV: My ID 2 start handling message + SPP_NFV: [Press Ctrl-C to quit ...] + SPP_NFV: Creating socket... + SPP_NFV: Trying to connect ... socket 24 + SPP_NFV: Connected + SPP_NFV: Received string: _get_client_id + SPP_NFV: token 0 = _get_client_id + SPP_NFV: To Server: {"results":[{"result":"success"}],"client_id":2, ... + + Launch SPP on VM ~~~~~~~~~~~~~~~~ @@ -313,7 +365,7 @@ Before launching VM, you need to prepare a socket file for creating ``vhost-user`` device. Run ``add`` command with resource UID ``vhost:0`` to create socket file. -.. code-block:: console +.. code-block:: none spp > nfv 1; add vhost:0 -- 2.7.4