[one-users] Suggestion of possibility feature

Carlos Martín Sánchez cmartin at opennebula.org
Fri Sep 21 03:41:03 PDT 2012


Hi,

I completely forgot that you can actually customize the columns of the
table now [1]

$ mkdir -p ./.one/cli/
$ cp /etc/one/cli/oneacct.yaml ./.one/cli/

And then just edit the :default attribute to show the ones you need


Regards

[1] http://opennebula.org/documentation:rel3.6:cli
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>



On Thu, Sep 20, 2012 at 2:21 PM, Jan Benadik <jan.benadik at atos.net> wrote:

>  Hi,
>
>
> Dňa 20.09.2012 11:51, Carlos Martín Sánchez wrote / napísal(a):
>
>
>> - time frame defined running state (when VM is deployed, it can be
>> specified to run and stop it at certain time, i.e. start daily at 6.00 AM
>> and stop 20.00 PM in working days only OR deployment of VM for time limited
>> period - i.e. 2 months - and after that period VM will be stopped / deleted
>> automatically).
>>
>
>  This is a good idea, I've opened a ticket [1] and we'll consider it for
> next releases.
> It could be implemented adding new attributes to the VMs, and the
> scheduler would simply compare the requested deployment/shutdown time with
> the current date.
>
>
>
> Nice to hear it :-)
>
>
>
>   - more detailed granularity for oneacct reports (number of minutes VM
>> is running, number of CPU cores)
>>
>
>  This information is already available, although it requires some
> scripting. oneacct was designed to be used to extract raw accounting data
> from opennebula, to be as flexible as possible. The downside to it is that
> it requires some processing to make use of the data.
>
> The specific example you propose can be done in ruby parsing the json
> output of oneacct:
>
> j = JSON.parse(`oneacct -j`)
>
> puts "oid,minutes_running,cpus"
>
> j['HISTORY_RECORDS']['HISTORY'].each do |h|
>     puts "#{h['OID']},"<<
>         "#{(h['ETIME'].to_i - h['STIME'].to_i)/60},"<<
>          "#{h['VM']['TEMPLATE']['CPU']}"
> end
>
>  # oid,minutes_running,cpus
> # 0,132,1
> # 1,131,1
> # 2,131,1
> # 3,131,1
> # 4,131,1
> # 5,130,1
>
>  I'm aware that this script takes some familiarity with the OpenNebula
> data structures, so maybe we could make things easier...
> The first thing that comes to mind is to add an option to customize the
> table, something like
> 'oneacct --columns VID,CPU,MEMORY'
>
>  This could be combined with new columns that require some processing,
> like RUNNING_TIME.
>
>  What do you think about this? What other values should we add?
>
>
> I think this is enough for now. Maybe next time somebody will have a new
> idea to extend it.
> I'll try that script (to be honest, I'm not so strong in scripting,
> especially in ruby ...)
>
>
> Jan
>
> --
>
> *Ján Beňadik*
>  Managed Services - Solution Design Architect
> mobile: +421 903 691 634
> fax: +421 2 6852 8380
> jan.benadik at atos.net <//jan.benadik at atos.net>
> Vinohradnicka 6, 971 01 Prievidza
> www.sk.atos.net
> __________________________________
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120921/6e2501e3/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 281 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120921/6e2501e3/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1723 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120921/6e2501e3/attachment-0005.gif>


More information about the Users mailing list