Attached is my now functional ruby script to generate test / demo rrd data and the oVirt patch required to get it working (a few small code tweaks / fixes and a few fixture modifications). 1. To generate the data data simply run `ruby demo-rrd-data.rb`. There are a few variables at the top of the script which you can tweak to configure things like nodes generated, cpu's per node, interval in seconds between data points, etc. 2. To see the test data, you need to be running rails in the testing environment and have a populated ovirt_test db. This can be accomplished by running the tests once (eg 'rake test') 3. Alot of data needs to be generated, thus the script is slow (at least on my system), and it isn't yet set to generate the number of data points in a time period that collectd does / oVirt is expecting (change the $interval variable at the top of the script from 60 to 10 to do this, but this will be all the more slower). Since the graphs require more data points than it is currently getting, they appear a bit discrete. Perhaps we can correct this and run it on a faster machine and just send out and use the data set generated. Alternatively, I could disable some of the algorithms used to generated data and simply reuse data points for some of the graphs if series repetition is not a problem. -Mo -------------- next part -------------- A non-text attachment was scrubbed... Name: demo-rrd-data.rb Type: application/x-ruby Size: 10852 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080805/75f311b1/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: ovirt-rrd-test-data.patch Type: text/x-patch Size: 4660 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080805/75f311b1/attachment-0001.bin>
Mohammed Morsi wrote:> Attached is my now functional ruby script to generate test / demo rrd > data and the oVirt patch required to get it working (a few small code > tweaks / fixes and a few fixture modifications). > > 1. To generate the data data simply run `ruby demo-rrd-data.rb`. There > are a few variables at the top of the script which you can tweak to > configure things like nodes generated, cpu's per node, interval in > seconds between data points, etc. > 2. To see the test data, you need to be running rails in the testing > environment and have a populated ovirt_test db. This can be accomplished > by running the tests once (eg 'rake test') > 3. Alot of data needs to be generated, thus the script is slow (at least > on my system), and it isn't yet set to generate the number of data > points in a time period that collectd does / oVirt is expecting (change > the $interval variable at the top of the script from 60 to 10 to do > this, but this will be all the more slower). Since the graphs require > more data points than it is currently getting, they appear a bit > discrete. Perhaps we can correct this and run it on a faster machine and > just send out and use the data set generated. Alternatively, I could > disable some of the algorithms used to generated data and simply reuse > data points for some of the graphs if series repetition is not a problem. > > -Mo >Mo Looks like the script ran for a while. It generated the device dirs but it did not generate the .rrd files. So I have /var/lib/collectd/rrd-test/node0/cpu-0 but it is an empty directory. Debugging now... -mark
Mohammed Morsi wrote:> Attached is my now functional ruby script to generate test / demo rrd > data and the oVirt patch required to get it working (a few small code > tweaks / fixes and a few fixture modifications). > > 1. To generate the data data simply run `ruby demo-rrd-data.rb`. There > are a few variables at the top of the script which you can tweak to > configure things like nodes generated, cpu's per node, interval in > seconds between data points, etc. > 2. To see the test data, you need to be running rails in the testing > environment and have a populated ovirt_test db. This can be > accomplished by running the tests once (eg 'rake test') > 3. Alot of data needs to be generated, thus the script is slow (at > least on my system), and it isn't yet set to generate the number of > data points in a time period that collectd does / oVirt is expecting > (change the $interval variable at the top of the script from 60 to 10 > to do this, but this will be all the more slower). Since the graphs > require more data points than it is currently getting, they appear a > bit discrete. Perhaps we can correct this and run it on a faster > machine and just send out and use the data set generated. > Alternatively, I could disable some of the algorithms used to > generated data and simply reuse data points for some of the graphs if > series repetition is not a problem. > > -MoNACK for several reasons: 1) the test generator is not working for me, still debugging. Could be "cockpit error", but it seems pretty simple and standalone... 2) Changes to graph_controller.rb, Should not be changing the ints to floats, we want the values as ints, that's why it was done. 3) changes to Stats.rb - Stats is intentionally decoupled from RAILS. One of the reasons is so that stats can be run on a separate machine in order to help offload the ovirt server. While this functionality is not yet implemented, your proposed change will cause a dependency. The change also rules out low-level stats tests being run correctly outside of the RAILS env. I will look at adding a hook in Stats to be able to specify regular or test mode, defaulting to regular -mark
Mohammed Morsi wrote:> Attached is my now functional ruby script to generate test / demo rrd > data and the oVirt patch required to get it working (a few small code > tweaks / fixes and a few fixture modifications). >Updated the script to circumvent the max string command problem. Now after intervals_per_command intervals, the scripts runs a rrdupdate command and resets the data list. The script now seems to work, even with an interval of 10 seconds, which is what collectd would normally generate. -Mo -------------- next part -------------- A non-text attachment was scrubbed... Name: demo-rrd-data.rb Type: application/x-ruby Size: 11788 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080807/400cafa4/attachment.bin>