Tool to access the PVSS database and write out some monitoring information. This tool is based on and inspired by a couple of other tools: * PVSS2COOL Monitoring (CoolDCSAna) * dumpDCS == What this tool should be able to do == * access PVSS Oracle DB * output database content - works * dump database content to root/text file * count entries, display highest rate entries - works * access COOL root file dumped with AtlCoolCopy * compare COOL and PVSS entries * read Coral Connectivity database for COOL<->PVSS comparison * configurable via text file and command line === Contents of CoolDCSAna === Only listing the contents of COOLANA/PIXEL/DCS, they all have the same seven histograms: * FSMSTATE * IOVSperChannel * IOVLogLength * IOVLogGapLength * IOVAlignLogDelT * AlignedChanPerIOV * ChannelOcc * IOVLenChan * FSMSTATUS * HV * TEMPERATURE * SEP08/HV * DEC08/FSMSTATE, DEC08/FSMSTATUS, DEC08/HV, DEC08/TEMPERATURE === SQL Documentation and HowTos === * http://www.w3schools.com/sql/default.asp * http://sqlzoo.net/ * http://www.techonthenet.com/oracle/index.php * OCCI documentation: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28390/toc.htm * CERN DB Access advice: https://twiki.cern.ch/twiki/bin/view/PDBService/GeneralAdvices and https://twiki.cern.ch/twiki/bin/view/PDBService/ReferenceSlideshow === General CERN things on databases === * https://twiki.cern.ch/twiki/bin/view/Atlas/DataBases * https://twiki.cern.ch/twiki/bin/view/Atlas/DBProjectUtilities (General utilities, especially Python tools, e.g. PyOracle) * Do I need CoraCool? (http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/Database/CoraCool/doc/mainpage.h?revision=1.3&view=markup) * IOVDbSvc? (http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDevDirectory/AtlasOffline/latest_doxygen/InstallArea/doc//IOVDbSvc/html/index.html) * SQL Scripts: https://twiki.cern.ch/twiki/bin/view/Atlas/ScriptsDepotContent * ATLAS DCS DB: https://twiki.cern.ch/twiki/bin/view/Atlas/DcsDb * CERN Physics Databases Services: http://phydb.web.cern.ch/phydb/ === Structure of PVSS database === * https://twiki.cern.ch/twiki/bin/view/Atlas/PixelDCSCondDB (Schemata and types of data) * https://twiki.cern.ch/twiki/bin/view/Atlas/PixelDCSArchiving (Archiving rates) * How to access Oracle DB: https://twiki.cern.ch/twiki/bin/view/Atlas/PixelDBOracleHowTo ==== Looking at the Database using GUI ==== Use this tool: http://pdv-download.web.cern.ch/pdv-download/ For more documentation see [[ClemensLange/PixelDCS/Documentation]] === Setting up Oracle environment === Documentation from: https://twiki.cern.ch/twiki/bin/view/PDBService/BasicConceptsReference {{{ source /afs/cern.ch/project/oracle/script/setoraenv.sh }}} Libraries to include: http://oracle-documentation.web.cern.ch/oracle-documentation/10gr2doc/install.102/b15662/post_inst_task.htm#sthref388 Somehow like this: {{{ $ORACLE_HOME/lib/libocci10.a $ORACLE_HOME/lib/libocci10.so.10.1 }}} === Compilation commands === Example command (running commands given here: http://www.lorentzcenter.nl/awcourse/oracle/appdev.920/a96583/cciaadem.htm): {{{ /usr/bin/g++ -c -I/afs/cern.ch/project/oracle/@sys/10203/rdbms/demo -I/afs/cern.ch/project/oracle/@sys/10203/rdbms/public -I/afs/cern.ch/project/oracle/@sys/10203/plsql/public -I/afs/cern.ch/project/oracle/@sys/10203/network/public occiblob.cpp -DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -DLONG_IS_64 -fno-strict-aliasing -DSS_64BIT_SERVER }}} {{{ /usr/bin/g++ -L/afs/cern.ch/project/oracle/@sys/10203/lib/ -L/afs/cern.ch/project/oracle/@sys/10203/rdbms/lib/ -o occiblob occiblob.o -locci -lclntsh `cat /afs/cern.ch/project/oracle/@sys/10203/lib/sysliblist` -ldl -lm -lpthread }}} My command: {{{ g++ -c -pthread -m64 -I/afs/cern.ch/sw/lcg/external/root/5.20.00/slc4_amd64_gcc34/root/include -DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE-D_REENTRANT -DNS_THREADS -DLONG_IS_64 -fno-strict-aliasing -DSS_64BIT_SERVER -I. -I/afs/cern.ch/project/oracle/@sys/10203/rdbms/demo -I/afs/cern.ch/project/oracle/@sys/10203/rdbms/public/ -I/afs/cern.ch/project/oracle/@sys/10203/plsql/public -I/afs/cern.ch/project/oracle/@sys/10203/network/public -c testOracle.cxx -o testOracle.o }}} {{{ g++ -L /afs/cern.ch/sw/lcg/external/root/5.20.00/slc4_amd64_gcc34/root/lib -lCore -lCint -lHist -lMatrix -lGpad -ldl -lGraf -lTree -lSQL -L/afs/cern.ch/project/oracle/@sys/10203/lib -L/afs/cern.ch/project/oracle/@sys/10203/rdbms/lib -Locci testOracle.o -o testOracle -locci -lclntsh `cat /afs/cern.ch/project/oracle/@sys/10203/lib/sysliblist` -ldl -lm -lpthread }}} === Makefile === {{{ ROOTCFLAGS = $(shell root-config --cflags) ROOTLIBS = -L $(ROOTSYS)/lib -lCore -lCint -lHist -lMatrix -lGpad -ldl -lGraf -lTree -lSQL ROOTCINT = $(ROOTSYS)/bin/rootcint CXX = g++ CPPFLAGS = $(ROOTCFLAGS) LD = g++ LDFLAGS = $(ROOTLIBS) # ORACLE = -L$(ORACLE_HOME) # ORACLE = -L$(ORACLE_HOME) -lclntsh INCLUDE_DIR=-I. -I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public/ -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/network/public LIB_PATH=-L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib FROMDEMO=-DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE-D_REENTRANT -DNS_THREADS -DLONG_IS_64 -fno-strict-aliasing -DSS_64BIT_SERVER testOracle: testOracle.o @echo "generating testOracle" $(CXX) $(LDFLAGS) $(LIB_PATH) -Locci testOracle.o -o testOracle -locci -lclntsh `cat $(ORACLE_HOME)/lib/sysliblist` -ldl -lm -lpthread testOracle.o: testOracle.cxx @echo "generating testOracle.o" $(CXX) -c $(CPPFLAGS) $(FROMDEMO) $(INCLUDE_DIR) -c testOracle.cxx -o testOracle.o clean: rm -rf *.o testOracle }}} ---- CategoryDCSProject