> On Dec 2, 2014, at 4:58 PM, Richard Weinberger <[email protected]> 
> wrote:
> 
> Hi!
> 
> What is the best way to read from a single value file?
> i.e. a file like:
> # cat /sys/bus/iio/devices/iio:device1/in_temp_input
> 25600

I would just use the exec plugin 
(https://collectd.org/wiki/index.php/Plugin:Exec) for something like this.

Basically you need to decide if it is a counter, gauge or derivative, then 
adjust the output.

while(true)
do
  echo "PUTVAL \”${hostname}/sensor-${instance}/gauge-${label}\" 
interval=$COLLECTD_INTERVAL N:${recorded_value}”
  sleep $COLLECTD_INTERVAL
done

do you know what the value data is? 25600 seems a high input temperature. What 
is the scale?



_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to