<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mike,<br>
<br>
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.<br>
<br>
I have found a binary for 1.2.19 at <a class="moz-txt-link-freetext" href="http://www.gknw.net/mirror/rrdtool/">http://www.gknw.net/mirror/rrdtool/</a>
and plan to use your same technique but with Java using Runtime.exec().<br>
<br>
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!<br>
<br>
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.<br>
<br>
Thanks for your help.<br>
<br>
David<br>
<br>
<div class="moz-signature">
<div class="Section1">
<pre>David W. Taylor
Developer | SL Corporation | <a href="http://www.sl.com">http://www.sl.com</a></pre>
<pre><a href="mailto:david.taylor@sl.com">david.taylor@sl.com</a> | Tel: +1.415.927.8555 | Fax: +1.415.927.8401</pre>
<div class="MsoNormal" style="text-align: center;" align="center">
<hr align="center" size="2" width="100%"></div>
<p class="MsoNormal"><span style="font-size: 10pt;">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.<br>
</span></p>
</div>
</div>
<br>
<br>
Mike Johnson wrote:
<blockquote cite="mid001301c751ca$a4076460$33e018ac@qcl.quick.co.jp"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<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>
<div class="Section1">
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy"
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">#</span></font><font
color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">
</span></font><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; 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 color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">public
static void CallRRDTool(string cmd)</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">{</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
lock (sync) // rrdtool may not be thread safe</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
{</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
Process rrdtool = new
Process();</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.FileName =
"RRDTool.exe";</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.CreateNoWindow = true;</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.UseShellExecute = false;</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.RedirectStandardError = true;</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.RedirectStandardOutput = true;</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.StartInfo.Arguments =
cmd;</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;"> </span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.Start();</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
rrdtool.WaitForExit(2000);</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;"> </span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
string output =
rrdtool.StandardOutput.ReadToEnd().Trim();</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
if (output.Length != 0)</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
{</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
logmsg("RRDtool Stdout: " + output);</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
logmsg("RRDtool
Cmd: " + cmd);</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
}</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
output =
rrdtool.StandardError.ReadToEnd().Trim();</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
if (output.Length != 0)</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
{</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
logmsg("RRDtool Stderr: " + output);</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
logmsg("RRDtool Cmd: " + cmd);</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
}</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">
}</span></font></p>
<p class="MsoNormal" style=""><font color="black" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: windowtext;">}</span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal" style="margin-left: 36pt;"><font color="black"
face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; color: windowtext;"
lang="EN-US">-----Original Message-----<br>
<b><span style="font-weight: bold;">From:</span></b>
<a class="moz-txt-link-abbreviated" href="mailto:rrd-users-bounces@lists.oetiker.ch">rrd-users-bounces@lists.oetiker.ch</a>
[<a class="moz-txt-link-freetext" href="mailto:rrd-users-bounces@lists.oetiker.ch">mailto:rrd-users-bounces@lists.oetiker.ch</a>] <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>
<a class="moz-txt-link-abbreviated" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><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: 36pt;"><font color="black"
face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="MsoNormal" style="margin-left: 36pt;"><font color="black"
face="Times New Roman" size="3"><span style="font-size: 12pt;">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: 36pt;"><font color="black"
face="Times New Roman" size="3"><span style="font-size: 12pt;">-- </span></font></p>
<div>
<pre style="margin-left: 36pt;"><font color="black" face="Courier New"
size="2"><span style="font-size: 10pt;">David W. Taylor</span></font></pre>
<pre style="margin-left: 36pt;"><font color="black" face="Courier New"
size="2"><span style="font-size: 10pt;">Developer | SL Corporation | <a
href="http://www.sl.com">http://www.sl.com</a></span></font></pre>
<pre style="margin-left: 36pt;"><font color="black" face="Courier New"
size="2"><span style="font-size: 10pt;"><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" style="margin-left: 36pt; text-align: center;"
align="center"><font color="black" face="Times New Roman" size="3"><span
style="font-size: 12pt;">
<hr align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal" style="margin-left: 36pt;"><font color="black"
face="Times New Roman" size="2"><span style="font-size: 10pt;">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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rrd-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>
<a class="moz-txt-link-freetext" href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a>
</pre>
</blockquote>
</body>
</html>