[rrd-users] Using RPN variables in the RRD graph title label: simple yes or no answer

Darren Murphy darren at victoriajd.com
Mon May 13 03:51:39 CEST 2013


On 13 May 2013 06:04, ambipur <aolah76 at freemail.hu> wrote:
>
> But how to access the result of the 8 PRINT commands and redirect their
> values to perl variables?
>

Not sure why you would want to do this, or what problem you're trying
to solve...
But, you could do something like this:

my %grprint_formats = (
	mem		=> {
		MAX		=> '%5.3lf %3bytes,
		MIN 	=> '%5.1lf %sbytes',
		AVERAGE	=> '%5.3lf %sbytes',
		LAST 	=> '%5.3lf %sbytes',
	},
	kernel	=> {
		MAX		=> '%5.1lf %sbytes',
		MIN		=> '%5.1lf %sbytes',
		AVERAGE => '%5.1lf %Sbytes',
		LAST 	=> '%5.1lf %Sbytes',
	},
);

Then to access individual items, you'd do something like:

print "$gprint_formats{mem}{MAX}\n";
etc..

You might find the PDSC useful - http://perldoc.perl.org/perldsc.html

regards,
Darren



More information about the rrd-users mailing list