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.

...

It will display the access list for running ACL and also configured ACL of the EVE device. To see a subset on iptables, use the filter string. The filter string can be 'raw', 'filter', 'nat' or 'mangle'.

...

Addhost

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

  e.g. app -- display all apps in brief

       app/iot -- display a specific app, which app name has substring of iot in more detail

If the command is issued without the '/<app-string>', it will display all the user (or DomU) applications running on the device. For each application, it displays the App number, UUID, network bridge information, status in terms of boot time, CPU and memory, it also displays the VNC and App log settings.

if the '/<app-string>' is supplied in the command, it will display the specific user application with more detail information. The 'app-string>' is a subset of the App name string regardless of cases. For example, if the app name is 'cluster-k3s-2-agent1', one can use 'app/agent' to query. Besides the above information, it gets more networking information from the application. It will try to ping the App IP address to see if it is 'Up', it will get the DHCP info of the application, and iptable rules related to the application.

Connectivity

connectivity - display the port config list with index

This display can be used for troubleshooting network port issues when there is a configuration change. It displays the list of port configurations of the interfaces, and the current index in the list. When the EVE device can not connect to the controller, it will try to connect to the controller with a different port configuration on this list periodically.

Flow

flow[/<some pattern>] - display ip flow information in the kernel search pattern

  e.g. flow/sport=53 -- display all the ip flow matches source port of 53

       flow/10.1.0.2 -- display all the ip flow matches ip address of 10.1.0.2

The 'flow' command displays the content of the Linux Conntrack table. It contains the detailed network 5-tuple information for EVE device and user applications current network endpoints information. One can use filters to search for specific IP addresses or port numbers for display.

If

if[/intf-name] - display interface related information briefly

e.g. if/eth0 -- display interface eth0 related information

This command prints a brief device interface information. An interface name string can be entered as a filter. It also prints the proxy configuration if it exists.

Mdns

mdns[/intf-name][/service] - display zeroconf related information

  e.g. mdns/eth0 -- display mDNS for default service 'workstation' on interface 'eth0'

       mdns/bn1/https -- display mDNS for service 'https' on bridge 'bn1'

       mdns -- display mDNS for default service 'workstation' on all 'UP' interfaces

The mDNS is a multicast protocol for auto discovery of services. It will send queries over all the 'UP' interfaces on the device to discover the service being advertised. By default it sends out for 'workstation._tcp' service which is a well-known mDNS service supported.

The EVE 'local datastore' implementation for App is based on the mDNS to bind the domain name with '.local'. This 'mdns' command can be used to query on the bridge where the App is located and to see if it replies with the service for datastore image download.

Nslookup

nslookup[/<ip or name>] - display domain name and dns server information
  e.g. nslookup/www.amazon.com -- display DNS information on www.amazon.com
       nslookup/8.8.8.8 -- display DNS information on address 8.8.8.8

The 'nslookup' command is simply getting the DNS resolution result from the EVE device on site.

Ping

ping[/<ip or name>] - ping to 8.8.8.8 from all the UP interfaces or ping a specific address

  e.g. ping -- ping to 8.8.8.8 from each source IP address of the interfaces

       ping/192.168.1.1 -- ping the address of 192.168.1.1

The 'ping' command if without any option, it will try to ping '8.8.8.8' and the controller of the EVE device from each of the interfaces. It can take a domain name or IP address option to send out the ICMP packets. It can be used on internal IP addresses such as App interface IP address, or on external servers to see if the device can reach it.

Route

route - display all the ip rule and their ip table entries

The 'route' command displays the IP Rule tables in the Linux kernel and their IP routes. It also walks through all the 'UP' interfaces and displays their associated routes.

Showcerts

showcerts[/<url>][/proxy-addr:proxy-port] - display TLS connection certificates of server side
  e.g. showcerts/zedcloud.local.zededa.net -- display TLS certificates from the controller
       showcerts/zedcloud.local.zededa.net/10.10.1.128:3128 -- display controller TLS certificates through a proxy server

The 'showcerts' command displays remote server or peer TLS certificates. It can optionally take the server side URL and also the proxy setting for proxy IP address and port. If no option is given, the showcerts finds the controller URL in '/config/server' file for the URL part. If the management port has proxy configuration, the 'showcerts' uses the proxy IP and port when querying the controller site.

The output of the certificates only gets a few human readable items, such as 'Version', 'Serial Number', 'Signature Algorithem', 'Validity' and 'Subject'.

The fellow example displays the 'showcerts' without option:

edgeview.sh showcerts

=== Network: <peercerts> ===

...

host-name/host-IP - to add a host entry in EdgeView container's /etc/hosts file

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 for the hostname and the user knows the static mapping. An example:

edgeview.sh addhost/zedcontrol.local.zededa.net/32.165.49.119 

...
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

  e.g. app -- display all apps in brief

       app/iot -- display a specific app, which app name has substring of iot in more detail

If the command is issued without the '/<app-string>', it will display all the user (or DomU) applications running on the device. For each application, it displays the App number, UUID, network bridge information, status in terms of boot time, CPU and memory, it also displays the VNC and App log settings.

if the '/<app-string>' is supplied in the command, it will display the specific user application with more detail information. The 'app-string>' is a subset of the App name string regardless of cases. For example, if the app name is 'cluster-k3s-2-agent1', one can use 'app/agent' to query. Besides the above information, it gets more networking information from the application. It will try to ping the App IP address to see if it is 'Up', it will get the DHCP info of the application, and iptable rules related to the application.

Connectivity

connectivity - display the port config list with index

This display can be used for troubleshooting network port issues when there is a configuration change. It displays the list of port configurations of the interfaces, and the current index in the list. When the EVE device can not connect to the controller, it will try to connect to the controller with a different port configuration on this list periodically.

Flow

flow[/<some pattern>] - display ip flow information in the kernel search pattern

  e.g. flow/sport=53 -- display all the ip flow matches source port of 53

       flow/10.1.0.2 -- display all the ip flow matches ip address of 10.1.0.2

The 'flow' command displays the content of the Linux Conntrack table. It contains the detailed network 5-tuple information for EVE device and user applications current network endpoints information. One can use filters to search for specific IP addresses or port numbers for display.

If

if[/intf-name] - display interface related information briefly

e.g. if/eth0 -- display interface eth0 related information

This command prints a brief device interface information. An interface name string can be entered as a filter. It also prints the proxy configuration if it exists.

Mdns

mdns[/intf-name][/service] - display zeroconf related information

  e.g. mdns/eth0 -- display mDNS for default service 'workstation' on interface 'eth0'

       mdns/bn1/https -- display mDNS for service 'https' on bridge 'bn1'

       mdns -- display mDNS for default service 'workstation' on all 'UP' interfaces

The mDNS is a multicast protocol for auto discovery of services. It will send queries over all the 'UP' interfaces on the device to discover the service being advertised. By default it sends out for 'workstation._tcp' service which is a well-known mDNS service supported.

The EVE 'local datastore' implementation for App is based on the mDNS to bind the domain name with '.local'. This 'mdns' command can be used to query on the bridge where the App is located and to see if it replies with the service for datastore image download.

Nslookup

nslookup[/<ip or name>] - display domain name and dns server information
  e.g. nslookup/www.amazon.com -- display DNS information on www.amazon.com
       nslookup/8.8.8.8 -- display DNS information on address 8.8.8.8

The 'nslookup' command is simply getting the DNS resolution result from the EVE device on site.

Ping

ping[/<ip or name>] - ping to 8.8.8.8 from all the UP interfaces or ping a specific address

  e.g. ping -- ping to 8.8.8.8 from each source IP address of the interfaces

       ping/192.168.1.1 -- ping the address of 192.168.1.1


The 'ping' command if without any option, it will try to ping '8.8.8.8' and the controller of the EVE device from each of the interfaces. It can take a domain name or IP address option to send out the ICMP packets. It can be used on internal IP addresses such as App interface IP address, or on external servers to see if the device can reach it.

Route

route - display all the ip rule and their ip table entries

The 'route' command displays the IP Rule tables in the Linux kernel and their IP routes. It also walks through all the 'UP' interfaces and displays their associated routes.

Showcerts

showcerts[/<url>][/proxy-addr:proxy-port] - display TLS connection certificates of server side

e.g. showcerts/zedcloud.local.zededa.net -- display TLS certificates from the controller

showcerts/zedcloud.local.zededa.net/10.10.1.128:3128 -- display controller TLS certificates through a proxy server

The 'showcerts' command displays remote server or peer TLS certificates. It can optionally take the server side URL and also the proxy setting for proxy IP address and port. If no option is given, the showcerts finds the controller URL in '/config/server' file for the URL part. If the management port has proxy configuration, the 'showcerts' uses the proxy IP and port when querying the controller site.

The output of the certificates only gets a few human readable items, such as 'Version', 'Serial Number', 'Signature Algorithem', 'Validity' and 'Subject'.

The bellow example displays the 'showcerts' without option, the server url is 'zedcloud.local.zededa.net', and the proxy is '31.198.61.228:3128'. The certificates from the peer are belong to the server or the controller, not to the proxy server. This may help the toubleshooting to determine if the proxy is a passthrough or a MiTM type.

edgeview.sh showcerts

=== Network: <peercerts> ===


url: zedcloud.local.zededa.net/31.198.61.228:3128
(0) Certificate:

Data:

Version: 3

Serial Number:

503025477018159975346019544684339737623192390922

Signature Algorithem: SHA256-RSA

Issuer

...

:CN=Zededa Inc. Intermediat CA1,O=Zededa Inc.,ST=California,C=US

Socket

socket - display all the ipv4 listening socket ports and established ports

The 'socket' command displays all the listening TCP and UDP sockets in the Linux kernel and the server information. It also displays the currently established sockets 5-tuple information.

Speed

speed[/intf-name] - run speed test and report the download and upload speed

  e.g. speed/wlan0 -- run speed test on interface wlan0

The 'speed' command uses the 'speedtest' utility to measure the download and upload speed of the device. The outbound interface name can be supplied to run the speed test over that port. An example of the output:

Validity:

Not Before: 2022-04-11 18:19:37 +0000 UTC
Not After: 2023-04-21 18:19:37 +0000 UTC

Subject: CN=zedcloud.local.zededa.net,O=Zededa Inc.,L=San Jose,ST=California,C=US

(1) Certificate:

Data:

Version: 3
Serial Number:

4098

Signature Algorithem: SHA256-RSA

Issuer:CN=Zededa Inc. Root CA,O=Zededa Inc.,L=San Jose,ST=California,C=US,1.2.840.113549.1.9.1=#0c0f63657274407a65646564612e6e6574
Validity:

Not Before: 2017-03-20 19:19:54 +0000 UTC
Not After: 2027-03-18 19:19:54 +0000 UTC

Subject: CN=Zededa Inc. Intermediat CA1,O=Zededa Inc.,ST=California,C=US

Socket

socket - display all the ipv4 listening socket ports and established ports

The 'socket' command displays all the listening TCP and UDP sockets in the Linux kernel and the server information. It also displays the currently established sockets 5-tuple information.

Speed

speed[/intf-name] - run speed test and report the download and upload speed

  e.g. speed/wlan0 -- run speed test on interface wlan0

The 'speed' command uses the 'speedtest' utility to measure the download and upload speed of the device. The outbound interface name can be supplied to run the speed test over that port. An example of the output:

Hosted by XenSpec (Fremont, CA) [45.56 km]: 5.258 ms
Testing download speed........Hosted by XenSpec (Fremont, CA) [45.56 km]: 5.258 ms
Testing download speed..................................................................................................
Download: 700.19 Mbit/s
Testing upload speed......................................................................................................
Upload: 773.80 Mbit/s

...

[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

-rw-r--r--, 2022-08-12 20:58:43.587358564 +0000 UTC, 0, zedagent-localappinfo.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-r--r--, 2022-08-12 20:58:5843.231320286 587358564 +0000 UTC, 0, zedagent-localdevinfolocalappinfo.touch

-rw-r--r--, 2022-08-12 20:58:58.228712666 231320286 +0000 UTC, 0, zedagent-locationlocaldevinfo.touch

-rw-r--r--, 2022-08-12 20:58:5358.320588547 228712666 +0000 UTC, 0, zedagent-location.touch

-rw-r--r--, 2022-08-12 20:58:5853.228707899 320588547 +0000 UTC, 0, zedagentattestzedagent.touch

-rw-r--r--, 2022-08-12 20:58:58.232764804 228707899 +0000 UTC, 0, zedagentccertszedagentattest.touch

-rw-r--r--, 2022-08-12 20:58:58.219222416 232764804 +0000 UTC, 0, zedagentconfigzedagentccerts.touch

-rw-r--r--, 2022-08-12 20:58:58.219222416 +0000 UTC, 0, zedagentconfig.touch

-rw-r--r--, 2022-08-12 20:58:58.204337241 +0000 UTC, 0, zedagentdevinfo.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 on matching string

...

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

Techsupport

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

Top

top - display linux 'top' in one batch

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.

Top

top - display linux 'top' in one batch

  e.g. top -line 20 -- display the first 20 lines of linux 'top' output

The 'top' command uses the Linux 'top' utility and displays the process information in an ordered way. The user can use the '-line <num>' option to only display the top number of lines from the output.

Volume

volume - display the app volume and content tree information for each app

The 'volume' command displays application volume information on the device. It has volume configuration and content tree information. For example, a container on the device:

- App fledge-app
  volume config, ID: 3a14546a-fdc5-491e-b992-5aec38181493
    name: fledge-app_0_m_0, ID 3a14546a-fdc5-491e-b992-5aec38181493, RefCount: 1

  content tree config: d371045d-3778-4fd7-ad64-3942ebc027fa
    url: brycedianomic/fledge_osdu, format: CONTAINER, sha:
    size: 0, name: dianomic-fledge

Log Search Commands

The 'log' command is used to search for log entries for the device and applications. Even though the logs are normally uploaded to the controller side, the users of the enterprise may not have the capability to search in the cloud. The application logs depending on the setting, it can be configured not to upload, then the only way to view them is through this 'log search' in EdgeView if needed.

log/<search string> [-time <start>-<end>] [-json] [-type <app|dev>] - display log with search-string, default is now to 30 mins ago

  e.g. log/panic -time 0.2-2.5 -- display log contains 'panic', from 0.2 to 0.5 hours ago

log/Clock -type app -- display previous 30 minutes log contains 'Clock' in app log

log/certificate -time 2021-08-15T23:15:29Z-2021-08-15T22:45:00Z -json -- display log during the specified time in RFC3339 format which contains 'certificate' in json format

log/copy-logfiles -time 2022-02-15T22:25:00Z-2022-02-15T22:40:00Z -- 'copy-logfiles' is reserved usage, to download all logfiles in the specified time duration, maximum time frame is 30 minutes

The 'log' command can take a number of options besides the <search string>. If none is specified, then the search duration is from now back to 30 minutes ago for all types of logs (device log and app log).

Log Search with specified time range

The 'log/<string> -time <range>' can be used to define the search of log in a particular time. The '-time' format can be either a floating point numbers range, or in RFC-3339 type.

The floating point number si represented in hour units. For example, 'log/container -time 0.1-0.3' will search all the logs from 0.1 hour to 0.3 hour ago for any string that matches 'container'. The RFC-3339 format can be used for any time range before, for example: 'log/container -time 2022-08-15T01:35:56Z-2022-08-15T02:00:00Z' for log search in that UTC time range. The starting and ending time is limited to a maximum of 5 hours.

Log Search with type

The type option can be 'dev', 'app' or 'all'. The default is 'all'.

Log display in JSON format

By default, the 'log/<search string>' output only displays a subset of key items, not the whole entry. To see the complete log entry, add the '-json' option.

Log file upload to user's laptop

Another way to study the log entries from the EVE device is to upload the log files onto the user's laptop. Since the user may not know what to search and wants to save the complete log entries during the time frame for more careful examination now or later. Because there is no search string needed, EdgeView reserves the string 'copy-logfiles' for this purpose. The command 'log/copy-logfiles' is used to upload log entries onto the user's laptop. The time range format is the same as log searches described above, except that the maximum range is 30 minutes.

The files will be uploaded onto the user's EdgeView container directory '/download', and when using the 'docker run' for EdgeView, it needs to mount the volume from your local directory onto the docker's '/download'.

For example, if the user wants to upload all the log entries from now back to 30 minutes ago (default time range):

edgeview.sh log/copy-logfiles

file: name logfiles-20220815221401.tar, size 71680
=================================================

log files saved at /download/logfiles-20220815221401

file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660599913706.gz, size 1707
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600218779.gz, size 2003
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600528842.gz, size 1714
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600833916.gz, size 1707
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660601143977.gz, size 2148
file:

...

The 'top' command uses the Linux 'top' utility and displays the process information in an ordered way. The user can use the '-line <num>' option to only display the top number of lines from the output.

Volume

volume - display the app volume and content tree information for each app

The 'volume' command displays application volume information on the device. It has volume configuration and content tree information. For example, a container on the device:

- App fledge-app
  volume config, ID: 3a14546a-fdc5-491e-b992-5aec38181493
    name: fledge-app_0_m_0, ID 3a14546a-fdc5-491e-b992-5aec38181493, RefCount: 1

  content tree config: d371045d-3778-4fd7-ad64-3942ebc027fa
    url: brycedianomic/fledge_osdu, format: CONTAINER, sha:
    size: 0, name: dianomic-fledge

Log Search Commands

The 'log' command is used to search for log entries for the device and applications. Even though the logs are normally uploaded to the controller side, the users of the enterprise may not have the capability to search in the cloud. The application logs depending on the setting, it can be configured not to upload, then the only way to view them is through this 'log search' in EdgeView if needed.

log/<search string> [-time <start>-<end>] [-json] [-type <app|dev>] - display log with search-string, default is now to 30 mins ago

  e.g. log/panic -time 0.2-2.5 -- display log contains 'panic', from 0.2 to 0.5 hours ago

log/Clock -type app -- display previous 30 minutes log contains 'Clock' in app log

log/certificate -time 2021-08-15T23:15:29Z-2021-08-15T22:45:00Z -json -- display log during the specified time in RFC3339 format which contains 'certificate' in json format

log/copy-logfiles -time 2022-02-15T22:25:00Z-2022-02-15T22:40:00Z -- 'copy-logfiles' is reserved usage, to download all logfiles in the specified time duration, maximum time frame is 30 minutes

The 'log' command can take a number of options besides the <search string>. If none is specified, then the search duration is from now back to 30 minutes ago for all types of logs (device log and app log).

Log Search with specified time range

The 'log/<string> -time <range>' can be used to define the search of log in a particular time. The '-time' format can be either a floating point numbers range, or in RFC-3339 type.

The floating point number si represented in hour units. For example, 'log/container -time 0.1-0.3' will search all the logs from 0.1 hour to 0.3 hour ago for any string that matches 'container'. The RFC-3339 format can be used for any time range before, for example: 'log/container -time 2022-08-15T01:35:56Z-2022-08-15T02:00:00Z' for log search in that UTC time range. The starting and ending time is limited to a maximum of 5 hours.

Log Search with type

The type option can be 'dev', 'app' or 'all'. The default is 'all'.

Log display in JSON format

By default, the 'log/<search string>' output only displays a subset of key items, not the whole entry. To see the complete log entry, add the '-json' option.

Log file upload to user's laptop

Another way to study the log entries from the EVE device is to upload the log files onto the user's laptop. Since the user may not know what to search and wants to save the complete log entries during the time frame for more careful examination now or later. Because there is no search string needed, EdgeView reserves the string 'copy-logfiles' for this purpose. The command 'log/copy-logfiles' is used to upload log entries onto the user's laptop. The time range format is the same as log searches described above, except that the maximum range is 30 minutes.

The files will be uploaded onto the user's EdgeView container directory '/download', and when using the 'docker run' for EdgeView, it needs to mount the volume from your local directory onto the docker's '/download'.

For example, if the user wants to upload all the log entries from now back to 30 minutes ago (default time range):

edgeview.sh log/copy-logfiles

file: name logfiles-20220815221401.tar, size 71680
=================================================

log files saved at /download/logfiles-20220815221401

file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660599913706.gz, size 1707
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600218779.gz, size 2003
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600528842.gz, size 1714
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660600833916.gz, size 1707
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660601143977.gz, size 2148
file: app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.1660601449037.gz, size 1702
file: dev.log.1660600023724.gz, size 8317
file: dev.log.1660600328787.gz, size 8334
file: dev.log.1660600633854.gz, size 7886
file: dev.log.1660600938925.gz, size 8290
file: dev.log.1660601243989.gz, size 8282
file: dev.log.1660601549052.gz, size 8554

uncompressed into /download/logfiles-20220815221401/ app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.txtuncompressed into /download/logfiles-20220815221401/.1660601449037.gz, size 1702
file: dev.log.txt1660600023724.gz, size 8317
file: dev.log.1660600328787.gz, size 8334
file: dev.log.1660600633854.gz, size 7886
file: dev.log.1660600938925.gz, size 8290
file: dev.log.1660601243989.gz, size 8282
file: dev.log.1660601549052.gz, size 8554

uncompressed into /download/logfiles-20220815221401/app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.txt

uncompressed into /download/logfiles-20220815221401/dev.log.txt

In this example, since the user does not use time option, by default it is now to 30 minutes before. In this example, since the user does not use time option, by default it is now to 30 minutes before. It creates a directory under the '/download' with the timestamp of current time in 'yyyymmddhhmmss' format. there are 6 device log gzip files, and 6 app files (belong to the same app). It is then decompressed to the gzip files and merged into text files with JSON format for each log entry inside. There will only be one device log file, there can be zero or more application log files with the app UUID in the filename. The text log files keep the strict time order of the log entries from the earliest to the latest.

...

The usage is the same as a normal EdgeView proxy, with the browser pointing to an URL which has the server's domain name, and directing the proxy service to 'localhost:9001' in this case.

Copy Files Command

HTTPs with Static Hostname Mapping

If there is no local/private DNS server available, or the user does not know about it, but the user knows the domain name and the IP address of the server offering the HTTPs service, a static hostname mapping entry can be added to the '/etc/hosts' of the EdgeView container. (similar to docker's '--add-host' option) See the command 'Addhost' above.

Copy Files Command

cp/cp/<path> - copy file from the device to locally mounted directory by specify the path

...

file saved at /download/techsupport-20220816202445.gz

User can view the file (this file uncompressed to 569349 bytes in size):

% ls -l /tmp/download/techsupport-20220816202445.gz

-rw-r--r-- 1 <username> wheel 82317 Aug 16 13:25 /tmp/download/techsupport-20220816202445.gz

View the file content (it starts with the above network 'route' command):

zcat < /tmp/download/techsupport-20220816202445.gz | head -50

- Show Tech-Support -

20220816202445.gz

User can view the file (this file uncompressed to 569349 bytes in size):

% ls -l /tmp/download/techsupport-20220816202445.gz

-rw-r--r-- 1 <username> wheel 82317 Aug 16 13:25 /tmp/download/techsupport-20220816202445.gz

View the file content (it starts with the above network 'route' command):

zcat < /tmp/download/techsupport-20220816202445.gz | head -50

- Show Tech-Support -


Device IPs: [192.168.86.36]; Endpoint IP 167.12.91.124:40839
UUID: 07ab2c40-408a-4bc2-b9f2-8ca94235074f
Controller: zedcloud.local.zededa.net
EVE-OS release 0.0.0-master-ca6084b9-2022-08-16.20.07-kvm-amd64, IMGA
Edge-View Ver: 0.8.2, JWT expires at 2022-08-23T01:35:56Z
2022-08-16T20:24:45Z(UTC), uptime 474 (sec) = 0 days


- network info -

=== Network: <route> ===


- ip rule:

1000: table 510, ip rule 1000: from all to all table 510

routes in table: 510
{Ifindex: 10 Dst: <nil> Src: <nil> Gw: <nil> Flags: [] Table: 510 Realm: 0}

...

Show TechSupport before Device Onboarding

When a device has problems with onboarding to the controller, it sometimes requires experienced engineers to troubleshoot the issues. The EdgeView access can not be used since the device has not onboarded yet and EdgeView session can not be enabled on the device.

It will help the troubleshooting if the 'techsupport' file of the current device status can be obtained, and the compressed 'techsupport' file can be copied onto a USB disk. This will help without the engineers to be physically on the console of the device.

Assume someone has the console access to the EVE device, go to the directory of '/run/edgeview', do a 'touch run-techsupport' there. Wait for about 60 seconds, there will be a compressed 'techsupport' file generated in the '/run/edgeview' directory. Here is an example:

07ab2c40-408a-4bc2-b9f2-8ca94235074f:~# cd /run/edgeview/
Device IPs: [192.168.86.36]; Endpoint IP 167.12.91.124:40839
UUID: 07ab2c40-408a-4bc2-b9f2-8ca94235074f
Controller: zedcloud.local.zededa.net
EVE-OS release 0.0.0-master-ca6084b9-2022-08-16.20.07-kvm-amd64, IMGA
Edge-View Ver: 0.8.2, JWT expires at 2022-08-23T01:35:56Z
2022-08-16T20:24:45Z(UTC), uptime 474 (sec) = 0 days- network info -

=== Network: <route> ===

...

:/run/edgeview# ls
07ab2c40-408a-4bc2-b9f2-8ca94235074f:/run/edgeview# touch run-techsupport
07ab2c40-408a-4bc2-b9f2-8ca94235074f:/run/edgeview# ls -lt
total 92
-rw-r--r-- 1 root root 92917 Aug 22 22:07 techsupport-20220822220657.gz
07ab2c40-408a-4bc2-b9f2-8ca94235074f:/run/edgeview#

Then copy the file '/run/edgeview/techsupport-20220822220657.gz' onto a USB disk

1000: table 510, ip rule 1000: from all to all table 510

routes in table: 510
{Ifindex: 10 Dst: <nil> Src: <nil> Gw: <nil> Flags: [] Table: 510 Realm: 0}

...

.