[prev in list] [next in list] [prev in thread] [next in thread]
List: rrd-users
Subject: [rrd-users] CDEF question
From: DEIGNAN Ciaran <C.DEIGNAN () rsd ! com>
Date: 2015-11-05 15:31:42
Message-ID: DB5PR01MB15128EA0853E1A2D43010119F3290 () DB5PR01MB1512 ! eurprd01 ! prod ! exchangelabs ! com
[Download RAW message or body]
Hi All,
I want to use RRDtool to show information about users connected to an internal \
application. I want the application to expose the following information
nec => number of connections ended,
tec => cumulative time of ended connections,
noc => current open connections
> From these stats I'd like to get the average time of connections, once they're \
> closed.
Basically I want to graph (nec2 - nec1) / (tec2 - tec1)
However if I declare nec and tec as counters can I use a CDEF to divide the time by \
the number of connections ? I don't think that does what I want.
Can someone give me an example of how to do this?
Currently I have this
rrdtool create connections.rrd --start "20100101 00:00" --step 1 \
DS:nec:COUNTER:86400:0:4294967295 \
DS:tec:COUNTER:86400:0:4294967295 \
DS:noc:GAUGE:86400:0:4294967295 \
RRA:AVERAGE:0.5:1:86400 \
RRA:AVERAGE:0.5:60:46080 \
RRA:AVERAGE:0.5:3600:43920 \
rrdtool graph test-1hour.png -w 1024 -h 512 \
--start end-1h --end now \
DEF:NCNX=connections.rrd:noc:AVERAGE \
DEF:NEND=connections.rrd:nec:AVERAGE \
DEF:SUMTIME=connections.rrd:tec:AVERAGE \
CDEF:AVTIME=SUMTIME,NEND,/ \
LINE2:NCNX#0000FF:"current connections\l" \
LINE2:NEND#CC00FF:"Closed connections\l" \
LINE2:AVTIME#00CCFF:"Connection Duration\l" \
Thanks,
Ciaran Deignan
RSD Open Systems Support
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hi \
All,<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">I want \
to use RRDtool to show information about users connected to an internal \
application.<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span style="font-size:11.0pt">I want the application to expose the \
following information<o:p></o:p></span></font></p> <p class="MsoNormal"><font \
size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">nec \
=> number of connections ended,<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">tec \
=> cumulative time of ended connections,<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">noc \
=> current open connections<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">From \
these stats I’d like to get the average time of connections, once they’re \
closed.<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span style="font-size:11.0pt">Basically I want to graph (nec2 - nec1) \
/ (tec2 - tec1)<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt">However if I declare nec and tec as counters can I use a \
CDEF to divide the time by the number of connections ? <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">I \
don’t think that does what I want.<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Can \
someone give me an example of how to do this?<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt">Currently I have this<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt">rrdtool create connections.rrd --start "20100101 \
00:00" --step 1 \<o:p></o:p></span></font></p> <p class="MsoNormal"><font \
size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
DS:nec:COUNTER:86400:0:4294967295 \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
DS:tec:COUNTER:86400:0:4294967295 \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
</span></font><span lang="FR-CH">DS:noc:GAUGE:86400:0:4294967295 \
\<o:p></o:p></span></p> <p class="MsoNormal"><font size="2" face="Calibri"><span \
lang="FR-CH" style="font-size:11.0pt"> \
RRA:AVERAGE:0.5:1:86400 \<o:p></o:p></span></font></p> <p class="MsoNormal"><font \
size="2" face="Calibri"><span lang="FR-CH" \
style="font-size:11.0pt"> \
</span></font><font size="2"><span style="font-size:10.0pt">RRA:AVERAGE:0.5:60:46080 \
\<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span \
style="font-size:11.0pt"> \
RRA:AVERAGE:0.5:3600:43920 \<o:p></o:p></span></font></p> <p class="MsoNormal"><font \
size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt">rrdtool graph test-1hour.png -w 1024 -h 512 \
\<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span \
style="font-size:11.0pt"> --start end-1h \
--end now \<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span \
style="font-size:11.0pt"> \
DEF:NCNX=connections.rrd:noc:AVERAGE \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
DEF:NEND=connections.rrd:nec:AVERAGE \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
DEF:SUMTIME=connections.rrd:tec:AVERAGE \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
CDEF:AVTIME=SUMTIME,NEND,/ \<o:p></o:p></span></font></p> <p class="MsoNormal"><font \
size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
LINE2:NCNX#0000FF:"current connections\l" \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
LINE2:NEND#CC00FF:"Closed connections\l" \<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"> \
LINE2:AVTIME#00CCFF:"Connection Duration\l" \<o:p></o:p></span></font></p> \
<p class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt">Thanks,<o:p></o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt"><o:p> </o:p></span></font></p> <p \
class="MsoNormal"><font size="2" face="Calibri"><span \
style="font-size:11.0pt;mso-fareast-language:EN-GB">Ciaran \
Deignan<o:p></o:p></span></font></p> <p class="MsoNormal"><font size="2" \
face="Calibri"><span style="font-size:11.0pt;mso-fareast-language:EN-GB">RSD Open \
Systems Support<o:p></o:p></span></font></p> </div>
</body>
</html>
_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--===============5476425660544988180==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic