DFTS Message Queue Manual Testing
Regarding DFTS 3.0.0.2, and linux System V message queue. These notes are not intended for a customer, but some information on a way to manually send something to the message queue to send a file in DFTS 3.0.0.2.
For each DFTS blue side instance, 2 executables stay running:
- “onotify” is the new one
- monitors the send directory for that channel
- when it sees a file to send, it checks that the file is not in use, then writes to the message queue to notify dd_send_file to send it
- dd_sendfile – this process now acts as a linux daemon
- reads the message queue, sends files when it is told to do so
- With the new release 3.0.0.X, dd_send_file also deletes the file after sending. It did not do that before.
These 2 executables are launched from bash script owlDftsSend. For each DFTS instance, this script does a “cd” to the senddataX directory, where X is the instance number (1-32, depending on how many channels you have set up) The dd_send_file executable will only send files in the current directory, which is the senddataX directory for that instance.
Our “Owl common utilities” rpm comes with DFTS. It contains a couple C programs to create or destroy the message queue when DFTS is started or stopped. We also found an internal utility to write to the message queue. I experimented with this, and was able to tell dd_sendfile to send a file.
I believe that the easiest way to get this working would be to do the following:
- Blue side owlDftsSend script gets modified, so that:
- onotify does not get launched
- the “cd” for every instance is hard coded to your 1 send directory, rather than the default senddataX directories. This way, every dd_send_file instance can send from your 1 directory
- Use internal Owl utility smi_mq_sender to write to the message queue
- It apparently checks that it can find the file, and assumes the pathname is relative to the current working directory.
- So, to run it, you would have to cd to your send directory, then invoke it with the full pathname
- cd /<your send directory>; /Owl/dfts/utils/smi_mq_sender <key file> <file name with path relative to your 1 send directory>
- (The key files are created by owlDftsSend script already, and are /Owldata/dfts/keys/smi_on_dfts_blueX, where X is the instance number)
- this “smi_mq_sender” program also needs to be run from the “send” directory
- A test script/application can call this utility to write to the message queue