Skip to main content
Glama
darshan-tools

darshan-tools

by Presciman

Darshan I/O analysis: skill, schema and tools

For an LLM agent that answers questions about a Darshan I/O log, where every number in the answer is retrieved from the log by a tool rather than estimated by the model.

Part

Where

What it is

Skill

.claude/skills/darshan-analysis/SKILL.md

The analysis method: which bottleneck classes to check and in what order, ranked fixes, and how to treat zeros, absent modules and -1.

Schema

darshan_tools/schema/darshan_schema.yaml

The two-layer Darshan schema template. Layer 1 holds the counter families grouped by concern; layer 2 holds the relations derived from them. darshan_to_schema.py fills it from a log.

Tools

darshan_tools/

outline / search / get over the filled schema. darshan(view) returns exact facts from the binary log, including cards: one card of canonical measures per analysis concern (volume, bandwidth, request sizes, metadata, files, rank balance, MPI-IO, Lustre, DXT, bottleneck, verdict, ...). calc does exact arithmetic.

Install

Requires Python ≥ 3.10 and PyDarshan (pip install darshan). PyDarshan needs libdarshan-util. The PyPI wheels bundle it on x86-64 Linux; elsewhere, put a darshan-util install on LD_LIBRARY_PATH or darshan-parser on PATH.

pip install -e .

Related MCP server: observe-mcp

Use

In Claude Code, open this repository as the project. The skill loads from .claude/skills/, and .mcp.json starts the tools as the darshan-tools MCP server, whose instructions explain the schema and how to answer from the cards. Then ask:

analyze /path/to/job.darshan — is it I/O-bound, and what limits its bandwidth?

In any other MCP client, run darshan-tools-mcp over stdio. Call open_log(log) first, then darshan(view="cards"), outline, search, get and calc.

From a shell:

darshan-tools schema job.darshan -o job.schema.json   # the filled two-layer schema
darshan-tools view job.darshan cards                  # all cards; also derived, job, ranks, files, ...
darshan-tools calc "10963279 / MiB"

--nodes N (CLI) or open_log(log, nodes=N) gives the node count. It is needed only when DXT did not trace every rank; otherwise the DXT hostnames give it.

Conventions worth knowing

  • Every measure is computed from the log as Darshan's own tools reduce it: accumulate_records, the same reduction as darshan-parser --total. Bandwidth is darshan-parser --perf's agg_perf_by_slowest.

  • A size is "small" when it falls in a Darshan size bin up to 1 MiB. "Strictly small" excludes accesses of exactly 1 MiB, which Darshan counts in its 100K–1M bin.

  • A card whose concern does not exist in the job (e.g. MPI-IO in a POSIX-only run) says not_applicable with the reason and carries no numbers.

  • darshan(view="derived") lists every derived metric with the formula that produced it.

License

MIT.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables language models and users to perform exact arithmetic, symbolic math, unit/date conversions, statistics, and read-only SQL queries over registered files, with every operation logged by a citable ID that humans can re-run.
      11
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables querying OpenObserve logs—listing streams, inspecting schemas, and running SearchSQL time-windowed searches—so you can answer what actually happened in production. Optionally correlates those logs against a database through a verified read-only connection via DbSchema and DbQuery tools.
      3
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to analyze, cluster, compare, and export reports from local log files through seven read-only tools, returning compact evidence packs with line-number citations instead of raw log dumps. All processing happens on the local machine, so log data never leaves the environment.
      63 PyPI
      1
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to query and debug trace, session, observation, and exception data, analyze latency and metrics, and manage prompts, datasets, and annotation queues. Supports selective tool-group loading, compact or file-dump output, and a read-only mode for safer access.
      -