[GE users] Some Hopefully Useful Scripts

olesen Mark.Olesen at emconTechnologies.com
Mon May 18 08:51:21 BST 2009

Hi Chris,

> At the request of some people I've worked with, I've just posted a
> couple of scripts I've written for SGE on gridengine.info.
> Here's some descriptions and links, and I'll attach the files here as
> well,

Thanks for making your scripts available. It's nice to see.

Adding my two cents...

alias qcd would be simpler with sed instead of grep/awk (I hope I got
the backslashing right).

# Csh:
alias qcd cd\ \`qstat\ -j\ \!\*\|sed -ne \'s/^cwd: *//p\'\`

for POSIX sh, you'd need a function instead of an alias:
   set -- $(qstat -j ${1:-0} | sed -ne 's/^cwd: *//p')
   [ "$#" -ge 1 ] && cd "$1"

or for the less paranoid user, without error checking
   cd $(qstat -j $1 | sed -ne 's/^cwd: *//p')

The same thing (using sed instead of grep/awk) would apply to qtail.

> -- Change Queue State --
> A very short script that enables or disables all queue instances on
> the node its run on.

I don't think you need qselect. I've never had a problem with using
wildcards directly:
   qmod -e *@$HOSTNAME
   qmod -d *@$HOSTNAME

If you want to hide this complexity a bit, I'd use tiny scripts
'qenable/qdisable' that could take a list of hosts, or use $HOSTNAME in
the absence of arguments.

> Thanks,
> Chris


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.


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

More information about the gridengine-users mailing list