[Beowulf] question about enforcement of scheduler use

Daniel Widyono widyono at seas.upenn.edu
Wed Jun 7 12:09:25 PDT 2006


Attached are updated versions courtesy of Bryan Cardillo, for multiple users
per node.  epilogue is copied or linked to epilogue.parallel; same goes for
prologue.

Dan W.
-------------- next part --------------
lockfile=/usr/bin/lockfile
rm=/bin/rm
test=/usr/bin/test
echo=/bin/echo
sed=/bin/sed

lock()
{
    file=$1
    $lockfile -r 3 $file.lock
}

unlock()
{
    file=$1
    $rm -f $file.lock
}

allow()
{
    file=$1
    jobid=$2
    user=$3
    $test -s $file || $echo > $file
    $sed -ie "1i # $jobid\n$user" $file
}

deny()
{
    file=$1
    jobid=$2
    $test -f $file &&
        $sed -ie "/^# $jobid/,+1d" $file
}
-------------- next part --------------
#!/bin/sh

. /var/spool/PBS/mom_priv/functions

lock /etc/pbs_sshauth && {
        deny /etc/pbs_sshauth $1
        unlock /etc/pbs_sshauth
}

exit 0
-------------- next part --------------
#!/bin/sh

. /var/spool/PBS/mom_priv/functions

lock /etc/pbs_sshauth && {
        deny /etc/pbs_sshauth $1
        unlock /etc/pbs_sshauth
}

exit 0


More information about the Beowulf mailing list