DMKlein
29.11.06, 21:30
Hi,
ich möchte den Traffic meines Servers im aktuellen monat pro Tag ausgeben.
Ich schaffe es zwar alles als XML auszugeben, doch irgendwie weiß ich nicht wie ich da weiter vorgehen soll. Hier mal mein Aufruf:
rrdtool xport DEF:out1=/var/www/html/rrd/vps-1004.rrd:ds0:AVERAGE DEF:out2=/var/www/html/rrd/vps-1004.rrd:ds1:AVERAGE CDEF:sum=out1,out2,+ XPORT:out1:"if1 out bytes" XPORT:out2:"if2 out bytes"
Und das kommt dabei dann raus:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xport>
<meta>
<start>1164748800</start>
<step>300</step>
<end>1164835200</end>
<rows>289</rows>
<columns>2</columns>
<legend>
<entry>if1 out bytes</entry>
<entry>if2 out bytes</entry>
</legend>
</meta>
<data>
<row><t>1164831300</t><v>4.7011904108e+06</v><v>4.7011904108e+06</v></row>
<row><t>1164831600</t><v>4.7802712914e+06</v><v>4.7802712914e+06</v></row>
<row><t>1164831900</t><v>4.7705721432e+06</v><v>4.7705721432e+06</v></row>
<row><t>1164832200</t><v>4.7715076543e+06</v><v>4.7715077329e+06</v></row>
<row><t>1164832500</t><v>4.7883969188e+06</v><v>4.7883964535e+06</v></row>
<row><t>1164832800</t><v>4.7749352100e+06</v><v>4.7749352100e+06</v></row>
<row><t>1164833100</t><v>4.7778544376e+06</v><v>4.7778545310e+06</v></row>
<row><t>1164833400</t><v>4.9804475950e+06</v><v>4.9804475950e+06</v></row>
<row><t>1164833700</t><v>4.9800028049e+06</v><v>4.9800028049e+06</v></row>
<row><t>1164834000</t><v>4.9530844344e+06</v><v>4.9530844344e+06</v></row>
<row><t>1164834300</t><v>4.9483265144e+06</v><v>4.9483266286e+06</v></row>
<row><t>1164834600</t><v>4.9757158044e+06</v><v>4.9757158044e+06</v></row>
<row><t>1164834900</t><v>4.9907296779e+06</v><v>4.9907294513e+06</v></row>
<row><t>1164835200</t><v>NaN</v><v>NaN</v></row>
</data>
</xport>
Jemand ne Idee??? Wie muss ich da umrechnen? Oder kann ich die Ausgabe überhaut brauchbar verwenden???
ich möchte den Traffic meines Servers im aktuellen monat pro Tag ausgeben.
Ich schaffe es zwar alles als XML auszugeben, doch irgendwie weiß ich nicht wie ich da weiter vorgehen soll. Hier mal mein Aufruf:
rrdtool xport DEF:out1=/var/www/html/rrd/vps-1004.rrd:ds0:AVERAGE DEF:out2=/var/www/html/rrd/vps-1004.rrd:ds1:AVERAGE CDEF:sum=out1,out2,+ XPORT:out1:"if1 out bytes" XPORT:out2:"if2 out bytes"
Und das kommt dabei dann raus:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xport>
<meta>
<start>1164748800</start>
<step>300</step>
<end>1164835200</end>
<rows>289</rows>
<columns>2</columns>
<legend>
<entry>if1 out bytes</entry>
<entry>if2 out bytes</entry>
</legend>
</meta>
<data>
<row><t>1164831300</t><v>4.7011904108e+06</v><v>4.7011904108e+06</v></row>
<row><t>1164831600</t><v>4.7802712914e+06</v><v>4.7802712914e+06</v></row>
<row><t>1164831900</t><v>4.7705721432e+06</v><v>4.7705721432e+06</v></row>
<row><t>1164832200</t><v>4.7715076543e+06</v><v>4.7715077329e+06</v></row>
<row><t>1164832500</t><v>4.7883969188e+06</v><v>4.7883964535e+06</v></row>
<row><t>1164832800</t><v>4.7749352100e+06</v><v>4.7749352100e+06</v></row>
<row><t>1164833100</t><v>4.7778544376e+06</v><v>4.7778545310e+06</v></row>
<row><t>1164833400</t><v>4.9804475950e+06</v><v>4.9804475950e+06</v></row>
<row><t>1164833700</t><v>4.9800028049e+06</v><v>4.9800028049e+06</v></row>
<row><t>1164834000</t><v>4.9530844344e+06</v><v>4.9530844344e+06</v></row>
<row><t>1164834300</t><v>4.9483265144e+06</v><v>4.9483266286e+06</v></row>
<row><t>1164834600</t><v>4.9757158044e+06</v><v>4.9757158044e+06</v></row>
<row><t>1164834900</t><v>4.9907296779e+06</v><v>4.9907294513e+06</v></row>
<row><t>1164835200</t><v>NaN</v><v>NaN</v></row>
</data>
</xport>
Jemand ne Idee??? Wie muss ich da umrechnen? Oder kann ich die Ausgabe überhaut brauchbar verwenden???