Skip to content

LLview CLI

LLview has a command-line interface client that is deployed on all login nodes of JSC's Supercomputers. Users can use this CLI tool to view all their tabular data from LLview (e.g., List of Jobs, Queue, Workflows).

Usage

On JSC's Supercomputer's login node, the LLview-CLI client can be launched with the command llview.

$llview --help
Usage: llview [options]

Options:
  -V, --view user@project  Directly acces a specific view
  -P, --page user@project/page  Directly acces a specific page
  -U, --ui <type>          UI mode: 'ncurses' (default), 'plain'/'raw'
  -D, --pager <type>       Pager mode: 'ncurses' (default), 'less', 'plain'/'raw'
  -R, --plain              Shortcut for --ui=plain --pager=plain (plain mode)
  -F, --no-freeze-header   Disable freezing the header row (e.g., for tabular data)
  -O, --output-format      Output format for the --plain mode: 'table' (default) 'csv', or 'json'
  -d, --delimiter          Delimiter of the CSV output, default: ','
  -j, --job-id             Specify one or multiple job IDs (comma-separated) such that all tables show only entries of this/these job(s) (if exist)
  -h, --help               Show this help message and exit

Examples:
  llview --view user@projxyz where projxyz is the budget name of your project
              which can be found under 'Budget' in JuDoor or under column 'budget-account' if you run the command 'jutil user projects'
  llview -F -U plain --pager less
  llview -R  # use plain UI & pager
  llview -R -O csv --page=user@projxyz/all --job-id="0110,2233,4114"

The LLview-CLI client has two operation modes: interactive and plain. The interactive mode is the default and utilizes ncurses to allow the users to view their data interactively in the shell, giving human-readable formatting, and updating approximately every minute for live data, as the Web App does

The plain mode, enabled by the options --plain or --ui=plain writes directly to the stdout instead. With the --output-format option this can be formatted in json or csv for piping to files or other tools.

Regardless of the UI mode, the user can also use the option --pager=[ncurses|less|plain] to select the terminal pager. (the tool used to browse the tabular data from LLview on the terminal). ncurses (default) is a custom pager implemented in LLview using the ncurses library, less uses the less pager, and plain prints the tabular data to stdout.

By default, LLview-CLI runs an interactive session in the command line that mimics the LLview web portal. If the user does not wish to launch the main user interface of the client, a specific LLview page can be opened directly through the option --page=user@proj/page and this page will be opened directly with the specified pager (or printed to stdout if --plain or --pager=plain is specified). Principal Investigators or Project Administrators can also access the PI/PA views or pages or their projects, with e.g., --page=PI@proj/page. The available pages are displayed within the LLview CLI user interface as URIs.

Currently only the top level summary quantities can be accessed through the CLI (all dashboards/tables, not detailed timeseries data) . The CLI is planned to be extended such that the raw data behind the more detailed job reports can be extracted through the CLI.

Example use case

A user wishes to retreive the "CPU Power" value (CPUPwr in LLview) of their job with jobid=12345678. LLview-CLI could be used to retreive this value as follows:

llview --page=user@project/all -j 12345678 -R -O json | jq -r '.[] | [."CPUPwr"] | @tsv'

Here, we know the specific job, so we do not need to specify a more specific page than the user and project/all. The output format has been set to json, so we then pipe the output to jq, a lightweight command-line JSON processor, to extract the specific field we want.