12 Mar 2019, Francesco Renga, Forum, Problem stopping every second run 
 | 
Dear all,
 
         I'm running a DAQ frontend and it works well if one single run is
 
taken. If I try to take a second run right after, the run is performed but, when
 | 
   
   13 Mar 2019, Konstantin Olchanski, Forum, Problem stopping every second run 
 | 
>          I'm running a DAQ frontend and it works well if one single run is
 
> taken. If I try to take a second run right after, the run is performed but, when
 
> stopping it, I get the error messages below. Any hint?
 | 
   20 Feb 2019, Konstantin Olchanski, Info, odb needs protection against ctrl-c 
 | 
Even with the cm_watchdog signal removed, some trouble from UNIX signals remains.
 
 
This time, when one presses Ctrl-C at the wrong time, the Ctrl-C signal handler will run at the wrong time
 | 
   
   20 Feb 2019, Stefan Ritt, Info, odb needs protection against ctrl-c 
 | 
Not sure if you realized, but there is a two-stage Ctrl-C handling inside midas. The first time you hit ctrl-c, the handler just sets a flag for the main 
event loop, so that the program can gracefully exit without trouble. This is 
 
done inside cm_ctrlc_handler(), which sets _ctrlc_pressed true if called. Then cm_yield() tests this flag and returns RPC_SHUTDOWN if so. I agree not very | 
      
   20 Feb 2019, Konstantin Olchanski, Info, odb needs protection against ctrl-c 
 | 
> Not sure if you realized, but there is a two-stage Ctrl-C handling inside midas.
 
 
Hmm... I am looking at the ctrl-c handler inside odbedit.
 | 
         
   20 Feb 2019, Stefan Ritt, Info, odb needs protection against ctrl-c 
 | 
Have you read what I wrote? The current ctrl-c handler just sets the _ctrlc_pressed flag. It might be that some programs do not correctly interprete the 
return of cm_yield(), certainly the frontend does it correctly. On the SECOND ctrl-c, the program gets 
 
(internally) hard aborted, equivalent to calling abort(). Not sure if the code works everywhere, I see now that cm_yield(() should maybe return SS_ABORT | 
   
   20 Feb 2019, Konstantin Olchanski, Info, odb needs protection against ctrl-c 
 | 
Commit f81ff3c protects db_lock/unlock, but not any of the other functions. What if we do ctrl-c in the middle
 
of some odb write operation in the middle of memory allocation, etc.
 
 | 
   11 Feb 2019, Konstantin Olchanski, Info, json-rpc request for ODB /Script and /CustomScript. 
 | 
I added json-rpc requests for ODB /Script and /CustomScript (the first one shows up on the status page in the left hand side menu, the 
 
second one is "hidden", intended for use by custom pages).
 
 | 
   14 Jan 2019, Becky Chislett, Bug Report, Custom script with new MIDAS 
 | 
I am having difficulty getting the custom scripts to work within the updated MIDAS. Before the 
 
update I was using something like : 
 
 | 
   
   18 Jan 2019, Konstantin Olchanski, Bug Report, Custom script with new MIDAS 
 | 
> I am having difficulty getting the custom scripts to work within the updated MIDAS. Before the 
 
> update I was using something like : 
 
> 
 | 
   
   22 Jan 2019, Stefan Ritt, Bug Report, Custom script with new MIDAS 
 | 
I just check that feature and found it's still working as expected. 
 
 
On trap I fell in was that a custom page needs the <input type=submit ...> to be imbedded into a pair of 
 | 
   
   24 Jan 2019, Konstantin Olchanski, Bug Report, Custom script with new MIDAS 
 | 
> <input type=submit name=customscript value="test">
 
 
Stefan is right, input-type-submit has to be inside a form. This type of rpc call is "old school". Today, we should 
 | 
   24 Jan 2019, Andreas Suter, Suggestion, json rpc API for history data 
 | 
For us it would be a handy feature if history data could be requested directly
 
from a custom page (time range or run based intervals) . Here I am not talking
 
about history plots but I am talking about recorded time series data. This way
 | 
   
   24 Jan 2019, Konstantin Olchanski, Suggestion, json rpc API for history data 
 | 
> For us it would be a handy feature if history data could be requested directly
 
> from a custom page (time range or run based intervals) . Here I am not talking
 
> about history plots but I am talking about recorded time series data. This way
 | 
   10 Jan 2019, Konstantin Olchanski, Info, removal of cm_watchdog() 
 | 
cm_watchdog() has been removed from the latest midas sources. The watchdog functions performed by cm_watchdog() were 
 
moved to cm_yield() - those are - maintaining odb and event buffer "last active" timestamps and checking for and removing of 
 
timed-out clients.
 | 
   
   21 Jan 2019, Konstantin Olchanski, Info, removal of cm_watchdog() 
 | 
> cm_watchdog() has been removed from the latest midas sources
 
> Removal of cm_watchdog() solves many problems in the midas code base:
 
 | 
      
   24 Jan 2019, Konstantin Olchanski, Info, removal of cm_watchdog() 
 | 
> > cm_watchdog() has been removed from the latest midas sources
 
> > Removal of cm_watchdog() solves many problems in the midas code base:
 
> Removal of cm_watchdog() creates new problems:
 | 
   28 Dec 2018, Konstantin Olchanski, Info, note on the midas event buffer code, part 1 
 | 
In this technical note, I write down the workings of the midas event buffer code, the path 
 
that events travel from the frontend to the SYSTEM buffer to mlogger (and to disk).
 
 | 
   
   28 Dec 2018, Konstantin Olchanski, Info, note on the midas event buffer code, part 2, bm_send_event() 
 | 
> In this technical note, I write down the workings of the midas event buffer code
 
> we need to understand and write down how the event buffer code works.
 
 | 
      
   28 Dec 2018, Konstantin Olchanski, Info, note on the midas event buffer code, part 3, rpc_send_event() 
 | 
> In this technical note, I write down the workings of the midas event buffer code
 
> we need to understand and write down how the event buffer code works.
 
> bm_send_event() does this ...
 | 
         
   28 Dec 2018, Konstantin Olchanski, Info, note on the midas event buffer code, part 4, reading from event buffer 
 | 
> > In this technical note, I write down the workings of the midas event buffer code
 
> > we need to understand and write down how the event buffer code works.
 
> > bm_send_event() does this ...
 | 
            
   02 Jan 2019, Konstantin Olchanski, Info, note on the midas event buffer code, part 5, bm_read_buffer() 
 | 
> > > In this technical note, I write down the workings of the midas event buffer code
 
> > > we need to understand and write down how the event buffer code works.
 
> > > bm_send_event() does this ...
 | 
               
   02 Jan 2019, Konstantin Olchanski, Info, note on the midas event buffer code, part 6, reading events through the mserver 
 | 
> > > > In this technical note, I write down the workings of the midas event buffer code
 
> > > > we need to understand and write down how the event buffer code works.
 
> > > > bm_send_event() does this ...
 | 
                  
   03 Jan 2019, Konstantin Olchanski, Info, note on the midas event buffer code, part 7, event buffer polling frequencies 
 | 
> > > > > In this technical note, I write down the workings of the midas event buffer code
 
> > > > > we need to understand and write down how the event buffer code works.
 
> > > > > bm_send_event() does this ...
 | 
                     
   03 Jan 2019, Konstantin Olchanski, Info, note on the midas event buffer code, part 8, writer and reader communications 
 | 
> > > > > > In this technical note, I write down the workings of the midas event buffer code
 
 
Event buffer readers and writers need to communicate following information:
 | 
                        
   10 Jan 2019, Konstantin Olchanski, Info, note on the midas event buffer code, part 8, writer and reader communications 
 | 
> > > > > > > In this technical note, I write down the workings of the midas event buffer code
 
> Event buffer readers and writers need to communicate following information:
 
> 
 | 
   10 Jan 2018, Andreas Suter, Bug Report, mhttpd - custom page - RHEL/Fedora  
 | 
Description of the problem (starting with 61be7a1):
 
 
When starting a new experiment, creating a fresh ODB and than adding the 
 | 
   
   11 Jan 2018, Konstantin Olchanski, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> [mhttpd,ERROR] [mhttpd.cxx:563:rread,ERROR] Cannot read file '/root', read of 
 
> 4096 returned -1, errno 21 (Is a directory)
 
 | 
      
   12 Jan 2018, Stefan Ritt, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> In any case, IMO, mhttpd has no business serving the contents of /root,
 
> or serving any files outside of the mhttpd user $HOME directory. (but also
 
> should not serve files from ~user/.ssh, or any other "secret" files, good
 | 
      
   26 Dec 2018, Konstantin Olchanski, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> > [mhttpd,ERROR] [mhttpd.cxx:563:rread,ERROR] Cannot read file '/root', read of 
 
> > 4096 returned -1, errno 21 (Is a directory)
 
> 
 | 
   
   21 Dec 2018, Stefan Ritt, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
I implemented that fix. Thank you to Andreas. Creating "Custom" directory from the web now does 
 
not have that problem any more.
 
 | 
      
   26 Dec 2018, Konstantin Olchanski, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> I implemented that fix. Thank you to Andreas. Creating "Custom" directory from the web now does 
 
> not have that problem any more.
 
 | 
         
   27 Dec 2018, Stefan Ritt, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> BTW, "the fix" in mhttpd unconditionally creates /Custom/Path and sets it to the value of $MIDASSYS. This path 
 
> seems to be prepended to all file paths, so this fix also breaks the normal use of /Custom/xxx that contain the full 
 
> path name of the file to serve...
 | 
            
   27 Dec 2018, Konstantin Olchanski, Bug Report, mhttpd - custom page - RHEL/Fedora 
 | 
> I still strongly believe that mhttpd should not serve arbitrary files (only serve files explicitly listed in ODB) or as next best option,
 
> only serve files from subdirectories explicitly listed in ODB.
 
> 
 | 
   05 Dec 2018, Konstantin Olchanski, Info, Partial refactoring of ODB code 
 | 
The current ODB code has several structural problems and I think I now figured out how to straighten them out.
 
 
Here is the problems:
 | 
   
   11 Dec 2018, Stefan Ritt, Info, Partial refactoring of ODB code 
 | 
All makes sense to me. I agree to proceed with the refactoring.
 
 
One additional comment: In the 90's when I developed this code, locking was expensive. On a decent computer you could do a couple of thousand lock operations | 
      
   26 Dec 2018, Konstantin Olchanski, Info, Partial refactoring of ODB code 
 | 
> One additional comment: In the 90's when I developed this code, locking was expensive.
 
> Now the world has changed, we can do almost a million locks a second.
 
 | 
         
   27 Dec 2018, Stefan Ritt, Info, Partial refactoring of ODB code 
 | 
> I am not sure this is quite true. The CPU can execute 3000 million operations per second (3GHz CPU, assuming 1 op/Hz),
 
> so 1 lock operation is worth 3000 normal operations. Of course cache misses and branch mispredictions mess up
 
> this simple arithmetic...
 | 
   24 Sep 2018, Lars Martin, Suggestion, Self-resetting alarm class 
 | 
I was planning to use the alarm system to display an information banner when a
 
certain valve is open, but I would like it to go away again when the valve is
 
closed.
 | 
   
   24 Sep 2018, Lukas Gerritzen, Suggestion, Self-resetting alarm class 
 | 
If you run an external script anyway, you can also call "odbedit -c alarm" to
 
reset all alarms. Or you could try to set the "Triggered" entry of that certain
 
alarm to 0 (again, with odbedit), that could also work. | 
      
   25 Sep 2018, Stefan Ritt, Suggestion, Self-resetting alarm class 
 | 
> If you run an external script anyway, you can also call "odbedit -c alarm" to
 
> reset all alarms. Or you could try to set the "Triggered" entry of that certain
 
> alarm to 0 (again, with odbedit), that could also work.
 | 
         
   26 Dec 2018, Konstantin Olchanski, Suggestion, Self-resetting alarm class 
 | 
> > If you run an external script anyway, you can also call "odbedit -c alarm" to
 
> > reset all alarms. Or you could try to set the "Triggered" entry of that certain
 
> > alarm to 0 (again, with odbedit), that could also work.
 | 
   
   25 Sep 2018, Stefan Ritt, Suggestion, Self-resetting alarm class 
 | 
> I was planning to use the alarm system to display an information banner when a
 
> certain valve is open, but I would like it to go away again when the valve is
 
> closed.
 | 
   24 Sep 2018, Devin Burke, Forum, Implementing MIDAS on a Satellite 
 | 
Hello Everybody,
 
 
I am a member of a satellite team with a scientific payload and I am considering
 | 
   
   25 Sep 2018, Stefan Ritt, Forum, Implementing MIDAS on a Satellite 
 | 
> Hello Everybody,
 
> 
 
> I am a member of a satellite team with a scientific payload and I am considering
 | 
      
   25 Sep 2018, Devin Burke, Forum, Implementing MIDAS on a Satellite 
 | 
> > Hello Everybody,
 
> > 
 
> > I am a member of a satellite team with a scientific payload and I am considering
 | 
         
   26 Dec 2018, Konstantin Olchanski, Forum, Implementing MIDAS on a Satellite 
 | 
> 
 
> Thank you for your comment Stefan. We do have some hardware resources on the board such as RAM, ROM and
 
> Flash storage so we wouldn't necessarily have to virtualize everything. Ideally we would like a
 | 
   24 Oct 2018, Ryu Sawada, Info, bm_receive_event timeout in ROME 
 | 
Hi all
 
 
There is a bug report in the ROME repository which says bm_receive_event timeouts.
 | 
   
   26 Dec 2018, Konstantin Olchanski, Info, bm_receive_event timeout in ROME 
 | 
> There is a bug report in the ROME repository which says bm_receive_event timeouts.
 
> https://bitbucket.org/muegamma/rome3/issues/8/rome-with-midas-produces-timeout-after
 
> Does anybody have any ideas what could causing the problem ?
 | 
   18 Dec 2018, Konstantin Olchanski, Info, mxml update 
 | 
the mxml library was updated to make it thread-safe.
 
https://bitbucket.org/tmidas/mxml/src/master/
 
 | 
   30 Oct 2018, Joseph McKenna, Bug Report, Side panel auto-expands when history page updates 
 | 
 
 
One can collapse the side panel when looking at history pages with the button in
 | 
   
   31 Oct 2018, Stefan Ritt, Bug Report, Side panel auto-expands when history page updates 
 | 
> 
 
> 
 
> One can collapse the side panel when looking at history pages with the button in
 | 
      
   31 Oct 2018, Joseph McKenna, Bug Report, Side panel auto-expands when history page updates 
 | 
> > 
 
> > 
 
> > One can collapse the side panel when looking at history pages with the button in
 | 
         
   02 Nov 2018, Stefan Ritt, Bug Report, Side panel auto-expands when history page updates 
 | 
> I apologise for miss using the word refresh. The re-appearing sidebar was also seen with the automatic
 
> reload, I have implemented your fix here and it now works great!
 
 | 
            
   02 Nov 2018, Thomas Lindner, Bug Report, Side panel auto-expands when history page updates 
 | 
> > I apologise for miss using the word refresh. The re-appearing sidebar was also seen with the automatic
 
> > reload, I have implemented your fix here and it now works great!
 
> 
 | 
               
   02 Nov 2018, Stefan Ritt, Bug Report, Side panel auto-expands when history page updates 
 | 
> Joseph's original message says that the problem is with the standard MIDAS history page, which currently use a complete reload 
 
> when refreshing.  Of course we are planning to update this history pages to only grab what it needs (as well as changing the 
 
> plotting to use newer HTML plotting). But until that upgrade happens your fix is helpful for the history page.
 | 
   11 Sep 2018, Francesco Renga, Forum, Launching an executable script from the sequencer 
 | 
Dear experts,
 
              is there any way to launch an executable script on the host computer from the MIDAS 
 
sequencer? If not, is there any interest to develop such a feature?
 | 
   
   11 Sep 2018, Pierre Gorel, Forum, Launching an executable script from the sequencer 
 | 
> Dear experts,
 
>               is there any way to launch an executable script on the host computer from the MIDAS 
 
> sequencer? If not, is there any interest to develop such a feature?
 | 
      
   11 Sep 2018, Stefan Ritt, Forum, Launching an executable script from the sequencer 
 | 
> > Dear experts,
 
> >               is there any way to launch an executable script on the host computer from the MIDAS 
 
> > sequencer? If not, is there any interest to develop such a feature?
 | 
   28 Aug 2018, Lukas Gerritzen, Bug Report, Deleting Links in ODB via mhttpd 
 | 
Asume you have a variable foo and a link bar -> foo. When you go to the ODB in
 
mhttpd, click "Delete" and select bar, it actually deletes foo. bar stays,
 
stating "<cannot resolve link>". Trying the same in odbedit with rm gives the
 | 
   
   28 Aug 2018, Konstantin Olchanski, Bug Report, Deleting Links in ODB via mhttpd 
 | 
> Asume you have a variable foo and a link bar -> foo. When you go to the ODB in
 
> mhttpd, click "Delete" and select bar, it actually deletes foo. bar stays,
 
> stating "<cannot resolve link>". Trying the same in odbedit with rm gives the
 | 
      
   29 Aug 2018, Stefan Ritt, Bug Report, Deleting Links in ODB via mhttpd 
 | 
> > Asume you have a variable foo and a link bar -> foo. When you go to the ODB in
 
> > mhttpd, click "Delete" and select bar, it actually deletes foo. bar stays,
 
> > stating "<cannot resolve link>". Trying the same in odbedit with rm gives the
 | 
   29 Aug 2018, Konstantin Olchanski, Forum, midas forum mail relay changed to smtp.triumf.ca 
 | 
Per changes at TRIUMF, the MIDAS forum mail relay was changed from trmail.triumf.ca to 
 
smtp.triumf.ca. K.O. | 
   21 Aug 2018, Wes Gohn, Bug Report, mserver problem 
 | 
Hi. We've just updated our midas installation to the newest version, and we now see repeated errors from the 
 
mserver in messages. Mostly we see
 
 | 
   
   28 Aug 2018, Konstantin Olchanski, Bug Report, mserver problem 
 | 
> Hi. We've just updated our midas installation to the newest version, and we now see repeated errors from the 
 
> mserver in messages. Mostly we see
 
> 
 | 
   24 Aug 2018, Lukas Gerritzen, Forum, Int64 datatype 
 | 
I would like to store the address of 1-Wire temperature sensors in a device
 
driver. However, the supportet data types (as definded around
 
include/midas.h:311) do not foresee a type large enough.
 | 
   
   25 Aug 2018, Stefan Ritt, Forum, Int64 datatype 
 | 
> I would like to store the address of 1-Wire temperature sensors in a device
 
> driver. However, the supportet data types (as definded around
 
> include/midas.h:311) do not foresee a type large enough.
 | 
   
   28 Aug 2018, Konstantin Olchanski, Forum, Int64 datatype 
 | 
> I would like to store the address of 1-Wire temperature sensors in a device
 
> driver. However, the supportet data types (as definded around
 
> include/midas.h:311) do not foresee a type large enough.
 | 
   28 Aug 2018, Lukas Gerritzen, Forum, Problems with virtual history events 
 | 
Hi,
 
I am trying to set up virtual history events following
 
https://midas.triumf.ca/MidasWiki/index.php/History_System#Virtual_History_Event 
 | 
   
   28 Aug 2018, Konstantin Olchanski, Forum, Problems with virtual history events 
 | 
Hi, what you try should have worked. Perhaps your symlink is wrong and should say "/External/..." (with a leading slash). The "links period" would have
 
worked same as equipment/common/history period - as a rate limiter.
 
 |