<div dir="ltr"><div><div><div>Thank you very much Steve.<br><pre><span class="im">rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE <br></span> <b> CDEF:customvar=out,POP,123</b>
XPORT:out:"out bytes" <br> XPORT:<b>customvar</b>:"Temp" >> /home/temp/abc.xml<br></pre><br></div>I tried as you suggested. However, I am getting the error "ERROR: invalid rpn expression in: d1,POP,123" .<br></div>Then I tried using TIME function, which worked fine. Is it that we can use POP function only for time variables?<br><br></div>My requirement is to return the PATH of the database as a STRING in the xml. Is it possible to do so? Or the stack can handle only Time variables or numbers?<br><div><div><pre><span class="im">rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE <br></span> <b> CDEF:customvar=out,POP,"/path/to/if1-inouts.rrd"</b>
XPORT:out:"out bytes" <br> XPORT:<b>customvar</b>:"Temp" >> /home/temp/abc.xml<br><br></pre><pre>Thanks again.<br></pre></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 3:48 AM, Steve Shipway <span dir="ltr"><<a href="mailto:s.shipway@auckland.ac.nz" target="_blank">s.shipway@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Set up an additional CDEF.<br>
<pre><span class="">rrdtool xport
DEF:out=if1-inouts.rrd:outoctets:AVERAGE <br></span> <b>CDEF:customvar=out,POP,12345</b>
XPORT:out:"out bytes" <br> XPORT:<b>customvar</b>:"Temp" >> /home/temp/abc.xml</pre>
Now you'll get a column with '12345' in it next to the outoctets column.<br>
<br>
Note that you need the 'out,POP' to make customvar a time series, although you throw away the original 'out' value. You can't just use 'CDEF:customvar=12345'.<br>
<br>
Steve<br>
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><strong>Steve Shipway</strong></div>
<div style="font-family:Tahoma;font-size:13px">University of Auckland ITS</div>
<div style="font-family:Tahoma;font-size:13px"><em>UNIX Systems Design Lead</em></div>
<div style="font-family:Tahoma;font-size:13px"><a href="mailto:s.shipway@auckland.ac.nz" target="_blank">s.shipway@auckland.ac.nz</a></div>
<div style="font-family:Tahoma;font-size:13px">Ph: +64 9 373 7599 ext 86487</div>
<div style="font-family:Tahoma;font-size:13px"><em></em> </div>
</div>
</div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> rrd-users [rrd-users-bounces+s.shipway=<a href="mailto:auckland.ac.nz@lists.oetiker.ch" target="_blank">auckland.ac.nz@lists.oetiker.ch</a>] on behalf of Utpal Bora [<a href="mailto:cs14mtech11017@iith.ac.in" target="_blank">cs14mtech11017@iith.ac.in</a>]<br>
<b>Sent:</b> Friday, 27 March 2015 3:57 a.m.<br>
<b>To:</b> <a href="mailto:rrd-users@lists.oetiker.ch" target="_blank">rrd-users@lists.oetiker.ch</a><br>
<b>Subject:</b> [rrd-users] Help in RRD XPORT<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hello Everyone,<br>
<br>
</div>
I am working on a Network Visualization project using RRDTool for my graduate course on Network Engineering.
<br>
<br>
</div>
I want to use the export feature of RRDtool to create an XML where I want to add some hard coded values(DS not in RRD) to the xml.<br>
</div>
However, I could not find a solution as of yet.<br>
</div>
Please assist me on this.<br>
<br>
</div>
What I am trying to do - <br>
<pre>rrdtool xport \
DEF:out=if1-inouts.rrd:outoctets:AVERAGE \
XPORT:out:"out bytes" >> /home/temp/abc.xml<br> XPORT:"SOME_CUSTOM_VALUE":"Temp" >> /home/temp/abc.xml<br><br>Here I want to append SOME_CUSTOM_VALUE to the output xml, which I am not able to do as SOME_CUSTOM_VALUE is not present in the database.</pre>
<pre><br></pre>
<br>
<div>
<div><br>
<div>
<div>
<div>
<div><br clear="all">
<div><br>
-- <br>
<div>
<div dir="ltr">
<div>
<div>Regards,<br>
<br>
</div>
Utpal Bora<br>
</div>
<div>M. Tech 1st year<br>
</div>
Computer Science & Engineering<br>
</div>
<div>IIT Hyderabad<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Regards,<br><br></div>Utpal Bora<br></div><div>M. Tech 1st year<br></div>Computer Science & Engineering<br><br></div></div>
</div>