[rrd-users] Call for help: Windows developer trying to getstarted...

Mike Johnson mike at quick.co.jp
Fri Feb 16 14:01:51 CET 2007


I started trying to link to RRDtool, but even trying to compile it for
Windows is very difficult.

 

After wasting quite a lot of time I gave that up and just called it as an
external application passing in the command line. I also switched to using
C# and .Net 2 as well. It does not seem to be that much of an overhead, and
I can buffer data in my application to cut down on the number of calls to
RRDtool.

 

I think there is a lot to learn in the calls to rrdtool and getting an
application working, without the extra work of trying to compile and/or link
to it when it's almost undocumented.

 

I'm using version 1.2.15, which is the latest windows binary I could find.

 

The only problem I've had is with graphs, when re-using the output file name
sometimes the file remains locked even when the graph is no longer
displayed, so I have a small pool temporary filenames.

 

 

public static void CallRRDTool(string cmd)

{

   lock (sync) // rrdtool may not be thread safe

   {

      Process rrdtool = new Process();

      rrdtool.StartInfo.FileName = "RRDTool.exe";

      rrdtool.StartInfo.CreateNoWindow = true;

      rrdtool.StartInfo.UseShellExecute = false;

      rrdtool.StartInfo.RedirectStandardError = true;

      rrdtool.StartInfo.RedirectStandardOutput = true;

      rrdtool.StartInfo.Arguments = cmd;

 

      rrdtool.Start();

      rrdtool.WaitForExit(2000);

 

      string output = rrdtool.StandardOutput.ReadToEnd().Trim();

      if (output.Length != 0)

      {

         logmsg("RRDtool Stdout: " + output);

         logmsg("RRDtool Cmd: " + cmd);

      }

      output = rrdtool.StandardError.ReadToEnd().Trim();

      if (output.Length != 0)

      {

         logmsg("RRDtool Stderr: " + output);

         logmsg("RRDtool Cmd: " + cmd);

      }

   }

}

 

 

-----Original Message-----
From: rrd-users-bounces at lists.oetiker.ch
[mailto:rrd-users-bounces at lists.oetiker.ch] On Behalf Of David Taylor
Sent: 15 February 2007 19:08
To: rrd-users at lists.oetiker.ch
Subject: [rrd-users] Call for help: Windows developer trying to
getstarted...

 

Hello folks,

I'm pretty sure that this is a standard message that goes out once in a
while and apologize if I have missed some obvious resource.

For all the best reasons I am trying to get started with RRDTool.  As  a
developer I am familiar with C/C++ and my preferred Windows development
environment is Visual Studio 2005.

If possible I would like to get started without having to build RRDTool
itself.

Our intention is to integrate RRDTool with a Windows-based and Java-based
proprietary solution.

I have looked over the material on the web site but there seems to be a lot
of stuff that suggests that the preferred RRDTool environment is Linux.

Please would someone point me at the method of installing RRDTool and
setting up the necessary environment variables, libraries and such like on
32 bit Windows XP SP2?

Thanks in advance.

David

-- 

David W. Taylor
Developer | SL Corporation | http://www.sl.com
david.taylor at sl.com | Tel: +1.415.927.8555 | Fax: +1.415.927.8401
  _____  


Email communication may contain privileged or confidential information
proprietary to SL Corporation. If you have received this communication in
error, we ask that you advise the sender by reply e-mail and immediately
delete the message and any attachments without copying or disclosing the
contents.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20070216/6ca4686e/attachment.html 


More information about the rrd-users mailing list