Saving system logs on USB flash drive

Supports a 2.0 USB interface. USB 3.0 is not supported.

USB 3.0 devices can be connected but the speed will be no more than USB 2.0. Also, there might be not enough power to power the device.

 

USB Flash Drive is used to record events in the system: logs, sensor readings, item settings, etc.

The FAT32 file system is supported. The USB flash drive must be pre-formatted by the user.

To manage the USB Flash Drive go to the tab: Preferences >> Logging >> USB Flash Drive.

If the USB Flash Drive is not inserted or not connected, part of the tab fields will be empty and the status will be indicated as "not connected". If the USB Flash Drive is connected, the tab will look like this:

 

The user can set the logging parameters, and view and manage the status of the USB Flash Drive:

  • Current state - reflects the current status of the USB Flash Drive (normal/ejected/not connected);

  • Mount point - address of the device, technical information;

  • Full size - total amount of memory device USB Flash Drive, in megabytes;

  • Free size - free memory of USB Flash Drive, in megabytes;

  • Enable logging to USB Flash Drive - enables and disables the logging function on the USB Flash Drive device;

  • Save video files - enables and disables the function of saving video records;

  • Enable detailed logging - enables and disables the function of recording per-second values of the selected sensors on the USB Flash Drive device;

  • Lifetime of files - the lifetime of the files, all older files are deleted from the USB Flash Drive;

  • Contents of the USB Flash Drive - specifies a link to the contents of the USB Flash Drive.

The buttons at the bottom of the panel provide:

  • Refresh - update tab data;

  • Save - saving and applying caching parameters;

  • Eject - unmounting the USB Flash Drive before removing the device from the connector.

 

Do not remove USB Flash Drive without unmounting, data loss is possible!

The files are written to a directory with the name formed from the name of the device type (for example, VT325) and the value of the Network→Hostname field, and has the form VT325-DeviceName. If the name is not specified by the user (by default, hostname), then the IP address of the device is used to form the directory name, and the name has the form VT325-192.168.0.193. Inside this directory, create a directory for the log files (log), video files (video), sensors dump files (sensors), and log archive files (archive). The files are named based on their creation time, and 2016.11.17_16-37-43.log. At the beginning of the log file, upon creation, service information like the device type, software version, IP address, etc is stored. Log files are written in text form.  Sensors dump files are recorded in a text table format CSV. The CSV format is supported by many office and engineering programs, including Microsoft Excel, OpenOffice, LabVIEW, etc.

Log files are recorded during the day and are closed at 00:00 by device time. If the device reboots, then new files are created.

 

The log file is filled in as events occur, and looks like this:

#

# Device type: "VT325", Firmware version: "2.7.1".

# Hostname: "hostname", IP: "192.168.0.199", MAC: "d8:80:39:9e:97:a7"

#

Thu Nov 17 14:23:20 2016    message: USB Flash was inserted

Thu Nov 17 14:23:25 2016    state: Element Onboard Temperature (id=201001) changed state from "unknown" to "normal"

Thu Nov 17 14:23:25 2016    state: Element Onboard Voltage DC (id=203001) changed state from "unknown" to "normal"

Thu Nov 17 14:23:26 2016    state: Element Dry-1 (id=101001) changed state from "unknown" to "normal"

Thu Nov 17 14:23:26 2016    state: Element Dry-2 (id=101002) changed state from "unknown" to "normal"

Thu Nov 17 14:23:30 2016    message: System started up and ready

Thu Nov 17 14:23:41 2016    state: Element GSM Modem (id=404001) changed state from "unknown" to "normal"

Detailed sensor dump files

For detailed sensors dump files see Sensors dump files.