[rrd-users] --color options to rrd graph

Jack Tavares j.tavares at F5.com
Thu Jun 10 03:14:29 MEST 2004

Hello -

I am trying to use the -c|--color options to set
the BACK, SHADEA and SHADEB colors.

It works fine from the command line, ala:

rdtool graph /usr/local/images/memoryV86BQ2.png -s -10800 
	-w 539 -h 100 -aPNG -tMemory -v Memory -l 0 -b 1024 
	--color SHADEA#deddd9 --color SHADEB#deddd9 --color BACK#deddd9 
	CDEF:myvname0=memory LINE2:myvname0#6495ed:memory

but it doesn't work when I make the library call from my
.c program. I get

"unrecognized option '--color SHADEA#deddd9'

Is this a known issue. Can anybody else repro this?
here is my test program.

#include <stdio.h>
#include "rrd.h"

int main(int argc, char**argv )
    char* args[1024];
    int argCount=0;
    args[argCount++] = "graph";
    args[argCount++] = "/usr/local/images/memoryV86BQ2.png";
    args[argCount++] = "-s -10800";
    args[argCount++] = "-w 539";
    args[argCount++] = "-h 100";
    args[argCount++] = "-aPNG";
    args[argCount++] = "-tMemory";
    args[argCount++] = "-v Memory";
    args[argCount++] = "-l 0";
    args[argCount++] = "-b 1024";
    args[argCount++] = "--color SHADEA#deddd9";
    args[argCount++] = "--color SHADEB#deddd9";
    args[argCount++] = "--color BACK#deddd9";
    args[argCount++] = "DEF:memory=/var/rrd/memrrdfile:memory:AVERAGE";
    args[argCount++] = "CDEF:myvname0=memory";
    args[argCount++] = "LINE2:myvname0#6495ed:memory";

    int i;
        fprintf(stderr, "arg[%d]=%s\n", i, args[i]);
    char **junk;
    int xsize, ysize;   
    int err = rrd_graph( argCount, args, &junk, &xsize, &ysize);
    if( err )
        fprintf( stderr, "err: %s\n", rrd_get_error() );
    return 0;

Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list