![]() |
|
FAQ: How do I clean up locks in test/production federations?
In this article we describe how to deal with large number of locks that need to be cleaned up, which typically occure in production enviroment and in test beds.
We have some scripts that can be used to help with lock cleanup. We tried to make them save to run by a non-expert, but still, it's better if you pay attention about what's going on.
Checkout BdbOpsUtils ( V00-02-01 or later for 12.x.x, V00-01-07-03 or later for 10.x.x), and build it with gmake.extrabinscripts.
Run BdbNiceCleanup.pl :
BdbNiceCleanup.pl -fdb $OO_FD_BOOT [-useoocelanup] [-verbose] [-monitoronly]
It will run oolockmon to get the list of transactions on your federation, and will start to check whether each process listed there is dead or alive. Dead processes will be later cleaned up automatically. Use -monitoronly option to only list dead processes without cleaning up the locks. Use -verbose to get full info about live processes, by default only dead processes are reported.
If there was cleanup programm already running, BdbNiceCleanup will try to find out whether that programm is dead or alive too. If it's dead, cleanup lock will be reset and BdbNiceCleanup will continue it's work. If the other cleanup programm is alive, it's process id and host are reported. You must kill it to use BdbNiceCleanup.
When BdbNiceCleanup checks process ids on hosts, it only states transaction dead when ps command is successfull. When ps can not be run on remote host (in case host is unreachable), transaction is not cleaned up. Yuo have to deal with this on individual basis. See other FAQ's about this, for eample How do I clean up locks?).
You may need to run BdbNiceCleanup few times - because sometimes your farm is hang, and when you cleanup some locks, some jobs resume and die later.
Sometimes, after you run BdbNiceCleanup.pl few times and it shows no dead transactions, but you still can see some dead tranactions with oocleanup. Well, this happence. Run BdbNiceCleanup with -useoocleanup option to obtain the list of transactions from oocleanup (default - run oolockmon).
Comment and suggestion are very welcome.
BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us
Page Owner: Jacek Becla
Last Update: June 24, 2002