You can also save your data to RRD container locally, which is how I do mine. The database is self truncated. All you do is generate a graph at whatever interval you want. Seconds, minutes, hours, days, months or years. I find it much simpler and nicer than mySQL. Here is a sample output from today.
…
if you are a bit confused by my output display
KW = 1000 watts
1 mKW = 1 watts
and
100 uKW = 1 watt
My sampling interval is about once a second. For my graphs, which are generated every couple minutes by a cron job, one year of data is about 60 megs per sensor at that interval.
ah – I believe the issue of m and u is common to rrd when related to kw if you/l save as watts then it not an issue… I save my data in kiliowatts so I have the small issue of m and u
here a sample of my script to produce the graph it does not matter if you use KW, kw or kW it always inserts the m & u
The relevant line on that page: You should store them using GAUGE (as kW is already a rate). In fact, multiply by 1000 and store, as then you’re storing as Watt or Joules/sec, the SI unit, which is Best Practice.
thank you bill
yes i know - i already stated if I saved as watts ( or any base unit) it not an issue I saved as kw in rrd container . so I have the small issue of m and u - i do not mind the m and u. yes i can adjust my bottom display line correctly . but the vertical line would still have the same issue as you can not really control that display output . I left the script as is for a variety of reasons … if I used watts instead kw then everything works out of the box for me or what ever unit I use be it temperature lux wind speed or what have you… i am lazy I do not feel like adjusting all the small details… especially if it just a minor detail of format–
P.S
if you want the above script to generate a RRD graph proper format then save your units in rrd container as a base unit. ie metre, Celsius, watt, joules, litre etc … then above script will display properly . I just used kW because it shorten the display attributes… ie 1500watts to 1.5 kW . as normally it does not shorten the display attribute until it reaches +10Kw. and for me that a alot messier then an incorrect format of mKW as I rarely reach 10kw in usage
It is not just a question of format. If you are posting information in a public forum, is it wrong to ensure that your units and abbreviations are correct, comply with internationally agreed practice and, more to the point, don’t confuse somebody who might be struggling to understand the topic and, possibly even more importantly, teach them the correct practice?
if one saves to rrd container as watts or any base metric unit ( litre, metre, joules, or gram) use this a to generate your graph
the kw listed ie ( DEF:kw=wind.rrd:kw:AVERAGE ) is just the name of the data container within the larger RRD file , you can put multiple data containers with in single RRD file . if using units other then watts just change the watts to match your unit ie grams GPRINT:kw:AVERAGE:"%6.4lf%swatts" to GPRINT:kw:AVERAGE:"%6.4lf%sgrams"
if one saves data as kW in the RRD container ( but it will still display incorrectly on the vertical display as any listed data below 1kW will still be listed as m) as you have no control of that…