Odbinit
Jump to navigation
Jump to search
Links
Purpose
The utility odbinit initializes the ODB.
- NOTE
- Normally, odbedit is sufficient to recover from a corrupted ODB
However, if this does not solve the problem, it may be necessary to use odbinit, then reload the contents of the ODB from a saved file.
Usage
[mpet@titan01 ~/online_npet]$ odbinit -h Checking environment... experiment name is "npet", remote hostname is "" usage: odbinit [options...] options: [-e Experiment] --- specify experiment name [-s size] --- specify new size of ODB in bytes, default is 1048576 [--env] --- create new env.sh and env.csh files in the current directory [--exptab] --- create new exptab file in the current directory [--cleanup] --- cleanup (preserve) old (existing) ODB files [-n] --- dry run, report everything that will be done, but do not actually do anything
Example
In this case, the ODB shared memory is corrupted, and the .ODB.SHM has been recreated with a size of 0.
[mpet@titan01 ~/online_npet]$ ls -l .ODB.SHM -rw-r--r-- 1 mpet users 0 Nov 20 14:44 .ODB.SHM [mpet@titan01 ~/online_npet]$ odbinit Checking environment... experiment name is "npet", remote hostname is "" Checking command line... experiment "npet", cleanup 0, dry_run 0, create_exptab 0, create_env 0 Checking MIDASSYS....../home/mpet/packages/midas_nov2018 Checking exptab... experiments defined in exptab file "/home/mpet/online/exptab": 0: "mpet" 1: "npet" <-- selected experiment 2: "test" Checking exptab... selected experiment "npet", experiment directory "/home/mpet/online_npet/" Checking experiment directory "/home/mpet/online_npet/" Found existing ODB save file: "/home/mpet/online_npet/.ODB.SHM" Looks like this experiment ODB is already initialized. To create new empty ODB, please rerun odbinit with the "--cleanup" option. [mpet@titan01 ~/online_npet]$ [mpet@titan01 ~/online_npet]$ odbinit --cleanup Checking environment... experiment name is "npet", remote hostname is "" Checking command line... experiment "npet", cleanup 1, dry_run 0, create_exptab 0, create_env 0 Checking MIDASSYS....../home/mpet/packages/midas_nov2018 Checking exptab... experiments defined in exptab file "/home/mpet/online/exptab": 0: "mpet" 1: "npet" <-- selected experiment 2: "test" Checking exptab... selected experiment "npet", experiment directory "/home/mpet/online_npet/" Checking experiment directory "/home/mpet/online_npet/" Found existing ODB save file: "/home/mpet/online_npet/.ODB.SHM" Checking shared memory... Deleting old ODB shared memory... Deleted existing ODB shared memory, please check that all MIDAS programs are stopped and try again. [mpet@titan01 ~/online_npet]$ [mpet@titan01 ~/online_npet]$ [mpet@titan01 ~/online_npet]$ [mpet@titan01 ~/online_npet]$ odbinit --cleanup Checking environment... experiment name is "npet", remote hostname is "" Checking command line... experiment "npet", cleanup 1, dry_run 0, create_exptab 0, create_env 0 Checking MIDASSYS....../home/mpet/packages/midas_nov2018 Checking exptab... experiments defined in exptab file "/home/mpet/online/exptab": 0: "mpet" 1: "npet" <-- selected experiment 2: "test" Checking exptab... selected experiment "npet", experiment directory "/home/mpet/online_npet/" Checking experiment directory "/home/mpet/online_npet/" Found existing ODB save file: "/home/mpet/online_npet/.ODB.SHM" Checking shared memory... Deleting old ODB shared memory... [system.c:1015:ss_shm_delete,ERROR] shm_unlink(/npet_ODB_SHM) errno 2 (No such file or directory) Good: no ODB shared memory Deleting old ODB semaphore... Deleting old ODB semaphore... create status 1, delete status 1 Preserving old ODB save file /home/mpet/online_npet/.ODB.SHM" to "/home/mpet/online_npet/.ODB.SHM.1542755393" Checking ODB size... Requested ODB size is 0 bytes ODB size file is "/home/mpet/online_npet//.ODB_SIZE.TXT" ODB size file "/home/mpet/online_npet//.ODB_SIZE.TXT" does not exist, creating it... Saved ODB size from "/home/mpet/online_npet//.ODB_SIZE.TXT" is 1048576 bytes We will initialize ODB for experiment "npet" on host "" with size 1048576 bytes Creating ODB... Creating ODB... db_open_database() status 302 Saving ODB... Saving ODB... db_close_database() status 1 Connecting to experiment... Connected to ODB for experiment "npet" on host "" with size 1048576 bytes Checking experiment name... status 1, found "npet" Disconnecting from experiment... Done
Now reload the ODB from a saved file using the odbedit command "load".