TWiki> LHCb Web>LHCbComputing>LHCbDiracCLI (revision 1)EditAttachPDF

LHCbDirac Data Management commands

This page describes the usage of the LHCbDirac data management (DMS) commands. As they interface may vary with time and introduction of new facilities, not that the --help= option can be used to get the syntax.

The LHCbDirac DMS relies on one hand on Logical File Names (LFNs) that are always of the form /lhcb/....., and on LHCbDirac Storage Elements (SE) for which the first part always indicates the site where it is located. The instance of a file at an SE is called a replica. Note that some replicas may be inactive, i.e. cannot be used for accessing files. This is always the case for archive replicas (SE name of the form <Site>-ARCHIVE), but also some SEs may be temporarily unavailable or files not accessible (e.g. in case a disk server is down at a site).

A list of active SEs can be obtained with dirac-dms-show-se-status.

A replica has a unique SRM URL (SURL) that is used to query the Storage Resource Manager (SRM) for getting informations on the replica or getting a Transport URL (tURL), a.k.a. Physical File name (PFN) to be used by Gaudi.

Information on files

dirac-dms-lfn-replicas

Shows where files have replicas and report the SURL registered in the file catalog

$ dirac-dms-lfn-replicas --help

    Show replicas for a (set of) LFNs

Usage:
  dirac-dms-lfn-replicas [option|cfgfile] [<LFN>] [<LFN>...] 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 
 
Options: 
  -    --File=           : File containing list of LFNs 
  -l:  --LFNs=           : List of LFNs (comma separated) 
  -a   --All             :   Also show inactive replicas 

dirac-dms-lfn-metadata

Shows metadata on a logical file, i.e. not related to any replica.

$ dirac-dms-lfn-metadata --help
  Obtain file metadata from file catalogue client.
Usage:
  dirac-dms-lfn-metadata [option|cfgfile] ... LFN ...
Arguments:
  LFN:      Logical File Name or file containing LFNs 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 

dirac-dms-user-lfns

This command allows a user to get a list of all files it owns on the Grid, within directories or with data/time criteria.

$ dirac-dms-user-lfns --help
Get the list of all the user files.
Usage:
  dirac-dms-user-lfns [option|cfgfile] ... 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 
 
Options: 
  -D:  --Days=           : Match files older than number of days [0] 
  -M:  --Months=         : Match files older than number of months [0] 
  -Y:  --Years=          : Match files older than number of years [0] 
  -w:  --Wildcard=       : Wildcard for matching filenames [*] 
  -b:  --BaseDir=        : Base directory to begin search (default /[vo]/user/[initial]/[username]) 
  -e   --EmptyDirs       : Create a list of empty directories 

Accessing files

dirac-dms-lfn-accessURL

This command returns tURLs for files at a given SE or site. This tURL is optimised for fast and efficient access to the data. Note that any other tURL may either be inefficient or its usage may be discontinued at some point.

$ dirac-dms-lfn-accessURL --help
  Retrieve an access URL for an LFN replica given a valid DIRAC SE.
Usage:
  dirac-dms-lfn-accessURL [option|cfgfile] ... [LFN[,LFN2[,LFN3...]]] SE[,SE2...]
Arguments:
  LFN:      Logical File Name or file containing LFNs
  SE:       Valid DIRAC SE 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 
 
Options: 
  -    --File=           : File containing list of LFNs 
  -l:  --LFNs=           : List of LFNs (comma separated) 
  -g:  --Sites=          :   Sites to consider [ALL] (comma separated list) 
  -S:  --SEs=            :   SEs to consider [ALL] (comma separated list) 

dirac-dms-get-file

This command copies to the local directory a file or a set of files. The options of this command are going to evolve soon, giving additional possibilities.

$ dirac-dms-get-file --help
  Retrieve a single file or list of files from Grid storage to the current directory.
Usage:
  dirac-dms-get-file [option|cfgfile] ... LFN ...
Arguments:
  LFN:      Logical File Name or file containing LFNs 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 

Removing replicas or files

dirac-dms-remove-replicas

Allows to remove a replica at a given SE. This is only allowed for authorised files of course. Note that it is not possible to remove the last replica of a file. Use =dirac-dms-remove-files- for this purpose.

$ dirac-dms-remove-replicas --help

  Remove the given file replica or a list of file replicas from the File Catalog
  and from the storage.

  Usage:
     dirac-dms-remove-replicas <LFN | fileContainingLFNs> SE [SE]
   
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 
 
Options: 
  -    --File=           : File containing list of LFNs 
  -l:  --LFNs=           : List of LFNs (comma separated) 

dirac-dms-remove-files

Allows to remove all replicas of a file as well as the entry in the file catalog.

 $ dirac-dms-remove-files --help

  Remove the given file or a list of files from the File Catalog and from the storage. The option =--FixTransformations= is only for production manager usage.

Usage:
  dirac-dms-remove-files [option|cfgfile] [<LFN>] [<LFN>...] 
General options: 
  -o:  --option=         : Option=value to add 
  -s:  --section=        : Set base section for relative parsed options 
  -c:  --cert=           : Use server certificate to connect to Core Services 
  -d   --debug           : Set debug mode (-dd is extra debug) 
  -h   --help            : Shows this help 
 
Options: 
  -    --File=           : File containing list of LFNs 
  -l:  --LFNs=           : List of LFNs (comma separated) 
  -    --FixTransformations :    Allows to set the files as Removed in all transformations 
Edit | Attach | Watch | Print version | History: r12 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2013-02-18 - PhilippeCharpentier
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback