Usage

gwd

GridWords command-Line debug tools.

gwd [OPTIONS] COMMAND [ARGS]...

Options

--install-completion <install_completion>

Install completion for the specified shell.

Options:

bash | zsh | fish | powershell | pwsh

--show-completion <show_completion>

Show completion for the specified shell, to copy it or customize the installation.

Options:

bash | zsh | fish | powershell | pwsh

csv

Commands for downloading GridWorks data in csv format.

To generate default configuration, run: [green]

gwd csv mkconfig

[/green]

gwd csv [OPTIONS] COMMAND [ARGS]...

egd

Download data directly from the eGauge server to a csv file.

Output directory is next to the specified config_path, named for specified scada. By default, downloads data from last midnight to now.

Examples:

Download today’s data for default scada:

[green]gwd csv egd[/green]

Download yesterday’s data for default scada:

[green]gwd csv egd -y[/green]

Print info without downloading:

[green]gwd csv egd –dry-run[/green]

Download data until two midnights back (less than 48 hours):

[green]gwd csv egd -d 2[/green]

Download data for last 48 hours from current time:

[green]gwd csv egd -d 2d[/green]

Or, equivalently:

[green]gwd csv egd -d 2.0[/green]

gwd csv egd [OPTIONS]

Options

-g, --gnode <scada>

Short name for atn/scada whose eGauge download. Defaults to contents of [orange3]CSVSettings.default_scada

Default:

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/csv/gwd.csv.config.json

-s, --start <start>

Start date/time, in local timezone, e.g. [green]2023-03-01[/green]. If unspecified, calculated by moving –duration back from current time. If unspecified and –duration is an [bold]int[/bold] (a number of days), start will calculated from the upcoming midnight, not from the current time (start will be at a midnight).

-d, --duration <duration>

Duration of download, e.g. [green]1[/green] (1 day) or [green]8h[/green] (8 hours)

Default:

1

-y, --yesterday

Download data for mignight yesterday to midnight today.

Default:

False

-p, --period <period>

Seconds per row.

Default:

60

-l, --local-time

Convert downloaded times from UTC to local times before writing CSV

Default:

False

-z, --write-tz

Write timezone offset from UTC in the CSV

Default:

False

--raw

In addition usual CSV file, output the raw CSV from eGauge, prior to date sorting timzone application

Default:

False

--dry-run, --no-dry-run

Just print information. Do nothing.

Default:

False

--thirsty-run, --no-thirsty-run

Download data but do not save it.

Default:

False

info

Print current configuration.

gwd csv info [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/csv/gwd.csv.config.json

mkconfig

Create default config file for ‘[bold green]gwd csv[/bold green]’ command.

gwd csv mkconfig [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/csv/gwd.csv.config.json

-d, --data-dir <data_dir>

Base output directory.

Default:

/home/docs/.local/state/gridworks/debug-cli/csv

--force, --no-force

Overwrite existing config file, if it exists.

Default:

False

events

Commands for monitoring GridWorks communication events.

gwd events [OPTIONS] COMMAND [ARGS]...

clean

Delete the _entire_ events data directory

gwd events clean [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/events/gwd.events.config.json

dir

Display events in a directory.

gwd events dir [OPTIONS]

Options

--directory <directory>
Default:

--src <src>
Default:

--n <n>
Default:

0

info

Print current configuration.

gwd events info [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/events/gwd.events.config.json

mkconfig

Create default config file for ‘[bold green]gwd events[/bold green]’ command.

gwd events mkconfig [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/events/gwd.events.config.json

--force, --no-force
Default:

False

show

Live display of incoming scada events and status

To show events for only one scada, run multiple windows. Run one window to download and save all events, and another window for each scada you wish to show. For example, to display only events from scadas ‘almond’ and ‘orange’, each in their own window, run the following commands, each in its own window:

gwd events show gwd events show –scada almond gwd events show –scada orange

The unfiltered window is necessary to download previous events from S3 and to save arriving events to disk.

gwd events show [OPTIONS]

Options

--config-path <config_path>
Default:

/home/docs/.config/gridworks/debug-cli/events/gwd.events.config.json

-v, --verbose
Default:

0

--snap <snap>

Scadas whose [bold]snapshots[/bold] to show. May be specified multiple times. If present, a snapshot message Src must contain one of these values to be displayed.

--scada <scada>

Scadas whose [bold]events[/bold] to show. May be specified multiple times. If present, an event message Src must contain one of these values to be displayed. NOTE: if present, implies –read-only and –no-sync.

-c, --clean

Delete the entire data directory.

Default:

False

--no-sync

Skip downloading data from S3. Only mqtt data will be monitored.

Default:

False

--no-mqtt

Download data from S3 but do no live monitoring of mqtt.

Default:

False

-r, --read-only

Skip downloading data from S3. Monitor data from mqtt, but do not write to disk.

Default:

False

--updates-per-second <updates_per_second>

Screen updates per second. Higher rates may cause flickering on some terminals.