EasyManuals Logo

Digi IX10 User Manual

Digi IX10
996 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #615 background imageLoading...
Page #615 background image
Applications Develop Python applications
IX10 User Guide
615
Use digidevice.cli to execute CLI commands
Use the digidevice.cli Python module to issue CLI commands from Python to retrieve status and
statistical information about the device.
For example, to display the system status and statistics by using an interactive Python session, use
the show system command with the cli module:
1. Select a device in Remote Manager that is configured to allow shell access to the admin user,
and click Actions > Open Console. Alternatively, log into the IX10 local command line as a user
with shell access.
Depending on your device configuration, you may be presented with an Access selection
menu. Type shell to access the device shell.
2. At the shell prompt, use the python command with no parameters to enter an interactive
Python session:
# python
Python 3.10.1 (main, Mar 30 2023, 23:47:13) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
3. Import the cli submodule:
>>> from digidevice import cli
>>>
4. Execute a CLI command using the cli.execute(command) function. For example, to print the
system status and statistics to stdout using the show system command:
>>> response = cli.execute("show system")
>>>
>>> print (response)
Model : Digi IX10
Serial Number : IX10-000065
SKU : IX10
Hostname : IX10
MAC Address : DF:DD:E2:AE:21:18
Hardware Version : 50001947-01 1P
Firmware Version : 23.3.31.129
Alt. Firmware Version : 23.3.31.129
Alt. Firmware Build Date : Wed, May 3, 2023 21:24:00
Bootloader Version : 19.7.23.0-15f936e0ed
Current Time : Wed, May 3, 2023 21:24:00 +0000
CPU : 1.4%
Uptime : 6 days, 6 hours, 21 minutes, 57 seconds
(541317s)
Temperature : 40C
>>>
5. Use Ctrl-D to exit the Python session. You can also exit the session using exit() or quit().

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi IX10 and is the answer not in the manual?

Digi IX10 Specifications

General IconGeneral
BrandDigi
ModelIX10
CategoryNetwork Router
LanguageEnglish

Related product manuals