By Ivo Janssen
qconf
is without a doubt already a very powerful tool when it comes to administering you
Grid Engine installation, but with a little shell foo, it can become even
more powerful.
How often have you started to type 'qconf -mq
' before realizing you
don't know the exact name of your queue, necessitating a quick 'qconf -sql
'
first. After Dan
Templeton shared a very useful Grid Engine Cheat Sheet with me a few
weeks ago (also see this
announcement on gridengine.info), I realized that many commands share the same drawback.
Well, bash's autocompletion
framework can be put to good use
here. See, many people don't know that bash's autocompletion can complete just
about anything, not just filenames.
You can download my qconf_completion.sh script from my website, simply dump it in e.g. $SGE_ROOT/util
and add the following line to the end of your
$SGE_ROOT/$SGE_CELL/common/settings.sh
:
. $SGE_ROOT/util/qconf_completion.sh
Now you go from the wieldy:
qconf -mq
qconf -mq^H^H
qconf -sql
qconf -mq thisodd.q
To:
qconf -mq t[TAB]
and you're done.
So far I've only implemented most of the interactive options, and have not
worked on autocompleting options such as -aattr
or -mattr
yet, although I see
huge possibilities for productivity improvement there.
By the way, this exercise was a great way to re-appreciate
the intricate regularity that underlies the option set.
Enjoy, and leave a comment if you like the script or have suggestions for
improvement.
No comments:
Post a Comment