PR Control System Commands
General Info
The control system can be accessed from any solaris or linux
machine at SLAC which can see the /nfs/oprserv0x/u1 disks, while at
Padova it can be accessed from bbr-user02 or any other machine
which has access to a /nfs/opr#/Reprocessing/ER#/prod directory.
All commands must be executed from a workdir:
(SLAC) /nfs/oprserv0x/u1/XXx/prod/workdir
(PD) /nfs/opr#/Reprocessing/ER#/prod/workdir
where XX = PC or ER, x = 1,2,3,5,6,7,8
Status Commands
The following commands can be used to check the status of the farms:
(I will use ER5 as an example)
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 farminfo ER5
prints the current status of the Farm, the RP and the NPs if they
are active.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 farmstatus ER5
prints only the Farm status.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 xtcstatus ER5
prints the xtc retrieval status.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 rpmonstat ER5
prints the status of the NPs if the RP is in the monitor processing
state, which means that the NPs are running elven.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 rpcurstate ER5
prints only the RP state.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 rpprevstate ER5
prints the previous RP state. This is mostly useful when the current
state is "Fatal Error".
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -n noma0xxx -p NP_port npcurstate
prints the current state of the NP running on noma0xxx on port
number NP_port (which can be found from the rpmonstat or farminfo
commands).
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -n noma0xxx -p NP_port npprevstate
prints the previous state of the NP running on noma0xxx on port
number NP_port (which can be found from the rpmonstat or farminfo
commands). This is mostly useful when the current state is "Fatal
Error".
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 findElven ER5 [exclude]
checks for elven running on all the nodes of the farm
the optional argument [exclude] is a list of nodes not to be checked
separated by a space,
i.e. -noprserv05 findElven ER5 oprserv05 noma0033
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv05 ps ER5 [exclude]
does a "ps -U babaropr" (or "ps -Hu bbrprmgr" at Padova) on all the
nodes of the farm
the optional argument [exclude] is a list of nodes not to be checked
separated by a space,
i.e. -noprserv05 ps ER5 oprserv05 noma0033
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -nNode getlocallpfmap
lists the lpfs that are running on the Node (= oprserv0x or noma0xxx).
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -nNode map
same as getlocallpfmap, but easier to type.
Run Queue Commands
The following commands can be used to check and manage the run queue:
(XX = PC or ER, x = 1-8)
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x getrunlist XXx
prints the list of runs in the queue
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x submitrun XXx <run_num>
adds run <run_num> to the end of the queue.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x submitruns XXx <run_num1> <run_num2> ...
adds runs <run_num1> <run_num2> ... to the end of the
queue.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x submitrunlist XXx run_file.txt
adds runs from the text file run_file.txt to the end of the queue.
The format of run_file.txt should be one run number per line.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x flushrunlist XXx
flushes the runs_to_be_processed queue.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x flushfarm XXx
flushes the both the runs_to_be_processed queue and the
runs_to_be_staged one.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x saverunlist XXx
Saves run list. Remember! Use this before you reap.
Farm Control Commands
The following commands can be used to control the farms:
(XX = PC or ER, x = 1-8)
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x suspendfarm XXx
tells the farm to stop after the current run.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x resumefarm XXx
cancels the suspend farm.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x restartthisrun XXx
resets the RP (no matter what state it is in) and tries again to
process the same run.
Use with CAUTION!
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x startnextrun XXx
resets the RP (no matter what state it is in) and skips to start
processing the next run.
Use with CAUTION!
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x rpsetstate XXx RP_state
sets the RP to the state given (RP_state).
Use with CAUTION!
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -n noma0xxx -p NP_port npsetstate NP_state
sets the state of the NP running on noma0xxx on port number NP_port
(which can be found from the rpmonstat or farminfo command) to the
state given (NP_state).
Use with CAUTION!
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x killElven ER5 [exclude]
kills any Elven running on all the nodes of the farm
the optional argument [exclude] is a list of nodes not to be checked
separated by a space,
i.e. -noprserv0x findElven XXx oprserv0x noma0xxx
Reap/Scratch/Restart Commands
The following commands can be used to reap/restart the farms:
(XX = PC or ER, x = 1-8)
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x systemreaper FarmControl
kills all but the bare lpfs on the nodes of the farm (oprserv0x
and noma0xxx).
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x cleanupconf
removes the configuration that has been loaded into the bare lpfs.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x loadconf /nfs/oprserv0x/u1/XXx/prod/OprConrolSys/OprConfXXx.xml
loads the configuration from the xml file given into the bare lpfs.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x startsystem FarmControl
restarts the farm services.
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x scratchFarm XXx
kills all lpfs running on the nodes (oprserv0x and noma0xxx)
(which will kill all spawned processes like Elven as well)
and restarts the bare lpfs.
Shifter Settings
The following commands can be used to check/set the shifters:
(XX = PC or ER, x = 1-8)
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x getshifters XXx
prints a list of shifters
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x setshifter XXx
prints which shifter is currently set for that farm
- ../bin/$BFARCH/OprCmd.pl -iDebug,User,Farm -noprserv0x setshifter XXx shifter_num
sets the shifter for farm XXx to shifter shifter_num.
Last modified: Wed Apr 20 20:31:30 CEST 2005