错误:“无法解析 DS”当尝试使用 RRDs::graph 绘制图表时
您好,我是 RRD 新手,并用它绘制图表。我正在尝试用以下内容绘制图表
RRDs::graph ($wwwDir."graphs\\2mtotal$rrdname.png", "-l 0", "-w 500", "-h 200", "-v Size", "-s now-5184000"
, "--base", "1024", "-x", "DAY:1:WEEK:1:WEEK:1:0:%d/%m", "-e now", "--title=$rrdheading"
, "DEF:DriveCap=D\:\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd:$rrdCap:AVERAGE"
, "DEF:DriveSize=D\:\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd:$rrdSize:AVERAGE"
, "CDEF:DriveSizeGB=DriveSize,1073741824,/"
, "LINE3:DriveSize#33FF33:Total Used"
, "LINE3:DriveCap#cc0033:Capacity"
, "GPRINT:DriveSizeGB:LAST:Total Used Space\\: %2.0lf Gb\\j"
, "COMMENT:Created\\: $hour\\:$min $mday/$mon/$year\\r");
但是,我遇到了一个错误:
ERROR while updating monthly total graph PopZ.rrd: Cannot parse DS in 'DEF:DriveCap=D:\xampp\htdocs\Diskusage\rrdResult\ POPZ.rrd:POPZCapacity:AVERAGE'
我的 RRD 定义是
<ds>
<name> POPZCapacity </name>
<type> GAUGE </type>
<minimal_heartbeat> 200000 </minimal_heartbeat>
<min> 0.0000000000e+000 </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 3.7080673019e+016 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
我不确定问题出在哪里,任何建议将不胜感激,提前致谢!
Hi I am new to RRD and plotting graph with it. I am trying to plot a graph with following
RRDs::graph ($wwwDir."graphs\\2mtotal$rrdname.png", "-l 0", "-w 500", "-h 200", "-v Size", "-s now-5184000"
, "--base", "1024", "-x", "DAY:1:WEEK:1:WEEK:1:0:%d/%m", "-e now", "--title=$rrdheading"
, "DEF:DriveCap=D\:\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd:$rrdCap:AVERAGE"
, "DEF:DriveSize=D\:\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd:$rrdSize:AVERAGE"
, "CDEF:DriveSizeGB=DriveSize,1073741824,/"
, "LINE3:DriveSize#33FF33:Total Used"
, "LINE3:DriveCap#cc0033:Capacity"
, "GPRINT:DriveSizeGB:LAST:Total Used Space\\: %2.0lf Gb\\j"
, "COMMENT:Created\\: $hour\\:$min $mday/$mon/$year\\r");
However, I have got an error:
ERROR while updating monthly total graph PopZ.rrd: Cannot parse DS in 'DEF:DriveCap=D:\xampp\htdocs\Diskusage\rrdResult\ POPZ.rrd:POPZCapacity:AVERAGE'
My RRD definition is
<ds>
<name> POPZCapacity </name>
<type> GAUGE </type>
<minimal_heartbeat> 200000 </minimal_heartbeat>
<min> 0.0000000000e+000 </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 3.7080673019e+016 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
I am not sure where is the problem, any advice will be appreciated, thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谜团解决了,它不喜欢冒号,根据(
http://dev.pulsed.net/wp/?p=3
),我可以使用\\127.0.0.1\d然而,$
需要转义\
两次,并以 8 个\
结尾,以表示双\
$rrdFilePath = "\ \\\\\\\127.0.0.1\\d\$\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd";
Mystery solved, it does not like colon and according to (
http://dev.pulsed.net/wp/?p=3
), I could use\\127.0.0.1\d$
, however, need to escape\
twice and end up eight\
for double\
$rrdFilePath = "\\\\\\\\127.0.0.1\\d\$\\xampp\\htdocs\\Diskusage\\rrdResult\\POPZ.rrd";