Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
www.mellanox.com Mellanox Technologies Confidential
Mellanox NEO-Host™
User Manual
Rev 1.0
Doc #: MLNX-15-52848 Mellanox Technologies Confidential 2
Mellanox Technologies
350 Oakmead Parkway Suite 100
Sunnyvale, CA 94085
U.S.A.
www.mellanox.com
Tel: (408) 970-3400
Fax: (408) 970-3403
© Copyright 2017. Mellanox Technologies Ltd. All Rights Reserved.
Mellanox®, Mellanox logo, Accelio®, BridgeX®, CloudX logo, CompustorX®, Connect-IB®, ConnectX®,
CoolBox®, CORE-Direct®, EZchip®, EZchip logo, EZappliance®, EZdesign®, EZdriver®, EZsystem®,
GPUDirect®, InfiniHost®, InfiniBridge®, InfiniScale®, Kotura®, Kotura logo, Mellanox CloudRack®, Mellanox
CloudXMellanox®, Mellanox Federal Systems®, Mellanox HostDirect®, Mellanox Multi-Host®, Mellanox Open
Ethernet®, Mellanox OpenCloud®, Mellanox OpenCloud Logo®, Mellanox PeerDirect®, Mellanox ScalableHPC®,
Mellanox StorageX®, Mellanox TuneX®, Mellanox Connect Accelerate Outperform logo, Mellanox Virtual Modular
Switch®, MetroDX®, MetroX®, MLNX-OS®, NP-1c®, NP-2®, NP-3®, Open Ethernet logo, PhyX®, PlatformX®,
PSIPHY®, SiPhy®, StoreX®, SwitchX®, Tilera®, Tilera logo, TestX®, TuneX®, The Generation of Open Ethernet
logo, UFM®, Unbreakable Link®, Virtual Protocol Interconnect®, Voltaire® and Voltaire logo are registered
trademarks of Mellanox Technologies, Ltd.
All other trademarks are property of their respective owners.
For the most updated list of Mellanox trademarks, visit http://www.mellanox.com/page/trademarks
NOTE:
THIS HARDWARE, SOFTWARE OR TEST SUITE PRODUCT (“PRODUCT(S)”) AND ITS RELATED
DOCUMENTATION ARE PROVIDED BY MELLANOX TECHNOLOGIES “AS-IS” WITH ALL FAULTS OF ANY
KIND AND SOLELY FOR THE PURPOSE OF AIDING THE CUSTOMER IN TESTING APPLICATIONS THAT
USE THE PRODUCTS IN DESIGNATED SOLUTIONS. THE CUSTOMER'S MANUFACTURING TEST
ENVIRONMENT HAS NOT MET THE STANDARDS SET BY MELLANOX TECHNOLOGIES TO FULLY
QUALIFY THE PRODUCT(S) AND/OR THE SYSTEM USING IT. THEREFORE, MELLANOX TECHNOLOGIES
CANNOT AND DOES NOT GUARANTEE OR WARRANT THAT THE PRODUCTS WILL OPERATE WITH THE
HIGHEST QUALITY. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL MELLANOX BE LIABLE TO CUSTOMER OR
ANY THIRD PARTIES FOR ANY DIRECT, INDIRECT, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES OF ANY KIND (INCLUDING, BUT NOT LIMITED TO, PAYMENT FOR PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY FROM THE USE OF THE
PRODUCT(S) AND RELATED DOCUMENTATION EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Rev 1.0 Mellanox Technologies Confidential 3
Table of Contents
Document Revision History .................................................................................................................. 4
About this Manual ................................................................................................................................. 5
1 Mellanox NEO-Host™ Overview .................................................................................................... 7
1.1 Package Contents .................................................................................................................. 7
2 Installation ....................................................................................................................................... 7
2.1 Supported Platforms and Operating Systems ........................................................................ 7
2.2 Installation Prerequisites ........................................................................................................ 7
2.3 Downloading Mellanox NEO-Host .......................................................................................... 8
2.4 Unpacking Mellanox NEO-Host .............................................................................................. 8
2.5 Installing Mellanox NEO-Host ................................................................................................. 8
2.5.1 Installation Options ................................................................................................... 8
2.5.2 Running the Installation Script .................................................................................. 8
2.5.3 Installation Results .................................................................................................... 8
2.6 Installing Mellanox NEO-Host GUI – On a Remote Windows Machine ................................. 8
2.7 Upgrading Mellanox NEO-Host ............................................................................................ 10
2.8 Uninstalling Mellanox NEO-Host .......................................................................................... 10
3 Running Mellanox NEO-Host Agent ............................................................................................ 11
3.1 Running NEO-Host Commands ........................................................................................... 11
3.1.1 NEO-Host Request Format ..................................................................................... 11
3.1.2 Running NEO-Host Agent Using Standard Input/Output ........................................ 11
3.1.3 Running NEO-Host Agent Using Socket Connection to Local Host ....................... 11
3.2 Mellanox NEO-Host Running Options .................................................................................. 12
4 Running Mellanox NEO-Host Using GUI..................................................................................... 13
4.1 Launching the GUI ................................................................................................................ 13
4.1.1 Local GUI Launch (Linux Only)............................................................................... 13
4.1.2 Remote GUI Launch ............................................................................................... 13
4.2 GUI Overview ....................................................................................................................... 15
4.2.1 Header Icons .......................................................................................................... 15
4.2.2 Navigation Tree ...................................................................................................... 15
4.2.3 Main View ............................................................................................................... 16
4.2.4 Log View ................................................................................................................. 26
5 Mellanox NEO-Host SDK .............................................................................................................. 28
5.1 NEO-Host SDK Commands List ........................................................................................... 28
5.2 NEO-Host SDK Basic Arguments ......................................................................................... 29
5.2.1 NEO-Host SDK Examples ...................................................................................... 29
5.3 NEO-Host Commands Help Menu ....................................................................................... 30
4 Mellanox Technologies Confidential Rev 1.0
Document Revision History
Table 1: Document Revision History
Revision Date Description
1.0 June 29, 2017 First release of this document.
Rev 1.0 Mellanox Technologies Confidential 5
About this Manual
This manual describes how to download, install and operate the Mellanox NEO-Host
application for managing Mellanox NICs in a single host either locally or remotely.
Audience
This User Manual is intended for cluster and data center administrators who are responsible
for the deployment, configuration, and day-to-day maintenance of Mellanox Devices.
Document Conventions
The following lists conventions used in this document.
NOTE: Identifies important information that contains helpful suggestions.
CAUTION: Alerts you to the risk of personal injury, system damage, or loss of data.
WARNING: Warns you that failure to take or avoid a specific action might result in
personal injury or a malfunction of the hardware or software. Be aware of the hazards
involved with electrical circuitry and be familiar with standard practices for preventing
accidents before you work on any equipment.
WARNING: Warns you that failure to take or avoid a specific action might result in
personal injury or a malfunction of the hardware or software. Be aware of the hazards
involved with electrical circuitry and be familiar with standard practices for preventing
accidents before you work on any equipment.
Common Abbreviations and Acronyms
Table 2: Common Abbreviations and Acronyms
Term Description
NIC Network Interface Card
API Application Program Interface
FW Firmware
JSON JavaScript Object Notation
6 Mellanox Technologies Confidential Rev 1.0
Related Documentation
For additional information, see the following documents:
Document Name Document Number
Mellanox NEO-Host Release Notes N/A
Mellanox NEO-Host Commands API MLNX-15-52847
Rev 1.0 Mellanox Technologies Confidential 7
1 Mellanox NEO-Host™ Overview
Mellanox NEO-Host is a powerful solution for orchestration and management of host
networking. NEO-Host allows data-center operators to configure, monitor, and operate high-
speed server Ethernet and InfiniBand network adapters. It simplifies deployment and
operations of data-center networking, provides deep visibility into host configuration, and
optimizes performance.
Mellanox NEO-Host runs on a Linux server. It can be operated using a CLI or GUI, either
locally or from a remote (Linux or Windows) machine using an SSH connection.
Mellanox NEO-Host offers a comprehensive set of JSON-based APIs. To allow easy
integration with ad-hoc management systems on top of the JSON commands, Mellanox
NEO-Host enables the use of an SDK to send commands via scripting languages.
Furthermore, NEO-Host can be integrated with the flagship Mellanox NEO™ platform by
deploying NEO-Host on Linux hosts managed by NEO.
1.1 Package Contents
The Mellanox NEO-Host package includes the following components:
NEO-Host Agent
NEO-Host GUI Application
NEO-Host SDK Package
2 Installation
2.1 Supported Platforms and Operating Systems
Mellanox NEO-Host can be installed a Linux machine with one of the following
architectures:
x86_64
PPC64
PPC64LE
For the list of supported operating system distributions and kernels, please refer to the
Mellanox NEO-Host Release Notes file.
2.2 Installation Prerequisites
Software Package Required Version
MLNX_OFED 1.5.0 or higher
Python 2.6, 2.7
8 Mellanox Technologies Confidential Rev 1.0
2.3 Downloading Mellanox NEO-Host
NEO-Host is available for download on MyMellanox.
1. Log into MyMellanox.
2. Go to Software Management Software Mellanox NEO-Host.
3. Click “Downloads”.
4. Download the software image.
2.4 Unpacking Mellanox NEO-Host
To install NEO-Host:
1. Copy the downloaded file to /tmp directory:
cp neohost-backend-<version>.tgz /tmp
2. Untar the downloaded file:
cd /tmp
tar xvzf neohost-backend-<version>.tgz
2.5 Installing Mellanox NEO-Host
2.5.1 Installation Options
Option Description
--without-sdk Do not install SDK
--without-gui Do not install GUI
2.5.2 Running the Installation Script
cd neohost-backend-<version>
./install-neohost.sh
2.5.3 Installation Results
Installed NEO-Host Agent
Installed Linux GUI Application
Installed SDK
2.6 Installing Mellanox NEO-Host GUI – On a Remote Windows Machine
On a Windows machine, install the GUI using the MSI file:
a. Download the MSI file.
b. Open the file and click “Run”.
Rev 1.0 Mellanox Technologies Confidential 9
c. Check the checkbox of the License Agreement and click “Install”.
d. Check “Launch NEO-Host” if you wish to launch the GUI after installation, and click
“Finish”.
Note that the installation process will create a quick-launch icon of NEO-Host GUI on the
desktop of the Windows machine:
10 Mellanox Technologies Confidential Rev 1.0
2.7 Upgrading Mellanox NEO-Host
Upgrading Mellanox NEO-Host is performed using the same steps of the installation
described above. There is no need to uninstall the previous version.
2.8 Uninstalling Mellanox NEO-Host
On a Linux machine, run the following command to uninstall NEO-Host:
/opt/neohost/backend/uninstall
On a Windows machine, perform the following to uninstall NEO-Host:
a. Go to Control Panel Programs Programs and Features
b. Right-click NEO-Host and select Uninstall.
Rev 1.0 Mellanox Technologies Confidential 11
3 Running Mellanox NEO-Host Agent
3.1 Running NEO-Host Commands
3.1.1 NEO-Host Request Format
{"apiVer": "v1", "execMode": 1 or 2, "id": <id num>, "module": <module
name>, "method":<method name>, "params":<method params>}
For further details, see NEO-Host Commands API document.
3.1.2 Running NEO-Host Agent Using Standard Input/Output
1. Run NEO-Host:
# neohost
2. Type the command in JSON format.
3. Click Enter.
The command result will be printed into the standard output.
NOTE: All NEO-Host requests must be entered in one line. Split requests will fail.
Example:
# neohost
{"apiVer": "v1", "execMode": 1, "id": 1, "module": "mftCore ",
"method":"GetSystemDevices", "params":null}
Output:
{"result": [{"uid": "0000:08:00.0", "name": "ConnectX5", "ports":
[{"physicalFunctions": [{"virtualFunctions": [], "uid": "0000:08:00.0",
"networkInterfaces": ["ens1f0"]}], "ibDevice": "mlx5_0", "number": 1, "uid":
"0000:08:00.0"}, {"physicalFunctions": [{"virtualFunctions": [], "uid":
"0000:08:00.1", "networkInterfaces": ["ens1f1"]}], "ibDevice": "mlx5_1",
"number": 2, "uid": "0000:08:00.1"}]}, {"uid": "0000:82:00.0", "name":
"ConnectX4", "ports": [{"physicalFunctions": [{"virtualFunctions": [],
"uid": "0000:82:00.0", "networkInterfaces": ["ens3f0"]}], "ibDevice":
"mlx5_2", "number": 1, "uid": "0000:82:00.0"}, {"physicalFunctions":
[{"virtualFunctions": [{"ibDevice": "mlx5_4", "uid": "0000:82:00.6",
"networkInterfaces": ["ens3f6"]}, {"ibDevice": "mlx5_5", "uid":
"0000:82:00.7", "networkInterfaces": ["ens3f7"]}, {"ibDevice": "mlx5_6",
"uid": "0000:82:01.0", "networkInterfaces": ["enp130s1"]}, {"ibDevice":
"mlx5_7", "uid": "0000:82:01.1", "networkInterfaces": ["enp130s1f1"]}],
"uid": "0000:82:00.1", "networkInterfaces": ["ens3f1"]}], "ibDevice":
"mlx5_3", "number": 2, "uid": "0000:82:00.1"}]}], "id": 1}
3.1.3 Running NEO-Host Agent Using Socket Connection to Local Host
1. Run NEO-Host with the port option.
neohost –s <port>
Example:
#neohost –s 5001
2. Connect to the socket using a TCP client such as telnet.
12 Mellanox Technologies Confidential Rev 1.0
telnet <host> <port>
3. In the TCP client window, type the command in JSON format.
4. Click Enter.
The command result will be printed into the TCP client window.
Example:
[root@apps-60 ~]# telnet 127.0.0.1 5001
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
{"apiVer": "v1", "execMode": 1, "id": 1, "module": "mftCore",
"method":"GetSystemDevices", "params":null}
Output:
{"result": [{"uid": "0000:08:00.0", "name": "ConnectX5", "ports":
[{"physicalFunctions": [{"virtualFunctions": [], "uid": "0000:08:00.0",
"networkInterfaces": ["ens1f0"]}], "ibDevice": "mlx5_0", "number": 1, "uid":
"0000:08:00.0"}, {"physicalFunctions": [{"virtualFunctions": [], "uid":
"0000:08:00.1", "networkInterfaces": ["ens1f1"]}], "ibDevice": "mlx5_1",
"number": 2, "uid": "0000:08:00.1"}]}, {"uid": "0000:82:00.0", "name":
"ConnectX4", "ports": [{"physicalFunctions": [{"virtualFunctions": [],
"uid": "0000:82:00.0", "networkInterfaces": ["ens3f0"]}], "ibDevice":
"mlx5_2", "number": 1, "uid": "0000:82:00.0"}, {"physicalFunctions":
[{"virtualFunctions": [{"ibDevice": "mlx5_4", "uid": "0000:82:00.6",
"networkInterfaces": ["ens3f6"]}, {"ibDevice": "mlx5_5", "uid":
"0000:82:00.7", "networkInterfaces": ["ens3f7"]}, {"ibDevice": "mlx5_6",
"uid": "0000:82:01.0", "networkInterfaces": ["enp130s1"]}, {"ibDevice":
"mlx5_7", "uid": "0000:82:01.1", "networkInterfaces": ["enp130s1f1"]}],
"uid": "0000:82:00.1", "networkInterfaces": ["ens3f1"]}], "ibDevice":
"mlx5_3", "number": 2, "uid": "0000:82:00.1"}]}], "id": 1}
3.2 Mellanox NEO-Host Running Options
Option Description
-h, --help Show this help message and exit
-p, --prompt Add prompt
-v, --version Show program's version number and exit
-s SOCKET, --socket=SOCKET Use tcp socket
-l LOG_LEVEL, --log-level=LOG_LEVEL Logging level
Rev 1.0 Mellanox Technologies Confidential 13
4 Running Mellanox NEO-Host Using GUI
NEO-Host GUI can be run locally or remotely.
4.1 Launching the GUI
4.1.1 Local GUI Launch (Linux Only)
When GUI is launched from the same host (Linux only) on which NEO-Host is installed, no
credentials are required.
Run the following command to launch the GUI:
# neo-host-gui
NOTE: Make sure to enable graphical applications via SSH.
4.1.2 Remote GUI Launch
To launch Mellanox NEO-Host GUI from a remote server, an SSH session needs to be
established with the server where NEO-Host Agent is installed. Once logged in, the GUI will
run NEO-Host Agent using socket 99.
4.1.2.1 Remote GUI Launch – Linux Machine
1. Install the NEO-Host package on the remote Linux machine – see section 2.4 above.
2. Run the following command to launch the GUI:
Note: A local GUI session will be established first.
neo-host-gui
3. Log out from the local session and establish a remote SSH session to the desired Agent
machine.
14 Mellanox Technologies Confidential Rev 1.0
4.1.2.2 Remote GUI Launch – Windows Machine
If you have successfully installed the GUI application (see section 2.6 above), double-click
the GUI launch icon on the desktop, and establish a remote SSH session to the desired
machine as instructed in section 4.1.2.1 above.
Rev 1.0 Mellanox Technologies Confidential 15
4.2 GUI Overview
NEO-Host GUI consists of five components – see Figure 1:
Header Icons
Navigation Tree
Main View
Additional Information window
Log View
Figure 1 - GUI Map
4.2.1 Header Icons
The table below lists the header icons and describes their functions.
Table 3: Header Icons
Icon Description
Used for refreshing the current view
Provides information about Mellanox NEO-Host and the version installed
System notifications
Shows the username and provides the option to log out from the GUI
4.2.2 Navigation Tree
The navigation tree, which appears on the left side of NEO-Host GUI, is the main navigation
pane of the application. The tree lists the host and its components in a descending order of
levels. Each level has its own available data and configuration:
Host
Device
Port
16 Mellanox Technologies Confidential Rev 1.0
Interface
4.2.3 Main View
Each level of the tree has a corresponding main view area centered at the heart of the GUI.
For each item in the tree, there are one or more available tabs which allow for performing
various actions on the item. In addition, some of the data available inside the tabs is further
explained in the “Additional Information” right-most window of the GUI
( ).
4.2.3.1 Host Level
4.2.3.1.1 General Tab
Provides server and performance information.
Rev 1.0 Mellanox Technologies Confidential 17
When clicking on any datum inside the General tab, a description of it will appear on the
right most window.
4.2.3.2 Device Level
4.2.3.2.1 General Tab
Provides device and firmware information.
18 Mellanox Technologies Confidential Rev 1.0
When clicking on any datum inside the General tab, a description of it will appear on the
right most window.
4.2.3.2.2 Configuration Tab
NOTE: Some configuration changes require FW reset, while others may require host
reboot.
Enables modifying the User Value of a diverse set of device configurations. These
configurations will remain stored on the device.
WARNING: These are advanced configurations that are intended for advanced users.
Malformed configurations may cause the card and/or host to malfunction.
Example:
Before setting the number of VFs in SR-IOV, make sure your system can support that
number of VFs. If your hardware and software cannot support that number, this may
cause your system to cease working.
Rev 1.0 Mellanox Technologies Confidential 19
Tab Navigation:
All configurations are listed in a table that provides the [configuration] Category,
Configuration [name], Current Value, Next Boot Value, and User Value of the
configuration. This table view can show 10/20/50/100 entries at once, based on the
number chosen from the left-most drop-down menu available above the table:
Description on each configuration is available under “Additional Information” right pane
upon clicking the configuration.
Configurations can be filtered for by categories using the Categories drop-down menu.
20 Mellanox Technologies Confidential Rev 1.0
Additional filtration of configurations/categories can be done using the Filter field
available above the table. This filtering will apply to the selected configuration category
(from the Categories drop down menu).
When modifying a configuration, the following icon will appear next to it indicating that
the User Value parameter has been changed .
Rev 1.0 Mellanox Technologies Confidential 21
When modifying the user value of the configurations visible in the current table page,
click “Apply” to apply the configurations. When modifying multiple configurations that
appear on more than one page of the table, click “Apply All” to apply all configurations
at once.
Configurations can be set to their default values when clicking “Reset All To Default”.
To revert to the initial user value, click the undo button available next to the Filter field
( ).
22 Mellanox Technologies Confidential Rev 1.0
4.2.3.2.3 Management Tab
Provides information about the currently installed firmware version, and enables users to
upgrade their FW version.
To upgrade the current FW version:
1. Click Browse to upload the new image.
NEO-Host will verify that:
The uploaded image matches the selected device
The new FW version is higher than the currently installed version
The verification result will appear under the Additional Information window.
Example:
2. Click “Burn Image”.
NOTE: The Force Burn checkbox is to be used in case the newly uploaded FW version
is equal or older than the currently installed version.
3. Click “Yes”.
Rev 1.0 Mellanox Technologies Confidential 23
Note that while the FW image burn is being processed, it can be canceled. Nevertheless,
it is recommended to re-upload the previous FW version instead of canceling the burn
process.
4. Click “Yes” to approve the device reset.
New FW version will replace the older one as the active firmware version:
24 Mellanox Technologies Confidential Rev 1.0
4.2.3.2.4 Diagnostics Tab
Generates and downloads three types of log files: Flash, System and Internal Registers. The
files can be downloaded either separately or simultaneously by checking the relevant
checkboxes.
4.2.3.2.5 Performance Tab
Enables running performance monitoring of hardware counters in the chip.
4.2.3.2.5.1 Live Monitoring
Through this tab, users can initiate a performance monitoring session, pause and resume it as
desired. The chip is composed of several units, which contain a number of performance
counters that can be monitored. Counters monitoring in this tab is displayed in a graphical
view. Counters are grouped in each graph by:
The chip’s units – each graph headline indicates the counters’ unit description (Memory
Operations Engine, PCIe Transport Unit, etc.)
Measurement units (Events/Cycles/Packets per second)
Note that counters can be filtered for using the checkboxes available at the bottom of each
graph. Unchecking a counter’s checkbox will remove it from the graph.
Rev 1.0 Mellanox Technologies Confidential 25
4.2.3.2.5.2 Utilization
Displays utilization ratio of each counter based on the calculation of the counter’s value
divided by a certain reference (such Total Packets, Device Clock, TX Packets, etc.).
When hovering over the ratio bar (on the right side), the following information is displayed:
Utilization percentage
Counter’s value
Measurement unit
Reference value
When hovering over the question mark ( ) available next to each counter, a description of
the counter will be displayed.
The Performance Impact of each counter is defined individually, which means that while
some counters are colored in green with the percentage of 30%, other counters may be
colored in red with the same percentage of 30%.
4.2.3.3 Port Level
4.2.3.3.1 General Tab
Provides port information.
26 Mellanox Technologies Confidential Rev 1.0
4.2.3.3.2 Configuration Tab
For information on this tab, refer to section 4.2.3.2.2 above.
4.2.3.4 Interface Level
4.2.3.4.1 General Tab
Provides interface information.
4.2.3.4.2 Configuration Tab
For information on this tab, refer to section 4.2.3.2.2 above.
4.2.4 Log View
The Log icon, available on the bottom left corner of NEO-Host GUI ( ), shows the
latest 50/100/200/500/1000/5000 records of NEO-Host log file (/var/log/neohost.log).
Rev 1.0 Mellanox Technologies Confidential 27
NOTE: The log records are not automatically refreshed. Refreshing is only done upon
user request by clicking the Refresh button available on the right side of the Log header
28 Mellanox Technologies Confidential Rev 1.0
5 Mellanox NEO-Host SDK
Mellanox NEO-Host SDK is a set of python scripts designed to facilitate the use of NEO-
Host APIs directly via command line, and provide a reference code for automation usage.
NEO-Host SDK scripts can be leveraged for integrations with 3rd party orchestration and
management platforms, as it simplifies programming based on the APIs. NEO-Host
addresses various use-cases, including adapter configuration management, monitoring,
diagnostics, etc.
5.1 NEO-Host SDK Commands List
get_application_file_data.py
get_application_file_meta_data.py
get_device_cr_dump.py
get_device_flash_dump.py
get_device_flash_info.py
get_device_fw_image_info.py
get_device_nv_config_meta_data.py
get_device_nv_config.py
get_device_reset_level.py
get_device_temperature.py
get_device_thermal_thresholds.py
get_device_up_time.py
get_interface_info.py
get_job_status.py
get_port_cable_info.py
get_port_info.py
get_system_devices.py
get_system_dump.py
get_system_information.py
set_device_fw_update.py
set_device_nv_config_default.py
set_device_nv_config.py
set_device_reset.py
NOTE: All SDK python scripts are located under /opt/neohost/sdk/
Rev 1.0 Mellanox Technologies Confidential 29
5.2 NEO-Host SDK Basic Arguments
There are two common arguments used for executing NEO-Host SDK commands:
1. --mode [shell, socket]
where:
shell Run NEO-Host with the standard input/output
socket Run NEO-Host with the TCP socket connection
2. --exec-mode [sync, a-sync]
where:
sync Run NEO-Host in a synchronous mode
socket Run NEO-Host in an asynchronous mode
5.2.1 NEO-Host SDK Examples
5.2.1.1 Standard Input/Output in Sync Mode
Run get_system_devices command in sync mode and standard input/output:
# python get_system_devices.py --exec-mode sync --mode shell
Output:
{"result": [{"uid": "0000:04:00.0", "name": "ConnectX4", "ports":
[{"physicalFunctions": [{"virtualFunctions": [], "uid": "0000:04:00.0",
"networkInterfaces": ["ib0"]}], "ibDevice": "mlx5_0", "number": 1, "uid":
"0000:04:00.0"}, {"physicalFunctions": [{"virtualFunctions": [], "uid":
"0000:04:00.1", "networkInterfaces": ["ib1"]}], "ibDevice": "mlx5_1",
"number": 2, "uid": "0000:04:00.1"}]}, {"uid": "0000:07:00.0", "name":
"ConnectX5", "ports": [{"physicalFunctions": [{"virtualFunctions": [],
"uid": "0000:07:00.0", "networkInterfaces": ["ib2"]}], "ibDevice": "mlx5_2",
"number": 1, "uid": "0000:07:00.0"}, {"physicalFunctions":
[{"virtualFunctions": [], "uid": "0000:07:00.1", "networkInterfaces":
["ib3"]}], "ibDevice": "mlx5_3", "number": 2, "uid": "0000:07:00.1"}]}],
"id": 231}
5.2.1.2 Standard Input/Output in A-Sync Mode
1. Run get_system_devices command in async mode and standard input/output:
# python get_system_devices.py --exec-mode a-sync --mode shel
Output:
{"result": {"jobToken":
"mftCore.GetSystemDevices.139971928770304.1498550367.221"}, "id": 517}
2. Run get_job_status for the returned jobToken:
#python get_job_status.py --exec-mode sync --mode shell --job-token-id
mftCore.GetSystemDevices.139971928770304.1498550367.221
Output:
{"result": [{"status": "Complete", "timestamp": "2017-06-27T07:59:27Z",
"result": [{"uid": "0000:04:00.0", "name": "ConnectX4", "ports":
[{"physicalFunctions": [{"virtualFunctions": [], "uid": "0000:04:00.0",
"networkInterfaces": ["ib0"]}], "ibDevice": "mlx5_0", "number": 1, "uid":
"0000:04:00.0"}, {"physicalFunctions": [{"virtualFunctions": [], "uid":
"0000:04:00.1", "networkInterfaces": ["ib1"]}], "ibDevice": "mlx5_1",
"number": 2, "uid": "0000:04:00.1"}]}, {"uid": "0000:07:00.0", "name":
30 Mellanox Technologies Confidential Rev 1.0
"ConnectX5", "ports": [{"physicalFunctions": [{"virtualFunctions": [],
"uid": "0000:07:00.0", "networkInterfaces": ["ib2"]}], "ibDevice":
"mlx5_2", "number": 1, "uid": "0000:07:00.0"}, {"physicalFunctions":
[{"virtualFunctions": [], "uid": "0000:07:00.1", "networkInterfaces":
["ib3"]}], "ibDevice": "mlx5_3", "number": 2, "uid": "0000:07:00.1"}]}],
"progress": 100, "extendedObj": null, "msgIdx": 2, "extendedStr":
"Operation complete."}], "id": 963}
5.2.1.3 Socket in Sync Mode
1. Run NEO-Host using run_neohost.py command with a given port:
# python run_neohost.py --port 100
Output:
PID 61785
Note: Save the PID value for stopping NEO-Host later.
2. Run the script in socket mode using the port number:
# python get_system_devices.py --mode socket --port 100 --exec-mode sync
Output:
{"result": [{"uid": "0000:04:00.0", "name": "ConnectX4", "ports":
[{"physicalFunctions": [{"virtualFunctions": [], "uid": "0000:04:00.0",
"networkInterfaces": ["ib0"]}], "ibDevice": "mlx5_0", "number": 1, "uid":
"0000:04:00.0"}, {"physicalFunctions": [{"virtualFunctions": [], "uid":
"0000:04:00.1", "networkInterfaces": ["ib1"]}], "ibDevice": "mlx5_1",
"number": 2, "uid": "0000:04:00.1"}]}, {"uid": "0000:07:00.0", "name":
"ConnectX5", "ports": [{"physicalFunctions": [{"virtualFunctions": [],
"uid": "0000:07:00.0", "networkInterfaces": ["ib2"]}], "ibDevice":
"mlx5_2", "number": 1, "uid": "0000:07:00.0"}, {"physicalFunctions":
[{"virtualFunctions": [], "uid": "0000:07:00.1", "networkInterfaces":
["ib3"]}], "ibDevice": "mlx5_3", "number": 2, "uid": "0000:07:00.1"}]}],
"id": 523}
3. To kill the background NEO-Host process, use the PID value that was obtained during the
initialization of NEO-Host:
# python run_neohost.py --kill --pid 61785
5.3 NEO-Host Commands Help Menu
To discover commands design and arguments, use the help menu by running:
python command_name --help
Example:
# python get_port_info.py --help
Output:
Usage: get_port_info.py [options]
Options:
-h, --help Show this help message and exit
--exec-mode=EXECMODE Execution mode for neohost [sync, a-sync]
--mode=RUNMODE Running mode for neohost Shell/Socket
--port=SOCKETPORT Running port for neohost socket
--DEBUG Running Sdk in DEBUG mode
--port-uid=PORTUID Port uid to get Information for.
--attr-mask=ATTRMASK Attr Mask Bit0 shows Description, Bit1 shows
Index. [Provide it as integer]