Polling thread management
|
|
---|---|
Hi, In Jive or Astor, I am able to modify polling thread management for a device server. By default, the device server has one polling thread available, and I can add/remove more. Can the same functionality be accessed by the API (or Python API), I would like to programmatically access these functions without the need to use Jive/Astor. If this isn't possible, is there a way to do this via the command line as oposed to the GUI? Thanks, Andrea
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher Department of Physics Institute of Space Sciences and Astronomy Room 220, Maths and Physics Building University of Malta, Msida MSD2080, MALTA |
|
|
---|---|
Hi Andrea, Up to now, the only way to do it programmatically is to have a process which updates the polling_threads_pool_conf and polling_threads_pool_size admin device properties according to your needs and restarts the device server (this is what Astor is doing). This is not very convenient and could be error prone. For your use case, the best would be to add new commands in the admin device API to manage the polling threads pool. I created a new issue on the brand new TangoTickets GitHub repository to keep track of this feature request. https://github.com/tango-controls/TangoTickets/issues/1. In the framework of the transition from Sourceforge to Github, I just created TangoTickets Github repository to be able to create issues on GitHub for cases where the issue has an impact on several Tango git repositories and for Tango general issues. This repository can be used as well to create tickets on Tango related bugs or feature requests when you don't know where to create the ticket. Kind regards Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, We are just getting back to dealing with this issue in our system. Essentially we currently have a device server, with a number of devices. By default it seems there is one polling thread for all these devices. We would like (at runtime) to modify the polling thread configuration, and say assign one thread to half the devices, and another thread to the other half. You mentioned that it is possible to do this programmatically. Could you explain exactly which steps to take to do this? I am able to read the property at runtime with the following code:
Which returns a dictionary like:
So if I wanted to say, service devices '1' and '2' with one polling thread, and '3' and '4' with another, without using the Jive tool, how would it be achieved?
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher Department of Physics Institute of Space Sciences and Astronomy Room 220, Maths and Physics Building University of Malta, Msida MSD2080, MALTA |
|
|
---|---|
Hi Andrea,drea You would need to update dserver/Tile_DS/test/polling_threads_pool_conf property to: and to update dserver/Tile_DS/test/polling_threads_pool_size property to:
I'm a beginner with PyTango so I let you find the way to update these properties (probably using DeviceProxy.put_property method). Then you should send the Init command on your admin device (dserver/Tile_DS/test in your case). I hope this helps, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, Thanks, works perfectly! Managed :) Cheers
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher Department of Physics Institute of Space Sciences and Astronomy Room 220, Maths and Physics Building University of Malta, Msida MSD2080, MALTA |