Skip to Content.
Sympa Menu

perfsonar-user - Fix for rrdjtool for rrdtool versions 1.2.23 and greater.

Subject: perfSONAR User Q&A and Other Discussion

List archive

Fix for rrdjtool for rrdtool versions 1.2.23 and greater.


Chronological Thread 
  • From: "Michael Maul" <>
  • To:
  • Subject: Fix for rrdjtool for rrdtool versions 1.2.23 and greater.
  • Date: Tue, 12 Aug 2008 15:11:55 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=AoPA+nHNhGs49aSoLGD1xCScDffIUZpyTaNbaVxKMPYG/dmVtugNSuK3s25qRo2UfY sAWJ3ZCR6n1DczhUvQRQtYdBUjNmLXxpX57CQoJyDzg7L4KGG/hV5+QjaE4IZUqMsguS 8+g3iCzjhHsjsWEj+Q2HgCia3pkrO6XbLE0VE=

Since it looks like rrdjtool seems to live here , below is a fix for rrdtool versions < 1.2.23. Now you can have your graphs if you use rrdjtool for that.

If one of the commiteres would like to commit this that would be great.

----------Repo path:perfsonar/trunk/perfsonar/contrib/rrdjtool/native/Rrd.c ---------------

JNIEXPORT jint JNICALL Java_rrd_Rrd_createRrdGraph

 (JNIEnv *env, jobject obj, jobjectArray ar) {
 int n = (*env)->GetArrayLength(env, ar);
 char **tokens = getTokens(env, ar, n);
 char **calcpr;
  jboolean iscopy;
  FILE *stream = NULL;
  double ymin=0;
  double ymax=0;
 int xsize, ysize, i;
  /* Starting with rrdtool 1.2.23 introduced the additional arguments FILE *stream, double *ymin, double *ymax
  stream is used as the image output sink if the filename passed to rrd_graph is equal to "-" and stream in non zero 
  otherwise stdout is used. I don't really see a use for that here so passing NULL as stream value.
  ymin and ymax appear to be minimum and ts values in the database. They are not be preserved. */
   
 int status = rrd_graph(n, tokens, &calcpr, &xsize, &ysize,stream,&ymin,&ymax);
 preserveError();
 if(status != -1) {
  preserveGraphOutput(calcpr, xsize, ysize);
 }
 releaseTokens(tokens, n);
 return status;
}



  • Fix for rrdjtool for rrdtool versions 1.2.23 and greater., Michael Maul, 08/12/2008

Archive powered by MHonArc 2.6.16.

Top of Page