meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
documentation:recsdaemon [2016/10/12 13:46] – Fixed missing commas krudocumentation:recsdaemon [2016/12/14 15:33] vor
Line 13: Line 13:
 After downloading the file you can install it e.g. on Ubuntu using the following command: After downloading the file you can install it e.g. on Ubuntu using the following command:
  
-      dpkg --install RECSDaemon_3.5.0.deb+<code bash> 
 +dpkg --install RECSDaemon_<version>.deb 
 +</code>
  
 The installation script will try to auto-detect some of the configuration parameters, but as platforms supported by the daemon are very diverse, manual configuration of remaining parameters most probably will be necessary. The installation script will try to auto-detect some of the configuration parameters, but as platforms supported by the daemon are very diverse, manual configuration of remaining parameters most probably will be necessary.
Line 19: Line 21:
 RECSDaemon comes with both systemd and classical init scripts to allow automatically starting the daemon during system boot. Depending on your distribution, use either RECSDaemon comes with both systemd and classical init scripts to allow automatically starting the daemon during system boot. Depending on your distribution, use either
  
- systemctl enable RECSDaemon +<code bash> 
 +systemctl enable RECSDaemon  
 +</code>
  
 or or
-  + 
- update-rc.d RECSDaemon defaults+<code bash> 
 +update-rc.d RECSDaemon defaults 
 +</code>
  
 ===== Configuration ===== ===== Configuration =====
Line 37: Line 43:
  
 ==== Communication ==== ==== Communication ====
 +
 To be able to send sensor values and to receive commands, the RECSDaemon has to communicate with the management system of the RECS<sup>(r)</sup>%%|%%Box. To be able to send sensor values and to receive commands, the RECSDaemon has to communicate with the management system of the RECS<sup>(r)</sup>%%|%%Box.
 This can happen via one of two different communication channels: On the one hand it is possible to use the internal management bus (I2C) of the RECS<sup>(r)</sup>%%|%%Box. On the other hand, regular TCP/IP is also supported when an external connection between the node the RECSDaemon is running on and the management Ethernet port of the RECS<sup>(r)</sup>%%|%%Box is made. Without this external connection, only I2C can be used. This can happen via one of two different communication channels: On the one hand it is possible to use the internal management bus (I2C) of the RECS<sup>(r)</sup>%%|%%Box. On the other hand, regular TCP/IP is also supported when an external connection between the node the RECSDaemon is running on and the management Ethernet port of the RECS<sup>(r)</sup>%%|%%Box is made. Without this external connection, only I2C can be used.
Line 52: Line 59:
  
 === LinuxCommunicatorDev === === LinuxCommunicatorDev ===
 +
 If necessary, the I2C bus to be used can be changed. This is done by setting the ''i2cBus'' property. The value is used to determine the device path by appending it to the base path "/dev/i2c-". If necessary, the I2C bus to be used can be changed. This is done by setting the ''i2cBus'' property. The value is used to determine the device path by appending it to the base path "/dev/i2c-".
  
 Example configuration: Example configuration:
-<code>[Comm]+ 
 +<code ini> 
 +[Comm]
 PluginName=LinuxCommunicatorDev PluginName=LinuxCommunicatorDev
-i2cBus=0</code>+i2cBus=0 
 +</code>
  
 === CommunicatorTCP configuration === === CommunicatorTCP configuration ===
Line 65: Line 76:
  
 Example configuration: Example configuration:
-<code>[Comm]+ 
 +<code ini> 
 +[Comm]
 PluginName=CommunicatorTCP PluginName=CommunicatorTCP
 baseboard=2 baseboard=2
-controller=192.168.13.56</code>+controller=192.168.13.56 
 +</code>
  
 ==== Slot detection ==== ==== Slot detection ====
 +
 Because some of the RECS<sup>(r)</sup>%%|%%Box baseboards support multiple modules, nodes need to know in which slot of the baseboard they are located. This is done by pins on the module connector that are tied to different logic levels depending on the slot position. These values can be read by the RECSDaemon using a SlotDetector plugin. Because some of the RECS<sup>(r)</sup>%%|%%Box baseboards support multiple modules, nodes need to know in which slot of the baseboard they are located. This is done by pins on the module connector that are tied to different logic levels depending on the slot position. These values can be read by the RECSDaemon using a SlotDetector plugin.
  
Line 79: Line 94:
  
 === LinuxSlotDetectorGPIO configuration === === LinuxSlotDetectorGPIO configuration ===
 +
 This plugin needs the numbers of the GPIO pins used to sense the slot position as used by the running kernel. These are set with the ''Bit0GPIO'' and ''Bit1GPIO'' settings. This plugin needs the numbers of the GPIO pins used to sense the slot position as used by the running kernel. These are set with the ''Bit0GPIO'' and ''Bit1GPIO'' settings.
  
 Example configuration: Example configuration:
-<code>[Slot]+<code ini> 
 +[Slot]
 slotPluginName=LinuxSlotDetectorGPIO slotPluginName=LinuxSlotDetectorGPIO
 Bit0GPIO=133 Bit0GPIO=133
-Bit1GPIO=134</code>+Bit1GPIO=134 
 +</code> 
 ==== Sensor providers ==== ==== Sensor providers ====
 +
 Sensor providers, as the name implies, add one or more sensors to the RECSDaemon's sensor list. This is in contrast to normal sensors that are manually configured (see chapter "Sensors"). Sensor providers can have two different internal designs: They either can directly provide and update sensor objects or they can use JSON as the interface to the RECSDaemon. Depending on the type, the plugins are enabled by adding them to either the ''SensorProviders'' or ''SensorProvidersJSON'' properties in the ''[Plugins]'' section. Sensor providers, as the name implies, add one or more sensors to the RECSDaemon's sensor list. This is in contrast to normal sensors that are manually configured (see chapter "Sensors"). Sensor providers can have two different internal designs: They either can directly provide and update sensor objects or they can use JSON as the interface to the RECSDaemon. Depending on the type, the plugins are enabled by adding them to either the ''SensorProviders'' or ''SensorProvidersJSON'' properties in the ''[Plugins]'' section.
  
Line 107: Line 127:
  
 === SensorProviderZynq === === SensorProviderZynq ===
 +
 This plugin needs the base address of the monitoring peripheral it should read in the Zynq's memory space. Configure it with the ''auroraMonitorBaseAddress'' property in the ''Plugins'' section. This plugin needs the base address of the monitoring peripheral it should read in the Zynq's memory space. Configure it with the ''auroraMonitorBaseAddress'' property in the ''Plugins'' section.
  
 === SensorProviderZynqModule === === SensorProviderZynqModule ===
 +
 This plugin needs the name of the serial port of the management microcontroller on the Zynq module. Configure it with the ''zynqSerialPort'' property in the ''Plugins'' section. On Linux, it typically would be "/dev/ttyUSB0". This plugin needs the name of the serial port of the management microcontroller on the Zynq module. Configure it with the ''zynqSerialPort'' property in the ''Plugins'' section. On Linux, it typically would be "/dev/ttyUSB0".
 +
 ==== Sensors ==== ==== Sensors ====
 +
 Besides SensorProviders that automatically add a set of sensors when enabled, the RECSDaemon also allows manual configuration of additional sensors. Besides SensorProviders that automatically add a set of sensors when enabled, the RECSDaemon also allows manual configuration of additional sensors.
  
Line 124: Line 148:
  
 An example configuration for one manual sensor could be: An example configuration for one manual sensor could be:
-<code>[Sensors]+<code ini> 
 +[Sensors]
 count=1 count=1
  
 pluginName1=SensorFileReader pluginName1=SensorFileReader
 sensorName1=Test sensorName1=Test
-options1=path=test.txt type=U8</code>+options1=path=test.txt type=U8 
 +</code>
  
 === SensorFileReader configuration === === SensorFileReader configuration ===
 +
 This plugin reads and parses the first line of a given file each time it is requested to update the sensor value. It recognizes the following options: This plugin reads and parses the first line of a given file each time it is requested to update the sensor value. It recognizes the following options:
  
Line 145: Line 172:
  
 ==== Other settings ==== ==== Other settings ====
 +
 In the ''Update'' section the rate with which the RECSDaemon updates its virtual sensors and sends them to the management system can be configured with the ''updateInterval'' property. The value is in milliseconds and gives the time between two updates. Beware that this only changes the update rate of the daemon. The RECS<sup>(r)</sup>%%|%%Box management system has its own update rate with which it collects sensor values. Thus, if you set this value smaller than the update rate of the management system, the effective update rate will still be that of the management system. In the ''Update'' section the rate with which the RECSDaemon updates its virtual sensors and sends them to the management system can be configured with the ''updateInterval'' property. The value is in milliseconds and gives the time between two updates. Beware that this only changes the update rate of the daemon. The RECS<sup>(r)</sup>%%|%%Box management system has its own update rate with which it collects sensor values. Thus, if you set this value smaller than the update rate of the management system, the effective update rate will still be that of the management system.
 +
 ===== TCP/IP server ===== ===== TCP/IP server =====
 +
 The RECSDaemon provides a simple TCP/IP server (by default on port 2023) that can be used by external programs to gain information or provide additional sensors. The RECSDaemon provides a simple TCP/IP server (by default on port 2023) that can be used by external programs to gain information or provide additional sensors.
  
Line 159: Line 189:
  
 ==== Getting monitoring data ==== ==== Getting monitoring data ====
 +
 Using the ''monitor'' command, the RECSDaemon can be utilized to obtain measurements with a faster update rate than via the regular RECS<sup>(r)</sup>%%|%%Box management system. Each time the daemon receives the command, it causes the baseboard to sample its local sensors and reads the results. Because this uses the module's I2C connection, it will not work when the CommunicatorTCP plugin is used. Using the ''monitor'' command, the RECSDaemon can be utilized to obtain measurements with a faster update rate than via the regular RECS<sup>(r)</sup>%%|%%Box management system. Each time the daemon receives the command, it causes the baseboard to sample its local sensors and reads the results. Because this uses the module's I2C connection, it will not work when the CommunicatorTCP plugin is used.
  
 The returned JSON string has the following format: The returned JSON string has the following format:
  
-<code>[+<code javascript> 
 +[
 {"name": "nodeCurrent", "value": 0.0, "unit": "A"}, {"name": "nodeCurrent", "value": 0.0, "unit": "A"},
 {"name": "pegCurrent", "value": 0.0, "unit": "A"}, {"name": "pegCurrent", "value": 0.0, "unit": "A"},
 {"name": "12vSupply", "value": 12.0, "unit": "V"}, {"name": "12vSupply", "value": 12.0, "unit": "V"},
 {"name": "temperatures", "values": [0.0, 0.0, 0.0, 0.0, 0.0], "unit": "°C"} {"name": "temperatures", "values": [0.0, 0.0, 0.0, 0.0, 0.0], "unit": "°C"}
-]</code>+] 
 +</code>
  
 The ''pegCurrent'' entry is optional and only available on COM Express baseboards. The ''pegCurrent'' entry is optional and only available on COM Express baseboards.
 +
 ==== Adding and updating sensors ==== ==== Adding and updating sensors ====
  
Line 194: Line 228:
  
 Example: Example:
-<code>[+<code javascript> 
 +[
  {  {
  "name": "1.0 V",  "name": "1.0 V",
Line 207: Line 242:
  "unit": "°C"  "unit": "°C"
  }  }
-]</code>+] 
 +</code>