Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page is for EdgeView client side command descriptions. For information on EdgeView design and architecture, please see Design and Architecture, Graphical Workflow and FAQ.

To run EdgeView client script, the docker is required on user's laptop. The EdgeView client program is started in a script with 'docker run'. For an example of the client script, see EdgeView Client Script. The EdgeView commands are checked against EdgeView Policies to be allowed to run on devices.

...

The 'addhost' command adds one entry of specified hostname to IP address mapping into the EdgeView container's '/etc/hosts' for. This can be useful if there is no DNS entry exist for the hostname and the user knows the static mapping. An example:

...

...
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
32.165.49.119 zedcontrol.local.zededa.net

This '/etc/hosts' is in the EdgeView container, and not in EVE device's host and not in other EVE containers.

App

app[/app-string] - to display all the app or one specific app

...

[configitem cat cp datastore dmesg download du hw lastreboot ls model newlog pci ps cipher usb techsupport top volume]

...

On EVE devices, it needs to be configured with datastore(s) for image downloading. The EVE image datastore is by default configured. The application image datastore is dynamically configured on the EVE device depending on the applications.

...

Dmesg

download dmesg - display the download config and status during downloading operation and url stats since rebootdevice current dmesg information

The 'downloaddmesg' command displays (only if the device is currently downloading image(s)) the configuration for download, and the status of downloading or progress. It also displays the download statistics since the last reboot.

Du

du - display linux 'du' in disk usage of a directory

  e.g. du//persist/vault -- get the total disk usage of files under that directory

For example, the above 'du//persist/vault' has the output:

- Disk Usage: /persist/vault

203.24 (MBytes)

Hw

hw - display the hardware from lshw information in json format

The 'hw' command uses the utility 'lshw' and it does not take options. It displays the device hardware information in JSON format.

Lastreboot

lastreboot - display the last reboot reasons and stack if the information is saved

The 'lastreboot' command will display the content of '/persist/log/reboot-reason.log' if it exist, and '/persist/newlog/panicStacks' if saved.

Ls

ls/<path to filenames> - to display the file/directory information

  e.g. ls//config/device.cert.pem -- display the /config/device.cert.pem file info

       ls//config/"device*" -- display all the files with prefix 'device' in /config

The 'ls' command displays the files information in the directory. It can take a wildcard in the file's name string to match a subset of files in the directory. For example:

edgeview.sh ls//run/"zedagent*touch" 

- ls cmd: /run/zedagent*touch

is to display the system log in kernel memory. The log severity Error and above is printed in Red, and Warn is printed in Pink, and rest of them in normal text color.

E.g.:

edgeview.sh dmesg

[ 1.063566] sd 0:0:1:0: [sda] Attached SCSI disk

[ 1.064425] sd 0:0:1:0: Attached scsi generic sg0 type 0

[ 1.065545] Rounding down aligned max_sectors from 4294967295 to 4294967288

[ 1.066723] db_root: cannot open: /etc/target

[ 1.067668] tun: Universal TUN/TAP device driver, 1.6

[ 1.159820] VMware vmxnet3 virtual NIC driver - version 1.5.0.0-k-NAPI

[ 1.174923] i8042: Warning: Keylock active


Download

download - display the download config and status during downloading operation and url stats since reboot

The 'download' command displays (only if the device is currently downloading image(s)) the configuration for download, and the status of downloading or progress. It also displays the download statistics since the last reboot.

Du

du - display linux 'du' in disk usage of a directory

  e.g. du//persist/vault -- get the total disk usage of files under that directory

For example, the above 'du//persist/vault' has the output:

- Disk Usage: /persist/vault

203.24 (MBytes)

Hw

hw - display the hardware from lshw information in json format

The 'hw' command uses the utility 'lshw' and it does not take options. It displays the device hardware information in JSON format.

Lastreboot

lastreboot - display the last reboot reasons and stack if the information is saved

The 'lastreboot' command will display the content of '/persist/log/reboot-reason.log' if it exist, and '/persist/newlog/panicStacks' if saved.

Ls

ls/<path to filenames> - to display the file/directory information

  e.g. ls//config/device.cert.pem -- display the /config/device.cert.pem file info

       ls//config/"device*" -- display all the files with prefix 'device' in /config

The 'ls' command displays the files information in the directory. It can take a wildcard in the file's name string to match a subset of files in the directory. For example:

edgeview.sh ls//run/"zedagent*touch" 

- ls cmd: /run/zedagent*touch

-rw--rw-r--r--, 2022-08-12 20:58:43.587358564 +0000 UTC, 0, zedagent-localappinfo.touch

...

The 'pci' command runs the 'lspci' utility and displays all the PCI devices information.

...

PProf

    pprof/on|off - turn on/off pprof http debugging in pillar on port 6543

More information about pprof can be found here: https://github.com/google/pprof

The port can be forwarded to the local machine with the tcp command.

Ps

ps/<string> - display the process status information ps/<string> - display the process status information on matching string

  e.g. ps/containerd -- display the processes with name of containerd

...

The 'usb' command uses the 'lsusb' utility to display the device USB information.

Tar

 tar/<path to directory>  -  to generate a tarfile of the directory

  e.g. tar//persist/agentdebug  -- download the tarfile persist.agentdebug.<time>.tar of that directory

The 'tar' command generates a tar file from the directory on a remote device with the given path. It will deposit the tar file in the mounted directory on the user's laptop for downloading files. This command allows the directory with data up to 512 MBytes. Certain directories may have user sensitive data and can not be tarred, e.g. '/persist/vault', '/persist/clear' and '/run/domainmgr/cloudinit'. The files with file name ends with '.key.pem' and '.key' will not be included in the tar file.

Techsupport

For the details of 'techsupport' command, see section Tech-Support Command.

...