slk helpers: slk extension provided by DKRZ

file version: 27 July 2021

current slk version: 3.1.47

current slk helpers version: 1.0.0

The slk_helpers is an extensions to the slk. The slk is developed by StrongBox Data Solutions and belongs to the StrongLink HSM software. The slk_helpers have been developed at the DKRZ to provide some useful functionality that is not included in the slk. If specific usage information is missing on this help page or if you encounter errors, please contact support@dkrz.de.

Note

StrongLink uses the term “namespace” or “global namespace” (gns). A “namespace” is comparable to a “directory” or “path” on a common file system.

slk_helpers help

$ slk_helpers help

lists all commands

slk_helpers checksum

$ slk_helpers checksum [-t CHECKSUM_TYPE] RESOURCE_PATH
  • -t, --type: checksum_type (possible values: sha512, adler32); omit to print all available checksums

Prints the checksum(s) of a resource. If -t is set, the checksum of type CHECKSUM_TYPE is retrieved. Possible values are sha512 and adler32. If -t is not set, all available checksums are printed. It only works for files and not for namespaces. Namespaces do not have checksums.

StrongLink calculates two checksums of each archived file and stores them in the metadata. It compares the stored checksums with the file’s actual checksums at certain stages of the archival and retrieval process. Commonly, users do not need to check the checksum manually. But, you can if you prefer to do it. If a file has no checksum then it has not been fully archived yet (e.g. the copying is still in progress; archival process canceled).

slk_helpers exists

$ slk_helpers exists RESOURCE_PATH

Check if the resource RESOURCE_PATH exists. The resource id is returned if it exists. exists works for files and namespaces.

slk_helpers hostname

$ slk_helpers hostname

Prints the hostname to which slk is currently connected to or to which slk will connect. During the test phase it should be stronglink.hsm.dkrz.de. There is a default value set on each mistral node. It might differ on some mistral nodes during the test phase if we or StrongBox do specific tests. Commonly, mlogin107 and mlogin108 are affected by this. You can overwrite the default hostname by exporting the environment variable SLK_HOSTNAME (e.g. by export SLK_HOSTNAME=stronglink.hsm.dkrz.de).

slk_helpers metadata

$ slk_helpers metadata RESOURCE_PATH

Prints the available metadata of a resource. Corresponds to slk tag – whereas slk tag sets metadata and slk_helpers metadata prints metadata.

slk_helpers mkdir

$ slk_helpers mkdir GNS_PATH
  • -R: use the -R create folders recursively, if the parent folders do not exist; Default: false

Create a namespace in an already existing namespace (== create basename GNS_PATH in dirname GNS_PATH). This command works like mkdir on a Linux terminal. Create nested namesspaces recursively when -R is set (like mkdir -r on Linux terminal).

slk_helpers resourcepath

$ slk_helpers resourcepath RESOURCE_ID

Get path for a resource id

slk_helpers session

$ slk_helpers session

Prints until when the current slk session is valid.

slk_helpers size

$ slk_helpers size

Returns file size in byte