sigrok plugin
[collectd.git] / src / collectd.conf.pod
index 43803ba..fe92aac 100644 (file)
@@ -235,23 +235,35 @@ Number of threads to start for dispatching value lists to write plugins. The
 default value is B<5>, but you may want to increase this if you have more than
 five plugins that may take relatively long to write to.
 
-=item B<WriteQueueLengthLimitHigh> I<Num>
+=item B<WriteQueueLimitHigh> I<HighNum>
 
-=item B<WriteQueueLengthLimitLow> I<Num>
+=item B<WriteQueueLimitLow> I<LowNum>
 
-Default value for high limit is 0 (no limit).
-Default value for low limit is 50% of high limit.
+Metrics are read by the I<read threads> and then put into a queue to be handled
+by the I<write threads>. If one of the I<write plugins> is slow (e.g. network
+timeouts, I/O saturation of the disk) this queue will grow. In order to avoid
+running into memory issues in such a case, you can limit the size of this
+queue.
 
-When the write queue size becomes bigger than the high limit, values I<will> be dropped.
-When the write queue size is between low and high, values I<may> be dropped (depending
-on the queue size)
+By default, there is no limit and memory may grow indefinitely. This is most
+likely not an issue for clients, i.e. instances that only handle the local
+metrics. For servers it is recommended to set this to a non-zero value, though.
 
-If high limit is set to 0, there is no limit. This is the default.
-If high limit is set, but not low limit, low will be computed as 50% of high.
+You can set the limits using B<WriteQueueLimitHigh> and B<WriteQueueLimitLow>.
+Each of them takes a numerical argument which is the number of metrics in the
+queue. If there are I<HighNum> metrics in the queue, any new metrics I<will> be
+dropped. If there are less than I<LowNum> metrics in the queue, all new metrics
+I<will> be enqueued. If the number of metrics currently in the queue is between
+I<LowNum> and I<HighNum>, the metric is dropped with a probability that is
+proportional to the number of metrics in the queue (i.e. it increases linearly
+until it reaches 100%.)
 
-If you do not want to randomly drop values when the queue size is between low
-and high value, set the same value for low and high. When low=high and when the
-queue size is bigger, values are just dropped until the queue size becomes smaller.
+If B<WriteQueueLimitHigh> is set to non-zero and B<WriteQueueLimitLow> is
+unset, the latter will default to half of B<WriteQueueLimitHigh>.
+
+If you do not want to randomly drop values when the queue size is between
+I<LowNum> and I<HighNum>, set If B<WriteQueueLimitHigh> and
+B<WriteQueueLimitLow> to same value.
 
 =item B<Hostname> I<Name>
 
@@ -5136,6 +5148,72 @@ and all other sensors are collected.
 
 =back
 
+=head2 Plugin "sigrok"
+
+The I<sigrok> plugin uses libsigrok to retrieve measurements from any device
+supported by the L<sigrok|http://sigrok.org/> project.
+
+B<Synopsis>
+
+ <Plugin sigrok>
+   LogLevel 3
+   <Device "AC Voltage">
+      Driver "fluke-dmm"
+         Interval 10
+         Conn "/dev/ttyUSB2"
+   </Device>
+   <Device "Sound Level">
+      Driver "cem-dt-885x"
+         Conn "/dev/ttyUSB1"
+   </Device>
+ </Plugin>
+
+=over 4
+
+=item B<LogLevel> B<0-5>
+
+The sigrok logging level to pass on to the collectd log, as a number 0-5.
+These levels correspond to None, Errors, Warnings, Informational, Debug
+and Spew, respectively.  The default is 2 (Warnings). The sigrok log messages,
+regardless of their level, are always submitted to collectd at its INFO
+log level.
+
+=item E<lt>B<Device> I<name>E<gt>
+
+A sigrok-supported device, uniquely identified by this section's options. The
+I<name> is passed to collectd as the I<plugin instance>.
+
+=item B<Driver>
+
+The sigrok driver to use for this device.
+
+=item B<Conn>
+
+If the device cannot be auto-discovered, or more than one might be discovered
+by the driver, I<Conn> specifies the connection string to the device. It can
+be of the form of a serial port (I</dev/ttyUSB2>), or, in case of a non-serial
+USB-connected device, the USB VendorID/ProductID separated by a period
+(I<0403.6001>). A USB device can also be specified as bus.address
+(I<1.41>).
+
+=item B<SerialComm>
+
+For serial devices with non-standard port settings, this option can be used
+to specify them in the form I<9600/8n1>. This should not be necessary; drivers
+know how to communicate with devices they support.
+
+=item B<Interval>
+
+Specifies the minimum time between measurement dispatches to collectd, in
+seconds. Since some sigrok-supported devices can acquire measurements many
+times per second, it may be necessary to throttle these. For example, the
+RRD plugin cannot process writes more than once per second.
+
+The default (and minimum) interval is 1 second. Unused measurements are
+discarded.
+
+=back
+
 =head2 Plugin C<snmp>
 
 Since the configuration of the C<snmp plugin> is a little more complicated than