Versions Compared

Key

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

...

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

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 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 researves the string 'copy-logfiles' for this purpose. The command 'log/copy-logfiles' is used to upload log entries onto 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 use 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.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. 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 then decompressed the gzip files and merge them 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.

Since the script mount the local file '/tmp/download' to the container '/download', the user can view those files locally:

% ls -lt /tmp/download/logfiles-20220815221401

total 1872

-rw-r--r-- 1 <username> wheel 790799 Aug 15 15:14 dev.log.txt

-rw-r--r-- 1 <username> wheel 160141 Aug 15 15:14 app.9ce27b08-47e0-4568-a56e-b6dd0e4514cd.log.txt


Pub/Sub Commands

The 'pub' commands are meant for users who have extensive EVE internal knowledge. EVE-OS has many services, e.g. 'zedagent', 'zedrouter', etc. Each service publishes some configuration or status for other services to consume or subscribe. All those publications reflect the current state of EVE operation. When troubleshooting a problem, sometimes one needs to know what a service is publishing to see if it is correct. The majority of the publications is in directory '/run/<service-name>/'. A service can publish one or more types of data, which locates in it's sub-directories.

...