system_exec and RRDTOOL
- Posted by chadal <francois.chadal at girce.caisse-epargne.fr> Nov 02, 2006
- 548 views
Hello, I'm trying to use system_exec with Euphoria (V3.0.0) instead of system(). But the executable program give back a strange answer : rrdtool.exe succeeded ERROR: unknown function '00' With system(), all is ok (except the screen flash with MS-DOS window and bad performance). The executable program RRDTOOL write on disk the desired image. With system_exec, the answer says all is ok but no image created and a stange function activated ?. What's happen ? How to trace more in depth ? Any idea ? FC Below the string command used with the following code :
function execRRDtool( sequence cmd_data) -- sequence cmd_rrd -- integer exit_code -- -- -- -- cmd_rrd = "rrdtool.exe "&cmd_data&">"&path_rrd_log&"\\"&nom_rrd_log -- system( cmd_rrd , 2) -- -- return 0 cmd_rrd = "rrdtool.exe "&cmd_data&" " -- exit_code = system_exec(cmd_rrd , 2) -- if exit_code = -1 then -- puts(2, "\n couldn't run rrdtool.exe\n") -- elsif exit_code = 0 then -- puts(2, "\n rrdtool.exe succeeded\n") -- else -- printf(2, "\n rrdtool.exe failed with code %d\n", exit_code)-- end if -- return exit_code -- end function --
String command example : (no CRLF used) graph D:\fchad\Doc-HTML\OSE\rrdtool\img\T01_j297.png --start "00:00 24/10/2006" --end "start+24hours" --y-grid "none" --imgformat PNG --title="Historique de la journée du mardi 24 octobre 2006" --vertical-label "Disponibilité" --width 500 --height 50 --upper-limit 1 --rigid --color CANVAS#000000 --color BACK#101010 --color FONT#C0C0C0 --color MGRID#80C080 --color GRID#808020 --color FRAME#808080 --color ARROW#FFFFFF --color SHADEA#404040 --color SHADEB#404040 DEF:last=D\:\fchad\Doc-HTML\OSE\rrdtool\oseT01.rrd:T01:LAST CDEF:niv2=last,1,+ CDEF:indispo=niv2,5,GT,niv2,0,IF CDEF:dispo=niv2,5,GT,0,niv2,IF AREA:dispo#00FF00:"disponible" AREA:indispo#FF0000:"indisponible" François Chadal