Introduction
When your edge devices have poor network connectivity, they may not be able to send log data to your enterprise. When this happens, you can collect your logs manually using a USB drive. This article describes how to do so.
Procedure
Create a USB stick to dump the logs
- Download the EVE tools from GitHub to a chosen directory:
git clone https://github.com/lf-edge/eve.git
- Navigate to your new EVE directory:
cd eve
- Create the USB image:
- On Linux:
- Get the name of the USB device (/dev/sdx in this example). Run:
-
lsblk
-
- Create the USB image. Run:
-
tools/makeusbconf.sh -d -i -s 8192 /dev/sdx
-
- Get the name of the USB device (/dev/sdx in this example). Run:
- On macOS:
- Place the USB image in a image file. Run:
-
tools/makeusbconf.sh -d -i -s 8192 usb.img
-
- Copy the usb.img image file to the raw USB disk device using a flashing utility of your choice.
- Place the USB image in a image file. Run:
- On Windows:
- Run below command, and it will ask you for a USB device to use.
-
tools/makeusbconf.bat
-
- Run below command, and it will ask you for a USB device to use.
- On Linux:
Note: The following error message can be ignored. It does not affect the final OS image build. Find more information on https://github.com/lf-edge/eve/issues/2570.
"tools/makeusbconf.sh: line 10: linuxkit: command not found"
Dump the logs into the USB stick
Capturing the log files:
- Plug the USB into the Edge Device. Any port is fine.
- Wait 10 minutes for all the diags to be written into the USB.
- Unplug the USB (no need to power down the device) and plug it into your machine.
- There will be a partition named "EVEDPC" with two directories called "dump" and "identity".
- Provide the file called diag.tar inside the directory "dump" to ZEDEDA support.
Note: This works out of the box before the device is onboarded. After on-boarding, however, it is required to enable USB ports using the following zcli command:
zcli edge-node update <EDGE_NODE> --config="debug.enable.usb:true"
Additional Information
Using 'makeusbconf.sh'
The following script outputs the output.img file to the current working directory.
makeusbconf.sh [-d] [-i] [-s <size in Kb>] [-f <file> ] <output.img>
-d
Create a directory called 'dump' inside the partition, which Eve will use to deposit any diagnostics like the log files.
-i
Create a directory called 'identity' inside the partition, which Eve will use to deposit its identity like the device certificate.
-s
8192 Set the size of the image to 8MiB (the default size is 200MiB, which is unnecessarily large for this case).
-f
Provide an input file with with a network config override in json format (this flag is not required to obtain logs).