<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:99.25pt 3.0cm 3.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body bgcolor=white lang=EN-GB link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I started trying to link to RRDtool, but even
trying to compile it for Windows is very difficult.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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</span></font><font size=2 color=navy
face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:Arial;
color:navy'>#</span></font><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>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.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’m using version 1.2.15, which is
the latest windows binary I could find.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>public static void CallRRDTool(string cmd)</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>{</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> lock (sync) // rrdtool may not be thread safe</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> {</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> Process rrdtool = new
Process();</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> rrdtool.StartInfo.FileName =
"RRDTool.exe";</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
rrdtool.StartInfo.CreateNoWindow = true;</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
rrdtool.StartInfo.UseShellExecute = false;</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
rrdtool.StartInfo.RedirectStandardError = true;</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
rrdtool.StartInfo.RedirectStandardOutput = true;</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> rrdtool.StartInfo.Arguments =
cmd;</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> rrdtool.Start();</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> rrdtool.WaitForExit(2000);</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> string output =
rrdtool.StandardOutput.ReadToEnd().Trim();</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> if (output.Length != 0)</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> {</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
logmsg("RRDtool Stdout: " + output);</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> logmsg("RRDtool
Cmd: " + cmd);</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> }</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> output =
rrdtool.StandardError.ReadToEnd().Trim();</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> if (output.Length != 0)</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> {</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
logmsg("RRDtool Stderr: " + output);</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>
logmsg("RRDtool Cmd: " + cmd);</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> }</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'> }</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>}</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
rrd-users-bounces@lists.oetiker.ch [mailto:rrd-users-bounces@lists.oetiker.ch] <b><span
style='font-weight:bold'>On Behalf Of </span></b>David Taylor<br>
<b><span style='font-weight:bold'>Sent:</span></b> 15 February 2007 19:08<br>
<b><span style='font-weight:bold'>To:</span></b> rrd-users@lists.oetiker.ch<br>
<b><span style='font-weight:bold'>Subject:</span></b> [rrd-users] Call for
help: Windows developer trying to getstarted...</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt'>Hello folks,<br>
<br>
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.<br>
<br>
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.<br>
<br>
If possible I would like to get started without having to build RRDTool itself.<br>
<br>
Our intention is to integrate RRDTool with a Windows-based and Java-based
proprietary solution.<br>
<br>
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.<br>
<br>
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?<br>
<br>
Thanks in advance.<br>
<br>
David</span></font></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt'>-- </span></font></p>
<div><pre style='margin-left:36.0pt'><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>David W. Taylor</span></font></pre><pre
style='margin-left:36.0pt'><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>Developer | SL Corporation | <a
href="http://www.sl.com">http://www.sl.com</a></span></font></pre><pre
style='margin-left:36.0pt'><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><a href="mailto:david.taylor@sl.com">david.taylor@sl.com</a> | Tel: +1.415.927.8555 | Fax: +1.415.927.8401</span></font></pre>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face="Times New Roman"><span style='font-size:10.0pt'>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.</span></font></p>
</div>
</div>
</div>
</body>
</html>