[GE users] Run qlicserver As A True Daemon

olesen Mark.Olesen at emconTechnologies.com
Fri May 29 07:20:11 BST 2009


> Has anyone got the excellent qlicserver tool running as a true daemon
> please?
> I've been trying to ste this up, without success. Here's where I'm up
> to so far...
> 
> I've altered qlicserver so the line;
> 
>   my $ppid = getppid();
> 
> Now reads
> 
>   my $ppid = 1;

The better way is not hacking the code, but setting the parameter ppid=0
somewhere. By "somewhere", I mean you have the choice of passing it from
the command-line, within an auxiliary qlicserver.config file, or hard
coding in the -defaultConfig parameters.

Assigning it this way is not only more flexible than hacking source, it
is marginally more efficient since the check_ppid sub bypasses all other
mechanisms and simply returns a constant "true".

> However, if I run this at boot (vi a copy of the script in
> /etc/rc.d/init.d, linked to /etc/rc.d/rc3.d) it runs, stays in the
> background, but fails to update SGE or write to the output file I'm
> specifying.

I'm surprised that output isn't working ... maybe the output is just
going somewhere unexpected?  The dir= parameter might perhaps help.

Did you check that all the needed environment variables (SGE_ROOT,
LM_LICENSE_FILE, etc) are correctly set in the init-script before
daemonizing?

Just for debugging purposes, it could be writing the output to stdout at
a known location.
For example,
  /somePath/qlicserver -d ppid=0 output=- > /tmp/qlicserver-output


In the worst case, you might have to add some print or warn statements
to the qlicserver to check the sanity at various stages. The output from
'warn' goes to stderr.

/mark
This e-mail message and any attachments may contain 
legally privileged, confidential or proprietary Information, 
or information otherwise protected by law of EMCON 
Technologies, 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.

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=199620

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list