Skip to main content

Library and command line tool to interact with the LOCKSS 1.x DebugPanel servlet

Project description

Debugpanel logo

Debugpanel is a library and command line tool to interact with the LOCKSS 1.x DebugPanel servlet.

Latest release: 0.7.0-post1 (2023-05-02)

Table of Contents

Installation

Debugpanel is available from the Python Package Index (PyPI) as lockss-debugpanel (https://pypi.org/project/lockss-debugpanel), and can be installed with pip.

The installation process adds a lockss.debugpanel Python Library and a debugpanel Command Line Tool. You can check at the command line that the installation is functional by running debugpanel version or debugpanel --help.

Prerequisites

  • Python 3.7 or greater. (You can check the version of Python 3 with python3 --version.)

Prerequisites for development work only:

  • Poetry 1.4 or greater. (You can check the version of Poetry with poetry --version.)

pip

You can install Debugpanel with pip.

To install it in your own non-root, non-virtual environment, use the --user option:

pip3 install --user lockss-debugpanel

To install it in a virtual environment, simply use:

pip3 install lockss-debugpanel

Overview

Per-Node Operations

Some operations operate on one or more nodes.

Operation

Command

Function

Crawl plugins

crawl-plugins

crawl_plugins()

Reload node configuration

reload-config

reload_config()

Per-AU Operations

Some operation operate on one or more AUs on one or more nodes.

Operation

Command

Function

Check substance of AUs

check-substance

check_substance()

Crawl AUs

crawl

crawl()

Crawl AUs with depth

deep-crawl

deep_crawl()

Disable metadata indexing of AUs

disable-indexing

disable_indexing()

Poll

poll

poll()

Reindex AU metadata

reindex-metadata

reindex_metadata()

Validate AU files

validate-files

validate_files()

Command Line Tool

Debugpanel is invoked at the command line as:

debugpanel

or as a Python module:

python3 -m lockss.debugpanel

Help messages and this document use debugpanel throughout, but the two invocation styles are interchangeable.

Synopsis

Debugpanel uses Commands, in the style of programs like git, dnf/yum, apt/apt-get, and the like. You can see the list of available Commands by invoking debugpanel --help, and you can find a usage summary of all the Commands by invoking debugpanel usage:

usage: debugpanel [-h] [--debug-cli] [--verbose] COMMAND ...

       debugpanel check-substance [-h] [--output-format FMT]
                                  [--node HOST:PORT] [--nodes FILE]
                                  [--password PASS] [--username USER]
                                  [--auid AUID] [--auids FILE]
                                  [--pool-size SIZE]
                                  [--process-pool | --thread-pool]
                                  [HOST:PORT ...]

       debugpanel copyright [-h]

       debugpanel crawl [-h] [--output-format FMT] [--node HOST:PORT]
                        [--nodes FILE] [--password PASS] [--username USER]
                        [--auid AUID] [--auids FILE] [--pool-size SIZE]
                        [--process-pool | --thread-pool]
                        [HOST:PORT ...]

       debugpanel crawl-plugins [-h] [--output-format FMT] [--node HOST:PORT]
                                [--nodes FILE] [--password PASS]
                                [--username USER] [--pool-size SIZE]
                                [--process-pool | --thread-pool]
                                [HOST:PORT ...]

       debugpanel deep-crawl [-h] [--output-format FMT] [--node HOST:PORT]
                             [--nodes FILE] [--password PASS]
                             [--username USER] [--auid AUID] [--auids FILE]
                             [--pool-size SIZE]
                             [--process-pool | --thread-pool] [--depth DEPTH]
                             [HOST:PORT ...]

       debugpanel disable-indexing [-h] [--output-format FMT]
                                   [--node HOST:PORT] [--nodes FILE]
                                   [--password PASS] [--username USER]
                                   [--auid AUID] [--auids FILE]
                                   [--pool-size SIZE]
                                   [--process-pool | --thread-pool]
                                   [HOST:PORT ...]

       debugpanel license [-h]

       debugpanel poll [-h] [--output-format FMT] [--node HOST:PORT]
                       [--nodes FILE] [--password PASS] [--username USER]
                       [--auid AUID] [--auids FILE] [--pool-size SIZE]
                       [--process-pool | --thread-pool]
                       [HOST:PORT ...]

       debugpanel reindex-metadata [-h] [--output-format FMT]
                                   [--node HOST:PORT] [--nodes FILE]
                                   [--password PASS] [--username USER]
                                   [--auid AUID] [--auids FILE]
                                   [--pool-size SIZE]
                                   [--process-pool | --thread-pool]
                                   [HOST:PORT ...]

       debugpanel reload-config [-h] [--output-format FMT] [--node HOST:PORT]
                                [--nodes FILE] [--password PASS]
                                [--username USER] [--pool-size SIZE]
                                [--process-pool | --thread-pool]
                                [HOST:PORT ...]

       debugpanel usage [-h]

       debugpanel validate-files [-h] [--output-format FMT] [--node HOST:PORT]
                                 [--nodes FILE] [--password PASS]
                                 [--username USER] [--auid AUID]
                                 [--auids FILE] [--pool-size SIZE]
                                 [--process-pool | --thread-pool]
                                 [HOST:PORT ...]

       debugpanel version [-h]

Commands

The available commands are:

Command

Abbreviation

Purpose

check-substance

cs

cause nodes to check the substance of AUs

copyright

show copyright and exit

crawl

cr

cause nodes to crawl AUs

crawl-plugins

cp

cause nodes to crawl plugins

deep-crawl

dc

cause nodes to crawl AUs, with depth

disable-indexing

di

cause nodes to disable metadata indexing of AUs

license

show license and exit

poll

po

cause nodes to poll AUs

reindex-metadata

ri

cause nodes to reindex the metadata of AUs

reload-config

rc

cause nodes to reload their configuration

usage

show detailed usage and exit

validate-files

vf

cause nodes to run file validation on AUs

version

show version and exit

Top-Level Program

The top-level executable alone does not perform any action or default to a given command. It does define a few options, which you can see by invoking Debugpanel with the --help/-h option:

usage: debugpanel [-h] [--debug-cli] [--verbose] COMMAND ...

options:
  -h, --help            show this help message and exit
  --debug-cli           print the result of parsing command line arguments
  --verbose, -v         print verbose output

commands:
  Add --help to see the command's own help message.

  COMMAND               DESCRIPTION
    check-substance (cs)
                        cause nodes to check the substance of AUs
    copyright           show copyright and exit
    crawl (cr)          cause nodes to crawl AUs
    crawl-plugins (cp)  cause nodes to crawl plugins
    deep-crawl (dc)     cause nodes to crawl AUs, with depth
    disable-indexing (di)
                        cause nodes to disable metadata indexing of AUs
    license             show license and exit
    poll (po)           cause nodes to poll AUs
    reindex-metadata (ri)
                        cause nodes to reindex the metadata of AUs
    reload-config (rc)  cause nodes to reload their configuration
    usage               show detailed usage and exit
    validate-files (vf)
                        Cause nodes to run file validation on AUs
    version             show version and exit

check-substance (cs)

The check-substance command is one of the Per-AU Operations, used to cause nodes to check the substance of AUs. It has its own --help/-h option:

usage: debugpanel check-substance [-h] [--output-format FMT]
                                  [--node HOST:PORT] [--nodes FILE]
                                  [--password PASS] [--username USER]
                                  [--auid AUID] [--auids FILE]
                                  [--pool-size SIZE]
                                  [--process-pool | --thread-pool]
                                  [HOST:PORT ...]

Cause nodes to check the substance of AUs.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

crawl (cr)

The crawl command is one of the Per-AU Operations, used to cause nodes to crawl AUs. It has its own --help/-h option:

usage: debugpanel crawl-plugins [-h] [--output-format FMT] [--node HOST:PORT]
                                [--nodes FILE] [--password PASS]
                                [--username USER] [--pool-size SIZE]
                                [--process-pool | --thread-pool]
                                [HOST:PORT ...]

Cause nodes to crawl plugins.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

crawl-plugins (cp)

The crawl-plugins command is one of the Per-Node Operations, used to cause nodes to crawl their plugins. It has its own --help/-h option:

usage: debugpanel crawl-plugins [-h] [--output-format FMT] [--node HOST:PORT]
                                [--nodes FILE] [--password PASS]
                                [--username USER] [--pool-size SIZE]
                                [--process-pool | --thread-pool]
                                [HOST:PORT ...]

Cause nodes to crawl plugins.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

It also accepts Options for Output Format Control and Job Pool Control.

deep-crawl (dc)

The deep-crawl command is one of the Per-AU Operations, used to cause nodes to crawl AUs with depth. It has its own --help/-h option:

usage: debugpanel deep-crawl [-h] [--output-format FMT] [--node HOST:PORT]
                             [--nodes FILE] [--password PASS]
                             [--username USER] [--auid AUID] [--auids FILE]
                             [--pool-size SIZE]
                             [--process-pool | --thread-pool] [--depth DEPTH]
                             [HOST:PORT ...]

Cause nodes to crawl AUs, with depth.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)
  --depth DEPTH, -d DEPTH
                        depth of deep crawls (default: 123)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It has a unique option, --depth/-d, which is an integer specifying the desired crawl depth.

It also accepts Options for Output Format Control and Job Pool Control.

disable-indexing (di)

The disable-indexing command is one of the Per-AU Operations, used to cause nodes to disable metadata indexing of AUs. It has its own --help/-h option:

usage: debugpanel disable-indexing [-h] [--output-format FMT]
                                   [--node HOST:PORT] [--nodes FILE]
                                   [--password PASS] [--username USER]
                                   [--auid AUID] [--auids FILE]
                                   [--pool-size SIZE]
                                   [--process-pool | --thread-pool]
                                   [HOST:PORT ...]

Cause nodes to disable metadata indexing of AUs.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

license

The license command displays the license terms for Debugpanel and exits.

poll (po)

The poll command is one of the Per-AU Operations, used to cause nodes to poll AUs. It has its own --help/-h option:

usage: debugpanel poll [-h] [--output-format FMT] [--node HOST:PORT]
                       [--nodes FILE] [--password PASS] [--username USER]
                       [--auid AUID] [--auids FILE] [--pool-size SIZE]
                       [--process-pool | --thread-pool]
                       [HOST:PORT ...]

Cause nodes to poll AUs.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

reindex-metadata (ri)

The reindex-metadata command is one of the Per-AU Operations, used to cause nodes to reindex the metadata of AUs. It has its own --help/-h option:

usage: debugpanel reindex-metadata [-h] [--output-format FMT]
                                   [--node HOST:PORT] [--nodes FILE]
                                   [--password PASS] [--username USER]
                                   [--auid AUID] [--auids FILE]
                                   [--pool-size SIZE]
                                   [--process-pool | --thread-pool]
                                   [HOST:PORT ...]

Cause nodes to reindex the metadata of AUs.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

reload-config (rc)

The reload-config command is one of the Per-Node Operations, used to cause nodes to reload their configuration. It has its own --help/-h option:

usage: debugpanel reload-config [-h] [--output-format FMT] [--node HOST:PORT]
                                [--nodes FILE] [--password PASS]
                                [--username USER] [--pool-size SIZE]
                                [--process-pool | --thread-pool]
                                [HOST:PORT ...]

Cause nodes to reload their configuration.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

It also accepts Options for Output Format Control and Job Pool Control.

usage

The usage command displays the usage message of all the Debugpanel Commands.

validate-files (vf)

The validate-files command is one of the Per-AU Operations, used to cause nodes to reindex the metadata of AUs. It has its own --help/-h option:

usage: debugpanel validate-files [-h] [--output-format FMT] [--node HOST:PORT]
                                 [--nodes FILE] [--password PASS]
                                 [--username USER] [--auid AUID]
                                 [--auids FILE] [--pool-size SIZE]
                                 [--process-pool | --thread-pool]
                                 [HOST:PORT ...]

Cause nodes to run file validation on AUs.

options:
  -h, --help            show this help message and exit
  --output-format FMT   set tabular output format to FMT (default: simple;
                        choices: asciidoc, double_grid, double_outline,
                        fancy_grid, fancy_outline, github, grid, heavy_grid,
                        heavy_outline, html, jira, latex, latex_booktabs,
                        latex_longtable, latex_raw, mediawiki, mixed_grid,
                        mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
                        presto, pretty, psql, rounded_grid, rounded_outline,
                        rst, simple, simple_grid, simple_outline, textile,
                        tsv, unsafehtml, youtrack)

node arguments and options:
  HOST:PORT             node to process
  --node HOST:PORT, -n HOST:PORT
                        add HOST:PORT to the list of nodes to process
  --nodes FILE, -N FILE
                        add the nodes in FILE to the list of nodes to process
  --password PASS, -p PASS
                        UI password (default: interactive prompt)
  --username USER, -u USER
                        UI username (default: interactive prompt)

AUID options:
  --auid AUID, -a AUID  add AUID to the list of AUIDs to process
  --auids FILE, -A FILE
                        add the AUIDs in FILE to the list of AUIDs to process

job pool options:
  --pool-size SIZE      nonzero size of job pool (default: N)
  --process-pool        use a process pool
  --thread-pool         use a thread pool (default)

The command needs:

  • One or more nodes, from the Node Arguments and Options (bare arguments, --node/-n options, --nodes/-N options).

  • One or more AUIDs, from the AUID Options (--auid/-a options, --auids/-A options).

It also accepts Options for Output Format Control and Job Pool Control.

version

The version command displays the version number of Debugpanel and exits.

Options

Node Arguments and Options

Commands for Per-Node Operations expect one or more node references in HOST:PORT format, for instance lockss.myuniversity.edu:8081. The list of nodes to process is derived from:

  • The nodes listed as bare arguments to the command.

  • The nodes listed as --node/-n options.

  • The nodes found in the files listed as --nodes/-N options.

AUID Options

In addition to Node Arguments and Options, Commands for Per-AU Operations expect one or more AUIDs. The list of AUIDs to target is derived from:

  • The AUIDs listed as --auid/-a options.

  • The AUIDs found in the files listed as --auids/-A options.

Output Format Control

Debugpanel’s tabular output is performed by the tabulate library through the --output-format option. See its PyPI page for a visual reference of the various output formats available. The default is simple.

Job Pool Control

Debugpanel performs multiple operations (contacting multiple nodes and/or working on multiple AU requests per node) in parallel using a thread pool (--thread-pool, the default) or a process pool (--process-pool). You can change the size of the job pool with the --pool-size option, which accepts a nonzero integer. Note that the underlying implementation may limit the number of threads or processes despite a larger number at the command line. The default value depends on the system’s CPU characteristics (represented in this document as “N”). Using --thread-pool --pool-size=1 approximates no parallel processing.

Library

You can use Debugpanel as a Python library.

The lockss.debugpanel module’s node() method can create a node object from a node reference (a string like host:8081, http://host:8081, http://host:8081/, https://host:8081, https://host:8081/; no protocol defaults to http://), a username, and a password.

This node object can be used as the argument to crawl_plugins() or reload_config().

It can also be used as the first argument to check_substance(), crawl(), deep_crawl(), disable_indexing(), poll(), reindex_metadata(), or validate_files(), together with an AUID string as the second argument.

The deep_crawl() method has an optional third argument, depth, for the crawl depth (whch defaults to lockss.debugpanel.DEFAULT_DEPTH).

All operations return the modified http.client.HTTPResponse object from urllib.request.urlopen() (see https://docs.python.org/3.7/library/urllib.request.html#urllib.request.urlopen). A status code of 200 indicates that the request to the node was made successfully (but not much else; for example if there is no such AUID for an AUID operation, nothing happens).

Use of the module is illustrated in this example:

import getpass
import lockss.debugpanel

hostport = '...'
username = input('Username: ')
password = getpass.getpass('Password: ')
node = lockss.debugpanel.node(hostport, username, password)
auid = '...'

try:
    resp = lockss.debugpanel.poll(node, auid)
    if resp.status == 200:
        print('Poll requested (200)')
    else:
        print(f'{resp.reason} ({resp.status})')
except Exception as exc:
    print(f'Error: {exc!s}')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lockss_debugpanel-0.7.0.post1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

lockss_debugpanel-0.7.0.post1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file lockss_debugpanel-0.7.0.post1.tar.gz.

File metadata

  • Download URL: lockss_debugpanel-0.7.0.post1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/6.3.2-arch1-1

File hashes

Hashes for lockss_debugpanel-0.7.0.post1.tar.gz
Algorithm Hash digest
SHA256 1151564ce4f0c16c2f1bd0ed9a8411c53ba3edc43a7cf6aa81e8f4543191dfd7
MD5 46caf29aa5da3ad3ccdab364e886c27f
BLAKE2b-256 f8124b66a2edde51620a746c307640c86213458759ca67f743251b7ad2c20f30

See more details on using hashes here.

File details

Details for the file lockss_debugpanel-0.7.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for lockss_debugpanel-0.7.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 1169a6c94e99ee0d5520f4f5ed597e165bd434a950132e3aa1dacfea8393b229
MD5 42fbfb32e159966062226811e4b70339
BLAKE2b-256 3665b38dfb95ca4daf84d9932de51cf37d7f8d958afcdb30b5ed9bd507476b21

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page