Tango Archiving

Hello Balkrishna

No, sorry, there is no shortcut, unless you write a script to do that…

Regards,

Raphaël Girardot

Hi Rapheal

In View Configuration panel of Mambo, You can see the retrieved data. Also When you right click, you can save the data by clicking on save data file.
Now I want to save that data automatically on My PC daily. How could I achieve it ? Where do I have to configure the settings ?

Thanks and Regards
TCS-GMRT Team

Hello

The option to save data file is poposed by the Chart Mambo uses. This is not really a feature proposed by Mambo itself, and there is no way to do such things automatically using Mambo.

However, you might use scripts to interact with HdbExtractor and TdbExtractor devices.

Regards,

Raphaël Girardot

Hi Rapheal

Thanks for the suggestions to above questions.

Also in TDB, I am not able to export the data to TDB. What is the reason? What DbPath, DsPath I have to set?
Could you please explain by some example ??

Thanks and Regards
TCS-GMRT Team

Hello

Each TdbArchiver has 2 mandatory properties
DbPath
DsPath

DsPath is the path at which the archiver can write its file before eporting data to TDB
DbPath is the path at which the DataBase can read the file.

The reason of this is quite simple : HDB and TDB do not write data at the same frequency. Data writing is more frequent in TDB. As archiving project started, high rate data writing in database could not be done, due to too slow databases and/or connections. So, as a workaround, it was decided for TDB to buffer data in files (at DsPath folder) that should be read by the database later.

With MySQL, we use the LOAD DATA LOCAL INFILE with DbPath.

Generally, DbPath and DsPath will have the same value.

So, of course, if your DbPath and DsPath do not match a valid directory, data won’t be written in database.

And if you ask me why 2 attributes instead of 1, I really don’t remember, but as it was created this way and it worked like this since a long time now, we did not take neither time nore risk to change it.

I hope these explanations will help you with your data export problem.

Regards,

Raphaël Girardot

Hello Team,

Thank you for all the above answers and it helped a lot.

I’m currently exploring data archiving with Tango and able to archive the data successfully with HDB (MySQL). I learned that HDB supports Oracle/MySQL and HDB++ supports Cassandra at back-end.

Here are the stuffs on which I need help:

  • 1. Link to download HDB++ & its GUI(Not present in downloads tab of the Tango site). If HDB++ is not released yet, may I get any Beta copy to explore further? Also checked on sourceforge.net but could not interpret further.
  • 2. Any documentation/guidance on how to use HDB++ other than the EventSubscriber & ConfigurationManager class details; like HDB?
  • 3. Just for curiosity, is it possible to have Cassandra compability with HDB?

Eagerly waiting for the reply.

Kind regards,
Jyotin Ranpura

Hello. Concerning your 3rd question, there is a discussion about reunifying the archiving systems, so that mambo may extract your data whatever the archiving system you used. And it implies having HDB compatible with cassendra. But none of this is done yet. There is a great work to do to reach this goal, which is still in discussion anyway. So no, it is not yet possible to have Cassendra compatible with HDB, but it is in the TODO list…

Thanks Girardot, got your point.

Hi Jyotin,
just for completness, hdb++ supports both MySQL and Cassandra as back-ends.
You can get hdb++ from sourceforge:

where you can find also some documentation, as the original design guidelines.
Using hdb++ is, indeed, quite simple:

  1. create the database on the back-end engine
  2. create at least one EventSubscriber device server
  3. create one ConfigurationManager device server
  4. use Jive or the ConfigurationManager GUI to setup
    the events for attributes of the TANGO devices you want to archive
    Of course some additional documentation is forseen.

Cheers,
Lorenzo

[quote=“lorenzo”]Hi Jyotin,
just for completness, hdb++ supports both MySQL and Cassandra as back-ends.
You can get hdb++ from sourceforge:

where you can find also some documentation, as the original design guidelines.
Using hdb++ is, indeed, quite simple:

  1. create the database on the back-end engine
  2. create at least one EventSubscriber device server
  3. create one ConfigurationManager device server
  4. use Jive or the ConfigurationManager GUI to setup
    the events for attributes of the TANGO devices you want to archive
    Of course some additional documentation is forseen.

Cheers,
Lorenzo[/quote]

Thank you very much Lorenzo. Cheers!

Hello Team,

I am encountering errors with HDB++ while executing the “make” command on the MingW terminal of Windows and Terminal of Ubuntu system. Below are the glimpse of the error logs and also attaching the detailed files with this post. I think that I am missing something for the configuration but could not figure out. The respective make files are also attached with this post.

I have modified the make files as follows:

For Windows System:
[*] Make-hdb++.in


ifneq ($(HDB++CASSANDRA),1)
DBIMPL_INC = -I/c/tango_root/MySQL/include
DBIMPL_LIB = -L/c/tango_root/MySQL/lib

#SQLIMPL_INC = mysqlclient

OMNI_INC =  /c/tango_root/tango/win64/include/vc10/omniORB4
TANGO_INC = /c/tango_root/tango/win64/include/vc10

[*] Make-8.1.2.c.in


TANGO_DIR ?= /c/tango_root/tango/win64/include/vc10
OMNIORB_DIR ?= /c/tango_root/tango/win64/include/vc10/omniORB4

For Ubuntu System:
[*] Make-hdb++.in


ifneq ($(HDB++CASSANDRA),1)
DBIMPL_INC = `mysql_config --include`
DBIMPL_LIB = `mysql_config --libs_r`

endif
#SQLIMPL = mysqlclient

OMNI_INC = /usr/include/omniORB4
TANGO_INC = /usr/include/tango

[*] Make-8.1.2.c.in


TANGO_DIR ?= /usr/include/tango
OMNIORB_DIR ?= /usr/include/omniORB4

Glimpse of Errors after the “make” command execution - Windows System:


In file included from c:/tango_root/tango/win64/include/vc10/tango.h:127:0,
                 from ../../libhdb++/trunk/src/LibHdb++.h:32,
                 from src/LibHdb++MySQL.h:24,
                 from src/LibHdb++MySQL.cpp:23:
c:/tango_root/tango/win64/include/vc10/command.h: In member function 'void Tango::TemplCommandInOut<INARG, OUTARG>::init_types()':
c:/tango_root/tango/win64/include/vc10/command.h:2232:23: error: must #include <typeinfo> before using typeid
  set_type(typeid(INARG),in_type);
                       ^
c:/tango_root/tango/win64/include/vc10/command.h:2238:24: error: must #include <typeinfo> before using typeid
  set_type(typeid(OUTARG),out_type);
                        ^
c:/tango_root/tango/win64/include/vc10/command.h: In member function 'void Tango::TemplCommandIn<INARG>::init_types()':
c:/tango_root/tango/win64/include/vc10/command.h:2903:23: error: must #include <typeinfo> before using typeid
  set_type(typeid(INARG),in_type);
                       ^
c:/tango_root/tango/win64/include/vc10/command.h: In member function 'void Tango::TemplCommandOut<OUTARG>::init_types()':
c:/tango_root/tango/win64/include/vc10/command.h:3554:24: error: must #include <typeinfo> before using typeid
  set_type(typeid(OUTARG),out_type);
                        ^
src/LibHdb++MySQL.cpp: In member function 'std::string HdbPPMySQL::add_domain(std::string)':
src/LibHdb++MySQL.cpp:1980:58: error: 'getaddrinfo' was not declared in this scope
   int ret = getaddrinfo(th.c_str(), NULL, &hints, &result);
                                                          ^
src/LibHdb++MySQL.cpp:1992:22: error: 'freeaddrinfo' was not declared in this scope
   freeaddrinfo(result); // all done with this structure
                      ^
make[1]: *** [obj/LibHdb++MySQL.o] Error 1
make[1]: Leaving directory `/c/tango_root/hdb++/libhdb++mysql/trunk'
make: *** [trunk] Error 2

Glimpse of Errors after the “make” command execution - Ubuntu System:


/usr/include/tango/command.h:2876:26: note: in expansion of macro ‘Tango_NullPtr’
       :exe_ptr_in(f),ext(Tango_NullPtr)
                          ^
In file included from /usr/include/tango/tango.h:127:0,
                 from ../../libhdb++/trunk/src/LibHdb++.h:32,
                 from src/LibHdb++MySQL.h:24,
                 from src/LibHdb++MySQL.cpp:23:
/usr/include/tango/command.h: In member function ‘void Tango::TemplCommandIn<INARG>::init_types()’:
/usr/include/tango/command.h:2903:23: error: must #include <typeinfo> before using typeid
  set_type(typeid(INARG),in_type);
                       ^
/usr/include/tango/command.h: At global scope:
/usr/include/tango/command.h:3281:5: error: ‘unique_ptr’ does not name a type
     unique_ptr<TemplCommandOutExt>      ext;           // Class extension
     ^
/usr/include/tango/command.h: In constructor ‘Tango::TemplCommandOut<OUTARG>::TemplCommandOut(const char*, OUTARG (Tango::DeviceImpl::*)())’:
/usr/include/tango/command.h:3298:23: error: class ‘Tango::TemplCommandOut<OUTARG>’ does not have any field named ‘ext’
       :exe_ptr_out(f),ext(Tango_NullPtr)
                       ^
In file included from /usr/include/tango/tango.h:50:0,

                 from ../../libhdb++/trunk/src/LibHdb++.h:32,
                 from src/LibHdb++MySQL.h:24,
                 from src/LibHdb++MySQL.cpp:23:
/usr/include/tango/tango_config.h:214:29: error: ‘nullptr’ was not declared in this scope
     #define Tango_NullPtr   nullptr
                             ^
/usr/include/tango/command.h:3298:27: note: in expansion of macro ‘Tango_NullPtr’
       :exe_ptr_out(f),ext(Tango_NullPtr)
                           ^
In file included from /usr/include/tango/tango.h:127:0,
                 from ../../libhdb++/trunk/src/LibHdb++.h:32,
                 from src/LibHdb++MySQL.h:24,
                 from src/LibHdb++MySQL.cpp:23:
/usr/include/tango/command.h: In constructor ‘Tango::TemplCommandOut<OUTARG>::TemplCommandOut(const char*, OUTARG (Tango::DeviceImpl::*)(), bool (Tango::DeviceImpl::*)(const CORBA::Any&))’:
/usr/include/tango/command.h:3311:23: error: class ‘Tango::TemplCommandOut<OUTARG>’ does not have any field named ‘ext’
       :exe_ptr_out(f),ext(Tango_NullPtr)
                       ^

Please note that I am executing the “make” command from the location where my hdb++ folder is located i.e., the main hdb++ folder. I am looking for some help and guidance to point me on the right direction.

Kind regards,
Jyotin Ranpura


Hi Jyotin,

HDB++ is currently not officially supported because it is not yet fully ready. (Still not officially released).
It is not supported on Windows. We might consider it at some point but up to now, the development has been done on Linux only so I’m not surprised it doesn’t compile on Windows, even if you are using MingW. This was never tested.

About the files you provided, I would suggest to set at least

ELETTRA=0

in Make-hdb++.in file to avoid to compile features which are specific to ELETTRA.
This will not solve your compilation issues but it could be useful for the future.

What version of Tango did you install?
What version of MySQL did you install?
What is your compiler version on Ubuntu?

Kind regards
Reynald

Hello Reynald,

Thank you for your prompt reply.

I use Tango 8.1.2 for both the systems.

I have installed mysql-server 5.5.44 for both the systems.

The compiler version on Ubuntu is gcc 4.8.4.

[quote=“Reynald”]About the files you provided, I would suggest to set at least
ELETTRA=0
in Make-hdb++.in file to avoid to compile features which are specific to ELETTRA.
This will not solve your compilation issues but it could be useful for the future.[/quote]

Yes, I have changed it in the script and now I am encountering some new and long compilation errors! :smiley:
Here is the short glimpse of the errors:


obj/HdbEventSubscriberStateMachine.o: In function `_GLOBAL__sub_I__ZN21HdbEventSubscriber_ns18HdbEventSubscriber28is_AttributeOkNumber_allowedEN5Tango10AttReqTypeE':
HdbEventSubscriberStateMachine.cpp:(.text.startup+0xa): undefined reference to `omni_thread::init_t::init_t()'
HdbEventSubscriberStateMachine.cpp:(.text.startup+0x19): undefined reference to `omni_thread::init_t::~init_t()'
HdbEventSubscriberStateMachine.cpp:(.text.startup+0x28): undefined reference to `_omniFinalCleanup::_omniFinalCleanup()'
HdbEventSubscriberStateMachine.cpp:(.text.startup+0x37): undefined reference to `_omniFinalCleanup::~_omniFinalCleanup()'
obj/main.o: In function `main':
main.cpp:(.text.startup+0x6): undefined reference to `Tango::Util::init(int, char**)'
main.cpp:(.text.startup+0x13): undefined reference to `Tango::Util::server_init(bool)'
main.cpp:(.text.startup+0x32): undefined reference to `Tango::Util::server_run()'
main.cpp:(.text.startup+0x3c): undefined reference to `Tango::Util::instance(bool)'
main.cpp:(.text.startup+0x44): undefined reference to `Tango::Util::server_cleanup()'
main.cpp:(.text.startup+0xc9): undefined reference to `Tango::Except::print_exception(CORBA::Exception const&)'
obj/main.o: In function `_GLOBAL__sub_I_main':
main.cpp:(.text.startup+0x13a): undefined reference to `omni_thread::init_t::init_t()'
main.cpp:(.text.startup+0x149): undefined reference to `omni_thread::init_t::~init_t()'
main.cpp:(.text.startup+0x158): undefined reference to `_omniFinalCleanup::_omniFinalCleanup()'
main.cpp:(.text.startup+0x167): undefined reference to `_omniFinalCleanup::~_omniFinalCleanup()'
obj/main.o:(.gcc_except_table+0x28): undefined reference to `typeinfo for CORBA::Exception'
../../libhdb++mysql/trunk/lib/libhdb++mysql.so: undefined reference to `Tango::DeviceAttribute::extract_set(std::vector<float, std::allocator<float> >&)'
../../libhdb++mysql/trunk/lib/libhdb++mysql.so: undefined reference to `Tango::DeviceAttribute::extract_set(std::vector<int, std::allocator<int> >&)'
../../libhdb++mysql/trunk/lib/libhdb++mysql.so: undefined reference to `Tango::DeviceAttribute::extract_read(std::vector<unsigned char, std::allocator<unsigned char> >&)'
../../libhdb++mysql/trunk/lib/libhdb++mysql.so: undefined reference to `Tango::DeviceAttribute::extract_read(std::vector<long, std::allocator<long> >&)'
../../libhdb++mysql/trunk/lib/libhdb++mysql.so: undefined reference to `Tango::DeviceAttribute::extract_read(std::vector<float, std::allocator<float> >&)'

A quick question, I am not running the EventSubscriber and ConfigurationManager device servers before executing the make command. I mean, I also tried executing the Make files of those device servers but they too are giving errors.
Will that make any difference? And is there any tentative/approximate date when HDB++ will be released?

Kind regards,
Jyotin

[quote=“Po!”]A quick question, I am not running the EventSubscriber and ConfigurationManager device servers before executing the make command. I mean, I also tried executing the Make files of those device servers but they too are giving errors.
Will that make any difference? And is there any tentative/approximate date when HDB++ will be released?
[/quote]

The EventSubscriber and ConfigurationManager device servers are using libhd++ and libhdb++mysql libraries so you must compile successfully these libraries first.

First of all, could you please double-check that you adjusted all the paths correctly in the Make-hdb++.in and Make-8.1.2.c.in files according to what is described in the README file?
In particular, it is essential that the following variables are set correctly to point to the Tango, omniORB and MySQL libraries installation directories:

  • SQLIMPL_INC (mysql_config --include)
  • SQLIMPL_LIB (mysql_config --libs_r)
  • OMNI_INC (path to directory where are located the OmniORB include files)
  • TANGO_INC (path to directory where are located the Tango include files)
  • TANGO_DIR (Tango installation directory)
  • OMNIORB_DIR (OmniORB installation directory)

In your case, it looks like your OMNIORB_DIR and TANGO_DIR variables are not set correctly.

Please note that we typically use a version of MySQL >= 5.6 in order to be able to store data with microsecond timestamp resolution.

Hoping this helps a bit. :wink:

Reynald

Hello Reynald,

Sorry for the delay in responding you. I will check the paths again in the make files as guided and will update you with the outcome.

Roger that!

Thank you for helping me out. :slight_smile:

Kind regards,
Jyotin

Hello Reynald/Team,

Just for the update, you were right in mentioning about the variables in the make files were not configured properly. The compilation errors are now resolved.

Many thanks for your prompt help! :wink:

Kind regards,
Jyotin

Hi All

I have to archive the values of attributes of devices of different tango-host as well as localhost connected in network.
How can I achieve this functionality in mambo ?
How to use multiple tango-host in mambo ?

Thanks and Regards
TCS-GMRT Team

Specify the TANGO_HOST as part of the name of the device.

Andy

Hi Andy

I have specified the multiple TANGO_HOST in TANGO_HOST variable.

1.)In mambo, its showing only the devices of the first host defined in the TANGO_HOST variable. Its not showing the devices of the second host and so on defined in the TANGO_HOST variable. Thus I am not able to archive the attributes of different hosts.
My aim is to archive the attributes of devices of different hosts as well as localhost.

2.)Is there any method to archive the attributes of devices of different hosts as well as localhost other than using mambo-gui ?

Thanks and Regards
TCS-GMRT Team

Hello.
I already answered that kind of question in that post:
“Mambo was not designed to work with multiple tango hosts at the same time. The coma separator is more likely interpreted to consider that if the first one does’nt answer, try second one.”
Regards,