[rrd-users] Working with linear slope calculations
Simon Hobson
linux at thehobsons.co.uk
Tue Jan 22 17:43:47 CET 2008
A Darren Dunham wrote:
> > If you need to convert within the graph, then simply plug in the
>> correct figures to an RPN expression, eg :
>>
>> t=p,400,*,86400,/,s,+
>>
>> Given p as the number of pixels found from some other calculation,
>> 400 & 86400 are the graph width and duration as given in the graph
>> command, and s is the graph start time (also given implicitly or
>> explicitly in the graph command); then t is the time you are looking
>> for.
>
>That's the bit I'm trying to avoid. It seems like I have to hardcode
>the size of the graph within a calculation. That makes changing things
>significantly more complex.
Only if you hardcode your graphs. I generate my graphs from scripts,
so the 400, 86400, and s would already be in variables to start with.
Eg, in shell you might write :
echo "... p,${gw},*,${gt},/,${gs},+" >> somefile
I'm assuming here that p comes from the slope function your trying to
use and so is already known to rrdtool.
>From your suggestion, I take it there's no
>way to poll for those values directly?
Not that I know of.
More information about the rrd-users
mailing list