On 13 May 2013 06:04, ambipur <aola...@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

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to