Skip to main content
Version: TAO v2.x

Services and logs

Note

Access to services or logs is an advanced task that requires having root access on the gateway.

Services

Services are accessible through:

  • /etc/init.d/<service>, for most gateways
  • /etc/rcU.d/S90<service>, on Kerlink Wirnet iFemtoCell-evolution

5 services are started on ThingPark Enterprise All-in-One:

roleservice
Base station LRRlrr
LoRaWAN network serverlrc
ThingPark All-in One administration servertao
node-REDnode-red
MQTT brokermqtt
Note It is not allowed to modify any configuration files located under /home/actility/usr/etc... (except for temporary tests). All these modifications will be lost after an upgrade

Logs

All logs are stored in a tmpfs in-memory space:

modellog storage root pathtmpfs space
ufispace/var/volatile/log100 MB
gemtek/dev/shm/log500 MB

For each service, a dedicated folder is created:

servicecommand
LRR<log storage root path>/_LRRLOG
LRC<log storage root path>/_LRCLOG
tao<log storage root path>/_TAOLOG
node-red<log storage root path>/_NODEREDLOG
mqtt<log storage root path>/_MQTTLOG

This is achieved through links (Ufispace example):

am335x-evm:/# ls -l /home/actility/var/log/
lrwxrwxrwx 1 root root 25 Jan 5 11:36 lrc -> /var/volatile/log/_LRCLOG
lrwxrwxrwx 1 root root 25 Jan 5 11:36 lrr -> /var/volatile/log/_LRRLOG
lrwxrwxrwx 1 root root 29 Jan 5 11:36 node-red -> /var/volatile/log/_NODEREDLOG
lrwxrwxrwx 1 root root 25 Jan 5 11:36 tao -> /var/volatile/log/_TAOLOG

Log levels are kept very low, and not provided for MQTT:

serviceconfiguration fileconfiguration
LRR$ROOTACT/usr/etc/lrr/lrr.inilevel=0, debug=0, size=10000000 (10MB)
LRC$ROOTACT/usr/etc/lrr/lrc.inilevel=0, debug=0, size=10000000 (10MB)
TAO$ROOTACT/usr/etc/tao/configs/tao_server_config.yamllevel: WARN, maxSize=10 (10 MB)
Node-RED$ROOTACT/usr/etc/node-red/settings.jslevel : 'error', size=10000000 (10 MB)
MQTT$ROOTACT/usr/etc/mqtt/mosquitto.conflog_dest none, must change it to log_dest file /var/log/mosquitto.log for log activation

Log level modification

  • For LRR, TAO, Node-RED and MQTT, you must connect on the base station, and modify the configuration files and then, restart the corresponding service.
  • For LRC, you can do the same or dynamically through a telnet admin session (telnet 0 2009).
  • For Node-RED:
    • level: "trace" (in 2 places)
    • Add section: uplinkDownlink: { log: (s)=>{(module.exports.logging.customLogger.handler())({timestamp: s.slice(0,s.indexOf(" ")), msg:s.slice(s.indexOf(" ")+1)}) } },
  • For MQTT, configure log_dest to log_dest file /var/log/mosquitto.log, and set log_type.
Note

All logs (not for the MQTT broker) are stored in memory, they are copied on disk every day in $ROOTACT/traces.