Skip to content

Instantly share code, notes, and snippets.

@sambrightman
Last active January 10, 2017 14:02
Show Gist options
  • Save sambrightman/beb39415a49c655a1c7d139de7bb96f8 to your computer and use it in GitHub Desktop.
Save sambrightman/beb39415a49c655a1c7d139de7bb96f8 to your computer and use it in GitHub Desktop.
rename SGE host
# need manager privileges for some things?
# rename, leave old name in /etc/hosts as an alias for now (end of line, real name should be first)
sudo emacs /etc/hostname /etc/hosts
export HOSTNAME=crunch002
sudo hostname crunch002
# stop services, check status
sudo systemctl stop sgemaster.p6444 sgeexecd.p6444
sudo systemctl status sgemaster.p6444 sgeexecd.p6444
# verify
sudo ps -ef | grep sge
# kill if necessary
sudo emacs /usr/local/sge/default/common/act_qmaster
# start
sudo systemctl start sgemaster.p6444 sgeexecd.p6444
sudo systemctl status sgemaster.p6444 sgeexecd.p6444
# verify
sudo ps -ef | grep sge
# i found full list of things to change by doing this:
grep -r hmf_crunch002 /usr/local/sge/ | grep -v accounting | grep -v messages
man qconf
# ensure all of the above things are changed/deleted and re-added
# for me it was admin/execution/submit hosts, host groups, configurations, cluster queues
# show
qconf -sh
qconf -sel
qconf -ss
qconf -shgrpl
qconf -shgrp $(qconf -shgrpl) # or specify name manually if multiple are listed
qconf -sconfl
qconf -sconf $(qconf -sconfl) # or specify name manually if multiple are listed
qconf -sql
qconf -sq $(qconf -sql) # or specify name manually if multiple are listed
# modify ones that don't seem to update automatically
qconf -mhgrp $(qconf -shgrpl) # or specify name manually if multiple are listed
qconf -mq $(qconf -sql) # or specify name manually if multiple are listed
# remove old alias
sudo emacs /etc/hosts
# restart services to be sure
sudo systemctl restart sgemaster.p6444 sgeexecd.p6444
# reboot if not done so since changing hostname
sudo reboot
# test
qstat
qsub -b y /bin/true
qstat
run_pipeline
# etc. etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment