DQM Online training
1. Execution Environment
Request a virtual machine to the CERN Virtual Machine Service (
http://vmm.cern.ch
), the following are expected features:
- Operating System: SLC5-x86_64
- RAM Memory: 2GB
- CPU: 2 cores
- Hard Disk: 40G
2. DQM GUI Installation
mkdir myGui
cd myGui
svn co svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure/trunk/Deployment cfg
#
svn co -r 15374 svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure/trunk/Deployment cfg
#
[DQM GUI Installation]/cfg/Deploy -t MYDEV -s "prep sw post" $PWD dqmgui/bare
3. Starting the DQM GUI server
.[DQM GUI Installation]/current/apps/dqmgui/etc/profile.d/env.sh
[DQM GUI Installation]/current/config/dqmgui/manage restart "I did read documentation"
Other options of the previous command include start, stop and status.
4. Setting the DQM GUI Index
cd [DQM GUI Installation]/state/dqmgui/dev
visDQMIndex create ix
- In order to load a valid histogram, download one or more from
https://cmsweb.cern.ch/dqm/offline/data/browse/ROOT/
and then copy them to the virtual machine
scp [root file name].root [virtual machine hostname]:/[DQM GUI Installation]/state/dqmgui/dev/uploads/
visDQMIndex add . [DQM GUI Installation]/state/dqmgui/dev/ix . [DQM GUI Installation]/state/dqmgui/dev/uploads/*.root
5. STG Installation
STG is the patch manager used for the DQM GUI tool patches.
sudo mkdir guiworkspace
cd guiworkspace/
sudo mkdir Infrastructure
sudo yum install git.x86_64 1.7.4.1-1.el5
sudo yum install git-all.x86_64 1.7.4.1-1.el5
sudo yum install gitk.x86_64 1.7.4.1-1.el5
sudo yum install gitweb.x86_64 1.7.4.1-1.el5
sudo yum install stgit.noarch
mkdir ~/.stgit
ln -s stg/stgit/templates ~/.stgit
git config --global user.name "[your name]"
git config --global user.email "[your CERN email]"
git config --global svn.addAuthorFrom true
git config --global svn.useLogAuthor true
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
(echo "Host *" echo " ControlMaster auto" ) >> ~/.ssh/config
ssh -Nf svn.cern.ch
nano ~/.ssh/config
If it is present, delete the line:
echo " ControlPath $HOME/.ssh/%h.%p.%r"
and save the changes.
git svn clone svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure -s
cd Infrastructure/
git config branch.master.remote svn
git config stgit.pull-policy fetch-rebase
git config stgit.fetchcmd "git svn -i trunk fetch"
git config stgit.rebasecmd "git svn rebase"
touch .git/FETCH_HEAD
stg init
stg branch -c mydev
git config branch.mydev.remote svn
In your home directory:
sudo git clone git://repo.or.cz/stgit.git
cd stgit
sudo yum install asciidoc
sudo make prefix=/usr all doc
sudo make prefix=/usr install install-doc
6. Patch Management
New patches will be available in the directory:
/afs/cern.ch/user/c/cmsdqm/scratch/gui-patch-dropbox/
They must be moved to the test directory:
mv /afs/cern.ch/user/c/cmsdqm/scratch/gui-patch-dropbox/* /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]
In a valid STG workspace (see step 5):
cd Infrastructure/Deployment/dqmgui/
Create the new patch that will compile all of the pending patches (stg squash option):
stg new -m "RP Layouts WS update" rp-layouts-ws-h$(date +%m%y)
For DQM general patches:
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[patch name] | patch -p[0-4] --dry-run
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[patch name] | patch -p[0-4]
For DQM STG based patches:
stg import /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[patch name]
The for both cases:
stg series
This command should show both patches.
stg squash -n rp-layouts-ws-h$(date +%m%y) rp-layouts-ws-h$(date +%m%y) [patch name]
stg refresh
stg series
This command should show only one patch.
stg show
This command should show the mixed body of the patches.
cd /[DQM GUI Installation]/cfg/dqmgui
svn revert -R .;svn status | awk '/?/{print $2}' | xargs rm -rv; svn up ;
This command will reverts the directory to its original state and apply the lastest updates.
cd Infrastructure/Deployment/dqmgui/
stg export -d /[DQM GUI Installation]/cfg/dqmgui -p -n
. /[DQM GUI Installation]/current/apps/dqmgui/etc/profile.d/env.sh
cd /[DQM GUI Installation]/cfg/dqmgui
cat [patch name] | patch -p[0-4] --dry-run
cat [patch name] | patch -p[0-4]
[DQM GUI Installation]/cfg/Deploy -t MYDEV -s sw $PWD dqmgui/bare
monControl rebuild all from [config file changed]
[DQM GUI Installation]/current/config/dqmgui/manage restart "I did read documentation".