i9x0.SysLog.Get logfiles from i9x0
To a limited extent, the controller records the SysLog data and can make it available via a defined path, as shown in the following image. This functionality is available from firmware version 2.0.0 on.
Get local Logfiles
-
All Logfiles are stored on the i9x0 Servo Inverter in a protected inaccessible area.
-
Users with access to the i950 Servo Inverter's parameter set can execute the device command to copy log files to the /tmp/lsyslog directory.
-
Users with a PLC Designer and access to the i9x0 Servo Inverter can retrieve these files via the Files tab.
-
If the user has an SFTP client and an SFTP key, they can access the files via SFTP.
The structure of the log files is shown in the figure before.
-
The first logfile is written without compression.
-
After reaching a file size, a new log file will be generated with .1-extension.
-
After reaching the file size again, a new log file will be generated and compressed with a .2.gz-extension.
-
After reaching the maximum number of log files, the oldest file will be dropped.
Log files with their focus and an example of content
|
Log file |
Example of content |
|---|---|
|
kern |
e.g. `mmc0: card 5048 removed` -> SD card was removed |
|
user |
e.g. `<user message>` -> User messages, generated by the FB |
|
daemon |
e.g. `check-and-mount@mmcblk0p1.service: Succeeded finished check and mount device mmcblk0p1`-> a new SD card was detected. |
|
auth |
e.g. `session opened for local user customer from [192.168.10.201] realpath”/sdcard” ` -> SFTP Session opened and path set to /sdcard |
|
authpriv |
e.g. `child connection from 192.168.10.201:63287` -> SFTP-Child connection from given IP address |
|
local0 |
e.g. `Sessioninfo: client: ‘PLC Designer 4.0.0’, host: ‘<hostname>’` -> PLC Designer logged into the Controller |
|
local1 |
Reserved for EtherCAT-Master-Debugging (only for Lenze developer) |
|
local2 |
e.g. `ViwiWin7.Server.Manager: WebGateway Server|WebGateway:WebGatewy Server started` |
Persistence of local stored log files
This chapter describes some use cases related to the persistence of log files.
Persistence of SysLog log files
|
Use Case |
Persistence of log files |
|---|---|
|
Reboot or Shutdown the i9x0 Servo Inverter. |
The log files are not persists. After starting the i9x0 Servo Inverter the logging mechanism starts with empty logfiles. |
|
Firmware Up- or Downgrade. |
The log files are not persists. After starting the i9x0 Servo Inverter the logging mechanism starts with empty logfiles. |
Get logfiles from SysLog Server
There are a lot of different ways to setup a SysLog Server. In this example, a SysLog Server based on an Ubuntu Linux system with the functionality of the rsyslog service is described and shown in the following figure.
Get Lofile from SysLog Server
Set up the i9x0 Servo Inverter:
-
In this example, the i9x0 Servo Inverter has the IP address of 192.168.10.100.
-
Set the parameter 0x5914:001 to `activated` to activate the SysLog Client of the i9x0.
-
Set the parameter 0x5914:002 to the IP address of the SysLog Server.
-
Set the parameter 0x5914:003 to the Port of the SysLog Server.
-
Set the parameter 0x5914:004 to the Protocol Type UDP.
-
Set the flags of parameter 0x5914:006 of the wanted severities.
Setup the SysLog Server:
-
Use the Ubuntu Linux Distribution and install the `rsyslog` service.
-
Configuration `/etc/rsyslog.conf` and activate the syslog reception via hdp/514 with the following lines:
module(load=”imudp”)
input(type=”imudp” port=”514”)
-
Generate a template file `/etc/rsyslog.d/example.conf`:
$template example, “/var/log/example.log”
if $fromhost-ip startswith “192.168.10.100” then -?example
& stop
-
Restart the Service:systemctl restart rsyslog
-
When using the Controller in this settings, the SysLog Messages will be found in the SysLog Server in the /var/log/example.log.
-
To ensure that the time stamps in the logbooks on the i950 Servo Inverter and the higher-level SysLog server match and that the logs in the SysLog server also match those of other devices in the system, it is recommended that the SysLog server, the i950 and all other devices that use this service be connected to a central time source via NTP and synchronized.