EasyManua.ls Logo

Digi IX20

Digi IX20
1188 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
Loading...
Applications Develop Python applications
IX20 User Guide
813
from digidevice import device_request
from digidevice import cli
import time
def handler(target, request):
return cli.execute("show system verbose")
def status_cb(error_code, error_description):
if error_code != 0:
print("error handling showSystem device request: %s" % error_
description)
device_request.register("showSystem", handler, status_callback = status_
cb)
# Do not let the process finish so that it handles device requests
while True:
time.sleep(10)
2. Upload the showsystem.py application to the /etc/config/scriptsdirectory on two or more Digi
devices. In this example, we will upload it to two devices, and use the same request in Remote
Manager to query both devices.
See Configure scriptsto run automatically for information about uploading Python
applicationsto your device. You can also create the script on the device by using the vi
command when logged in with shell access.
3. For both devices:
a. Configure the device to automatically run the showsystem.py application on reboot, and
to restart the application if it crashes. This can be done from either the WebUI or the
command line:
Web
i. Log into Digi Remote Manager, or log into the local Web UI asa user with full Admin
access rights.
ii. Access the device configuration:
Remote Manager:
i. Locate your device as described in Use Digi Remote Manager to view and manage
your device.
ii. Click the Device ID.
iii. Click Settings.
iv. Click to expand Config.
Local Web UI:
i. On the menu, click System. Under Configuration, click Device Configuration.

Table of Contents