-
Notifications
You must be signed in to change notification settings - Fork 1
Command Reference
This page describes commands for interacting with EventStore
ESQuery.py provides a command line interface to get information from the EventStore DB. It can currently be found in $EVENTSTORE_BASE/src/EventStoreToolkit .
To use ESQuery.py, you need to set up the EventStore Tools as described here. Please also configure a ~/.esdb.conf file containing the following contents: [note]
eventstore:eventstoreisgreatMore information on this file can be found here.
Please make sure that you've selected the correct main database, either by setting the ESDB environment variable, or by using the -db option.
This program supports many different queries, as shown below. For example, to get a list of runs contained in the "recon" grade (i.e. REST data), use the following command: <syntaxhighlight> ./ESQuery.py -db [email protected] runs recon </syntaxhighlight>
There is also command-line help options as shown here:
ifarm1401> ./ESQuery.py Usage: ESQuery [ -help ] [ --help ] [ -examples ] [ -profile ] [ -verbose ] [ -historyfile <filename> ] [ -db <name@host:port:socket or fileName> ] [ -user <username> -password <password> ] ] [ -logFile </path/filename>or 'stdout' or 'stderr'> ] [ -noHeader ] Use ESDB environment variable to setup your DB Example: ESDB=EventStoreTMP@hallddb Example: ESDB=/tmp/sqlite.db User name and password for MySQL access can be stored into $HOME/.esdb.conf as <username>:<password> Options can be specified in any order. For option description please run 'ESQuery --help' For use cases please run 'ESQuery -examples' Contact: Sean Dobbs, [email protected] ifarm1401> ./ESQuery.py --help ESQuery provides a user-friendly interface to get information from EventStore databases. Command list with brief description: grades - list of grades in DB timestamps <grade> - list of timestamps for <grade> skims <grade> [-time <YYYYDDMM>] - list of skims for <grade> runs <grades> - list of runs for <grade> actualDate <grade> [-time <YYYYDDMM>] - more recent date in DB to given time verions <grade> [-time <YYYYDDMM>] - data version info for <grade> graphVerions <grade> [-time <YYYYDDMM>] - graph version info for <grade> Development commands: fid <filename> - file ID for <filename> fileName <fid> - file name for <fid> uids <run> <graphid> - UIDs stored for <run> in graph <graphid> fileNameType <fid> - file name and type <fid> typeID <typename> - ID for <typename> runInDB <run> <uid> - is this run in the DB? runList <brun> <erun> <graphid> [view] - information for runs <brun> - <erun> runUIDList <brun> <erun> <graphid> [view] - information for runs <brun> - <erun>
For reference, this is what things were like at CLEO:
Description: eventstore Access the eventstore database eventstore in <YYYYMMDD> [<grade> [<skim>]] [runs <low> [<high>]] [<run info query>] [dbDir <dir>] [streams <stm> [<stm>] ] reads requested data from the event store where <YYYYMMDD> date of the version of the <grade> to use <grade> 'grade' of the data to use (default is physics) <skim> the event skim within the grade to use (default is all) runs <low> <high> restricts runs to be between <low> and <high> if only <low> given, only runs over that run (default is to run over all runs) <run info query> allows you to choose runs based on their properties do 'eventstore query_help' for details dbDir <dir> select the directory holding the database (default is to use value for $C3_EVENTSTORE) streams <strm> list of streams to read from event store (default is to read all available) eventstore info [dbDir <dir>] < request > see 'eventstore info help' for details eventstore query_help explains what run info queries are available eventstore help this page Suez> eventstore info help %% SYSTEM-EventStoreModuleBase.EventStoreCommandBase: eventstore info [ dbDir <dir> ] < request > where request may be runs <datestamp> [<grade> [<skim>] ] [runs <min> [<max>]] [<run info query>] prints available runs in DB that match criteria grades prints available grades in DB skims <datestamp> <grade> print skims available for the grade actualDate <datestamp> <grade> print actual internal date used versions <datestamp> <grade> [-verbose] print run ranges versus versions use -verbose option for more details dbContent <dbName> prints content of DB: you need to provide dbName from the following list: all, FileID, KeyFile, Location, RunUID, Version, SpecificVersion, GraphPath, , PathDepend, FileType, OrphanFile Suez> eventstore query_help %% SYSTEM-EventStoreModuleBase.EventStoreCommandBase: Choose runs based on run properties. The properties you may query are dataset <dataset> <dataset> is the dataset number energy <name> <name> is the name of the energy range allowed values of <name> are psi(2S) psi(2S)-off psi(2S)-on psi(3770) allowed values of <dataset> are data10 data11 data16 data17 data18 data19 data20 data21 data22 data23 data24 data25 data26 data27 data28 data29 data30 data31 data32 data32 data32 data32 data32 data33 data33 data33 data34 data35 data35 data36 data37 data38 data39 data40 data41 data42 data43 data44 data45 data46 data47 data48 data6 data8