[rrd-developers] Argv changing
Antoine Guilmard
guilmard at free.fr
Wed Oct 19 10:47:25 MEST 2005
Hi,
After a rrd_graph() call with my argc[] argv[], i get my
argv changing ? the filename is not at the same position in my argv[]
For example dump of my argv list before call :
0 : d:\Mes Documents\Projets Visual Studio\SnmpGraph\src\Debug\SnmpGraph.exe
1 : graph
2 : d:\Server\www\apache\stats\adsl.png
3 : --start
4 : e-12h
5 : --imgformat
6 : PNG
7 : --title
8 : date Wed Oct 19 10:16:22 2005
9 : --font
10 : TITLE:16:Textapoint.ttf
11 : --font
12 : LEGEND:8:comic.ttf
13 : --font
14 : UNIT:9:comic.ttf
15 : --font
16 : AXIS:8:comic.ttf
17 : -h
18 : 150
19 : -w
20 : 700
21 : --rigid
22 : --upper-limit
23 : 130000
24 : --vertical-label
25 : DÚbit (Ko/s)
26 : DEF:Line1=DataBase1.rrd:adsldl:AVERAGE
27 : DEF:Line2=DataBase1.rrd:adslup:AVERAGE
28 : CDEF:flaming1=Line1,40,*,100,/
29 : AREA:flaming1#ffff5f: Download\t
30 : CDEF:flaming2=Line1,5,*,100,/
31 : STACK:flaming2#fff257
32 : STACK:flaming2#ffe54f
33 : STACK:flaming2#ffd947
34 : STACK:flaming2#ffcc3f
35 : STACK:flaming2#ffbf37
36 : STACK:flaming2#ffb230
37 : STACK:flaming2#ffa628
38 : STACK:flaming2#ff9920
39 : STACK:flaming2#ff8c18
40 : STACK:flaming2#ff8010
41 : STACK:flaming2#ff7308
42 : STACK:flaming2#ff6600
43 : COMMENT:
44 : GPRINT:Line1:MAX:\tmax\: %6.2lf %so/s
45 : GPRINT:Line1:AVERAGE:\tmoy\: %6.2lf %so/s
46 : GPRINT:Line1:LAST:\tactuelle\: %6.2lf %so/s
47 : COMMENT:\n
48 : LINE2:Line2#0000FF: Upload\t
49 : COMMENT:
50 : GPRINT:Line2:MAX:\tmax\: %6.2lf %so/s
51 : GPRINT:Line2:AVERAGE:\tmoy\: %6.2lf %so/s
52 : GPRINT:Line2:LAST:\tactuelle\: %6.2lf %so/s
after call rrd_graph():
0 : d:\Mes Documents\Projets Visual Studio\SnmpGraph\src\Debug\SnmpGraph.exe
1 : graph
2 : --start
3 : e-12h
4 : --imgformat
5 : PNG
6 : --title
7 : date Wed Oct 19 10:16:22 2005
8 : --font
9 : TITLE:16:Textapoint.ttf
10 : --font
11 : LEGEND:8:comic.ttf
12 : --font
13 : UNIT:9:comic.ttf
14 : --font
15 : AXIS:8:comic.ttf
16 : -h
17 : 150
18 : -w
19 : 700
20 : --rigid
21 : --upper-limit
22 : 130000
23 : --vertical-label
24 : DÚbit (Ko/s)
25 : d:\Server\www\apache\stats\adsl.png
26 : DEF:Line1=DataBase1.rrd:adsldl:AVERAGE
27 : DEF:Line2=DataBase1.rrd:adslup:AVERAGE
28 : CDEF:flaming1=Line1,40,*,100,/
29 : AREA:flaming1#ffff5f: Download\t
30 : CDEF:flaming2=Line1,5,*,100,/
31 : STACK:flaming2#fff257
32 : STACK:flaming2#ffe54f
33 : STACK:flaming2#ffd947
34 : STACK:flaming2#ffcc3f
35 : STACK:flaming2#ffbf37
36 : STACK:flaming2#ffb230
37 : STACK:flaming2#ffa628
38 : STACK:flaming2#ff9920
39 : STACK:flaming2#ff8c18
40 : STACK:flaming2#ff8010
41 : STACK:flaming2#ff7308
42 : STACK:flaming2#ff6600
43 : COMMENT:
44 : GPRINT:Line1:MAX:\tmax\: %6.2lf %so/s
45 : GPRINT:Line1:AVERAGE:\tmoy\: %6.2lf %so/s
46 : GPRINT:Line1:LAST:\tactuelle\: %6.2lf %so/s
47 : COMMENT:\n
48 : LINE2:Line2#0000FF: Upload\t
49 : COMMENT:
50 : GPRINT:Line2:MAX:\tmax\: %6.2lf %so/s
51 : GPRINT:Line2:AVERAGE:\tmoy\: %6.2lf %so/s
52 : GPRINT:Line2:LAST:\tactuelle\: %6.2lf %so/s
Here the filename of my graph is now at index 25, before it was at index 2.
A part of argv are shifted.
Is it a bug ? or not, because in rrdtool.c there is a line :
#ifdef notused /*XXX*/
const char *imgfile = argv[2]; /* rrd_graph changes argv pointer */
#endif
Thx,
Antoine Guilmard.
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-developers
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-developers
mailing list