Available commands
All commands are executed by running omg <commandName> <parameter1> <parameter2> …
command in terminal.
omg dev list
Lists all compute devices created in ombori grid.
Can be used with -l
option, i.e. omg dev list -l
to enable “long output”, in this mode organisation, app name and environment are also printed.
omg dev modules <device>
Lists all modules enabled on a device, their connection status and version. If module version is about to be changed, two versions are displayed as well.
omg dev log <device> <module>
Prints logs to a specified module running on a device. The device must be online and edgeAgent module must be running.
TODO: print timestamps
TODO: specify log limit and offset
NOTE: Log streaming is currently unsupported by a MS IoT Edge runtime. To stream logs login to a device using omg dev shell
command, and run sudo docker logs -f <moduleName>
omg dev shell <device>
Opens an interactive shell to a remote device. Device must be online and GdmAgent must be running.
This command can also be used to forward remote tcp ports to a local computer:
omg dev shell -L localhost:1234 some-device
will connect to a remote device, and then forward port 1234 to some port on a calling machine.
omg dev shell -L 192.168.1.100:443 some-device
will connect to a remote device, and then forward port 443 (https) from host 192.168.1.100 in device’s local network to some port on a calling machine.
TODO: execute a specified command on a remote machine
omg dev invoke <device> <module> <method> [<payload>]
Invokes a method on a module running on a device and print the result. Device must be online and module must be running.
Method payload can be specified as a last command line parameter in JSON5 format:
omg dev invoke some-device GdmAgent someMethod '{hello: "world"}'
. Note the use of single quotes to let the program process the JSON correctly.
The payload can also be provided to standard input of omg
command. To do so, specify -
as a payload value in command line:
omg dev invoke some-device GdmAgent someMethod - < payload.json
will load payload from “payload.json” and call someMethod.