On Tue, Dec 2, 2014 at 11:27 PM, Bill Schwanitz <[email protected]> wrote:
>
>> 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.
This is what I use currently.
The table plugin works too but for single value files it seems clumsy.
> 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?
25.6°C :)
--
Thanks,
//richard
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd