<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);">Hello!</span></span><div><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);"><br></span></span></div><div><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);">I have an esthetic question for my graphs. I take the number of users on a shoutcast server every 5 minutes. I obtain this kind of graph:</span></span></div><div><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);">http://ozone-serveur.com/graphs/9608-test-day.png</span></span></span><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);"><br></span></span></div><div><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);"><br></span></span></span></div><div><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);">As you can see, it creates some little "stairs" and not a linear graph such as <span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 12px; ">http://oss.oetiker.ch/rrdtool/gallery/btdmd8.png</span></span></span></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">There are my files:</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">#!/bin/bash
RRDTOOL="/usr/bin/rrdtool"
START=$(date +%s)
RRDB="/home/servid/9608/graph/rivendell.rrd"
STEP=300
$RRDTOOL create $RRDB --start $START --step $STEP \
DS:rivendell:GAUGE:600:0:50 \
RRA:AVERAGE:0.5:1:288 \
RRA:AVERAGE:0.5:4:504 \
RRA:AVERAGE:0.5:12:744 \
RRA:MAX:0.5:1:288 \
RRA:MAX:0.5:4:504 \
RRA:MAX:0.5:12:744 \</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">
</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">#!/bin/bash
MY_IP="XXX.XXX.XXX.XXX"
MY_PORT="9608"
NB=$(SCRIPT_GET_NB.SH)
RRDTOOL=/usr/bin/rrdtool
RRD="/home/servid/9608/graph/rivendell.rrd"
echo "$RRDTOOL update $RRD N:${NB}"
$RRDTOOL update $RRD N:${NB}
GRAPH="/home/www/graphs/${MY_PORT}"
RRDB="/home/servid/9608/graph/rivendell.rrd"
START=$(date --date="-24 hours" +%s)
END=$(date +%s)
GRAPHTITLE="Fréquentation Serveur Streaming s1.gryware.com:${MY_PORT}"
for i in -86400 -604800 -2678400
do
if [ $i == -86400 ]
then
GRAPH2="${GRAPH}-test-day.png"
fi
if [ $i == -604800 ]
then
GRAPH2="${GRAPH}-test-week.png"
fi
if [ $i == -2678400 ]
then
GRAPH2="${GRAPH}-test-month.png"
fi
$RRDTOOL graph "${GRAPH2}" \
--start ${i} \
--end $END \
--vertical-label "Auditeurs Connectés" \<br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"> --title "${GRAPHTITLE}" -w 500 \
--units-exponent 0 --imgformat PNG \
--upper-limit=12 \
--lower-limit=0 \
--color CANVAS#FFFFFF \
--color BACK#F0F0F0 \
--color FONT#000000 \
--color MGRID#cccccc \
--color GRID#6699CC \
--color FRAME#000000 \
--color ARROW#000000 \
--color SHADEA#A0A0A0 \
--color SHADEB#A0A0A0 \
DEF:rivendell=${RRD}:rivendell:AVERAGE \
CDEF:dessous=rivendell,100,*,100,/ \
CDEF:Ln1=rivendell,rivendell,UNKN,IF \
VDEF:avg=rivendell,AVERAGE \
COMMENT:"\n" \
COMMENT:"Fréquentation Stream " \
COMMENT:"Maximum Minimum Moyenne Dernier\n" \
AREA:dessous#ECD748:"Auditeurs Connectés " \
LINE1:Ln1#C9B215 \
GPRINT:rivendell:MAX:"%2.0lf " \
GPRINT:rivendell:MIN:"%2.0lf " \
GPRINT:rivendell:AVERAGE:"%2.0lf " \
GPRINT:rivendell:LAST:"%2.0lf " \
COMMENT:"\n" \
HRULE:avg#EC9D48:"Moyenne"
done</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">
</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">How do you think i can create an homogeneous, beautiful and great graph?</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">Thanks for you help!</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: pre;">Pierre.S</span></div><br /><hr />Discutez sur Messenger où que vous soyez ! <a href='http://www.messengersurvotremobile.com/' target='_new'>Mettez Messenger sur votre mobile !</a></body>
</html>