Perl RRDTools RRDs::导出模块';这是一个很好的例子
我试图利用Perl中模块的xport函数从rrd文件中提取数据。然而,我没有任何运气找到一个正确的语法来使用相同的。官方网站仅提供以下解释。 如果有人使用了此模块,请提供帮助Perl RRDTools RRDs::导出模块';这是一个很好的例子,perl,cgi,rrdtool,Perl,Cgi,Rrdtool,我试图利用Perl中模块的xport函数从rrd文件中提取数据。然而,我没有任何运气找到一个正确的语法来使用相同的。官方网站仅提供以下解释。 如果有人使用了此模块,请提供帮助 RRDs::xport exposes the rrdxport functionality and returns data with the following structure: my ($start,$end,$step,$cols,$names,$data) = RRDs::xport ...
RRDs::xport exposes the rrdxport functionality and returns data with the following structure:
my ($start,$end,$step,$cols,$names,$data) = RRDs::xport ...
# $start : timestamp
# $end : timestamp
# $step : seconds
# $cols : number of returned columns
# $names : arrayref with the names of the columns
# $data : arrayref of arrayrefs with the data (first index is time, second is column)
RRDs模块中的各种Perl函数采用的参数数组与命令行函数完全相同 那么比如说,
@args = qw/--start now-1h --end now DEF:x=file.rrd:ds0:AVERAGE XPORT:x:out_bytes/;
($start,$end,$step,$cols,$names,$data) = RRDs::xport(@args);
记住,您不需要引用包含空格的参数——毕竟,它们已经在数组中标记了