[GE users] license integration: basic question

olesen Mark.Olesen at faurecia.com
Fri Mar 19 07:54:53 GMT 2010

On Fri, 2010-03-19 at 10:12 +0530, sangamesh wrote:
> No. These are the scripts which we tested in our cluster. The scripts
> that are attached now are from taken from the actual script.
> Please help us..

I suspect your problem may be in the Perl script itself.

0) Change the load-sensor.sh to invoke the script directly.
## load-sensor.sh
while :
    read input || exit 1         # wait for input
    [ "$input" = quit ] && exit 0

    echo begin                  # begin load report


    echo end                    # end load report

exit 0    # we never get here, but just in case

The first question is thus is 'perl' found as /bin/perl
or /usr/bin/perl? Use this value in the first line of the Perl script
and chmod +x on the script as well.

Next. Your Perl program is a bit of a mess! Why no warnings, no strict?
Why rely on auto-vivifying array insertions instead of push or, better
yet, simply hashing the results?

1) At least change the Perl script to have the following:

#!/usr/bin/perl -w
use strict;

This adds warnings and enforces strict checking. You need very good
reasons to disable either of these.

Within your Perl script, you then have this:

my $lmutil_licenceserver = $LM_LICENSE_FILE;
# Licence server hostname or ip address

But this variable is not defined anywhere - how do you know you are
getting the correct query at all?

Finally, I hope you realize the dangers of using a pure load sensor
approach. It may look good for a while, but really can't work.

If you haven't already seen this, please read this presentation.

I can understand if you'd like to have some of your own code that is
less complicated than the 2300 lines involved in qlicserver. However,
before reinventing the wheel, I'd suggest you take a look at this
posting (http://markmail.org/message/3e2f6hxxba6shqe3) which includes
various Perl snippets similar to what you are trying to do.


This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.


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

More information about the gridengine-users mailing list