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

David Taylor david.taylor at sl.com
Fri Feb 16 18:38:36 CET 2007


Mike,

Thanks for the reply.  After sending this message yesterday, I 
discovered the same thing as you did. Building RRDTool on Windows is far 
from easy.

I have found a binary for 1.2.19 at http://www.gknw.net/mirror/rrdtool/ 
and plan to use your same technique but with Java using Runtime.exec().

The lack of documentation on how to actually install RRDTool was the 
major stumbling block for me.  In the end I decided to simply drop the 
tool in a directory in the root of my C:/ drive and open a command 
prompt from there.  That worked.  Sometimes the simplest answer is the 
correct one.  It wouldn't hurt to document that for us paranoid older dudes!

Unlike building RRDTool there do not appear to be any actual environment 
variables needed for running RRDTool in this way.  That probably does 
not hold if you wish to do fancier things such as a CGI process on  a 
web server.

Thanks for your help.

David

David W. Taylor
Developer | SL Corporation | http://www.sl.com

david.taylor at sl.com <mailto: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.



Mike Johnson wrote:
>
> 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 <mailto: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.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20070216/fd09855a/attachment.htm 


More information about the rrd-users mailing list