[GE users] Olesen FLEXlm Integration qlicserver problem.

Olesen, Mark Mark.Olesen at arvinmeritor.com
Wed May 3 10:35:19 BST 2006


    [ The following text is in the "X-UNKNOWN" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

> I have made the integration and everything works very well. But I have one
problem.
> I run the qlicserver in daemon mode but it dies after a while.
> What is the best way to start the server in daemon mode I have tried to
start it from an rc-script but > that doesn't work and from the command line
with "nohup"

I would not think that either of these will work.
Here is the rationale (perhaps should be added to the wiki):

Starting qlicserver as a true daemon (with setsid) would allow it to become
independent of the GridEngine. Migrating the qmaster could cause several
qlicservers to run simultaneously.
To avoid this, a daemonized version of the qlicserver should start from a
(real or dummy) load sensor on the qmaster. This means that the qmaster also
needs to have an execd running for the load sensor to be called. If
required, you can always attach a zero slot queue to the qmaster.

To keep the qlicserver attached to calling process, there are a few
possibilities (see perl code):
    # this needs more testing ...
    # option 1:
    # - avoid setsid and let child die with parent
    # option 2:
    # - use setsid and watch the original parent process

The code currently implements the second option. Of course, your calling
process (with our without nohup and/or via the rc scripts) will terminate
and pull down the qlicserver with it (as designed)
I hope this explains the behaviour you've seen.

I don't actually ever use the daemonize mode, so re-implement it as required
would not be a problem (provided that we avoid the qmaster migration
problem).

I personally prefer to invoke qlicserver from a load sensor script (an
example should be in the tar file). This has 2 advantages: migration of the
qmaster is easily addressed; the contents of the qlicserver query are
written to a cache file, which provides a very nice way of monitoring the
license states (see the qstat script in the tar file).


#
----------------------------------------------------------------------------
-
#
# The execd running on the qmaster queries the license server
# The contents of 'act_qmaster' should suffice to migrate the load sensor
# for a controlled migration.
#

while :
do
   read input || exit 1         # wait for input
   [ "$input" = quit ] && exit 0

   echo begin                   # begin load report
   host_info                    # host information
   iidle_info                   # machine's idle time
   echo end                     # end load report

   # let the license query run between load reports
   SGE_qmaster=`act_qmaster`    # refresh the name of the qmaster
   if [ "$HOST" = "$SGE_qmaster" ]; then
      $license_query        >| $cache_file.TMP
      cat $cache_file.TMP   >| $cache_file
   fi
done
exit 0                  # we never get here, but just in case



Dr. Mark Olesen
Principal Engineer Thermofluids Analysis
ArvinMeritor Light Vehicle Systems
ArvinMeritor Emissions Technologies GmbH
Biberbachstr. 9
D-86154 Augsburg, GERMANY

This e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of ArvinMeritor, Inc., its affiliates, or third parties. This notice serves as marking of its ?Confidential? status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list