Skip to main content

Diagnostic CLI for MicroStrategy / Strategy Intelligence Server (CastorServer / MSTRSvr) memory and performance incidents.

Project description

ISPrefDiag

Diagnostic CLI for MicroStrategy / Strategy Intelligence Server (CastorServer / MSTRSvr) memory and performance incidents.

Status

v0.1.1 (Beta). All three subcommands (analyze, validate, tui) are functional; cross-platform CI gates the parser layer on Ubuntu, macOS, and Windows.

Install

Build a wheel and install it as an isolated tool:

uv build
uv tool install ./dist/ispref-*.whl

uv downloads a compatible Python 3.11+ automatically if your system Python is older. Verify with:

ispref --version
ispref --help

Alternative: pipx

pipx install ./dist/ispref-*.whl

pipx does not auto-download Python; your system Python must already be >= 3.11.

Editable install (development only)

uv tool install -e .

Use this if you are hacking on ISPrefDiag itself.

Quickstart

After installing, run the three commands below against the in-repo fixture pair to confirm everything works end-to-end:

ispref --help
ispref validate tests/fixtures/phase3/working_set_exceeds_governor/DSSErrors.log \
                tests/fixtures/phase3/working_set_exceeds_governor/DSSPerformanceMonitor.csv
ispref analyze tests/fixtures/phase3/working_set_exceeds_governor/DSSErrors.log \
               tests/fixtures/phase3/working_set_exceeds_governor/DSSPerformanceMonitor.csv \
               --out report.md

The validate command exits non-zero if the log and CSV do not share an overlapping time window (strict -- no fuzzy match fallback). The analyze command produces a Markdown report with inventory, terminating event, memory composition, and at least one cited finding.

Subcommands

  • analyze -- Run full diagnostic pipeline on a log + CSV pair; emit a Markdown report with cited findings. Default backend: NullBackend (no LLM). Pass --llm anthropic or --llm ollama to add an LLM-augmented narrative section.
  • validate -- Confirm a log + CSV pair share an overlapping time window (tz-aware UTC). Use this to sanity-check artifact pairs before analyze.
  • tui -- Launch the Textual TUI for interactive review (3 screens: F1 MCM events, F2 Counters, F3 Findings). Forces --llm none (no LLM in TUI mode).

Development

uv sync --group dev
uv run pytest
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/

Configuration

ISPrefDiag reads configuration with the following precedence (highest wins):

  1. CLI flags (--llm none|anthropic|ollama)
  2. Environment variables (ISPREF_LLM__MODE=..., ANTHROPIC_API_KEY=...)
  3. Project pyproject.toml [tool.ispref] (API keys are rejected here -- env vars only)
  4. User ~/.config/ispref/config.toml (run ispref --init-config to write a template)
  5. Built-in defaults (LLM mode = none)

Troubleshooting

ispref not on PATH after install

If which ispref fails after uv tool install, ensure ~/.local/bin is on your PATH. Run uv tool update-shell to add it automatically.

pipx install fails with "Python 3.11 required"

pipx uses your system Python; it does not auto-download newer versions. Install Python 3.11+ first (e.g. uv python install 3.11 && uv python pin 3.11) or use the uv tool install path above.

uv tool install hangs or fails with proxy / network errors

uv tries to download a compatible Python on first install. Behind a corporate proxy that blocks python-build-standalone artifacts, pass --python /path/to/python3.12 to skip the download, or set UV_NO_MANAGED_PYTHON=1.

--llm anthropic prompts for egress confirmation

The first run with --llm anthropic in a session requires explicit confirmation that ISPrefDiag may make outbound HTTPS calls to api.anthropic.com. Pass --yes to bypass (CI scripts) or set ISPREF_LLM_CONFIRM_EGRESS=yes in your environment.

License

See LICENSE.

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

ispref-0.1.1.tar.gz (93.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ispref-0.1.1-py3-none-any.whl (127.6 kB view details)

Uploaded Python 3

File details

Details for the file ispref-0.1.1.tar.gz.

File metadata

  • Download URL: ispref-0.1.1.tar.gz
  • Upload date:
  • Size: 93.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ispref-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d23d778453319aef2c25ac5a54874931c61a3c4a8849119f3a99ea45cb240f02
MD5 b570f7681a28ed4117ea7a0b6f582744
BLAKE2b-256 3f857c072c4327ad296cedf9042fe5ea7657f23532aacb6446090bf08fcd30d9

See more details on using hashes here.

File details

Details for the file ispref-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ispref-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 127.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ispref-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b71613710180fda9c79fc3d27b4289fd3e8d6b922bebf875e7f21f73c99a55f
MD5 d8dcd417a6ff63659734620d7e2f3f8b
BLAKE2b-256 21896938f2dd2918472ba4357d7412944b6c75a36903590771d0525ce71f9c3e

See more details on using hashes here.

Supported by

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