Skip to content
cccskills
FreePublished on GitHub

query-finelog

Investigate Finelog logs and runtime measurements for Iris tasks, training, and vLLM. Discover available fields, write time-bounded SQL, summarize resource usage, compare central and regional records, and interpret counters correctly.

OriginalShow the original description

Query Finelog logs and telemetry for Iris tasks, workers, profiles, training, vLLM, and cross-cluster forwarding. Use for schema discovery, SQL, memory or CPU summaries, hub-versus-regional comparisons, counter semantics, and query-performance diagnosis.

Run score Not tested

See how to install

Good for

  • Summarizing Iris task memory and CPU usage
  • Comparing central and regional logs for forwarding delays
  • Aggregating vLLM counters with reset handling
  • Discovering schemas and diagnosing slow queries

Files included (1)

  • SKILL.md4.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Query Finelog

Read lib/finelog/OPS.md for access and query behavior. Read lib/iris/OPS.md under Stats Namespaces for Iris namespace meanings.

Discover before querying; do not assert remembered columns:

uv run finelog namespaces <deployment>
uv run finelog schema <deployment> <namespace>
uv run finelog query <deployment> --format table <<'SQL'
<bounded SQL using schema-confirmed columns>
SQL

finelog query reads SQL from stdin when the positional SQL argument is omitted.

Use marin for the federated view and a regional deployment for peer-local truth or recent rows that may not have forwarded. Preserve cluster and full process/label identity until after per-series delta calculations.

Bound the native time key. Keep telemetry_v1.timestamp_ms predicates numeric. Treat current snapshots as values, imported Prometheus counters as cumulative snapshots with LAG and reset handling, and native Rigging counters as deltas to SUM directly.

Never reset or change a shared namespace during diagnosis. Return the deployment, namespace, time window, query, series semantics, and any forwarding or retention caveat.

Examples

Confirm every schema before adapting an example. Angle-bracket values are placeholders.

Iris task memory by half-hour

Adapted from Echo wiki 230. The dashboard task ID includes the final task index. Select or group by attempt_id after retries.

SELECT date_bin(INTERVAL '30 minutes', ts,
                TIMESTAMP '1970-01-01 00:00:00') AS bucket_start_utc,
       count(*) AS samples,
       round(min(memory_mb) / 1024.0, 1) AS min_gib,
       round(median(memory_mb) / 1024.0, 1) AS median_gib,
       round(max(memory_mb) / 1024.0, 1) AS max_gib,
       round(max(memory_peak_mb) / 1024.0, 1) AS attempt_peak_gib
FROM "iris.task"
WHERE task_id = '/user/job/task'
  AND attempt_id = 0
GROUP BY bucket_start_utc
ORDER BY bucket_start_utc

memory_mb is sampled current memory; memory_peak_mb is the attempt's cumulative peak. Values are MiB despite the names. count(*) exposes partial buckets and gaps. Query the regional deployment if recent hub rows appear incomplete.

Missing federated logs

Use the exact attempt-suffixed log key on both stores:

-- marin hub
SELECT seq, epoch_ms, source, data, cluster
FROM "log"
WHERE key = '/user/job/task:0' AND cluster = 'cw-us-east-08a'
ORDER BY seq;

-- cw-us-east-08a regional deployment
SELECT seq, epoch_ms, source, data
FROM "log"
WHERE key = '/user/job/task:0'
ORDER BY seq;

Regional rows with a missing or shorter hub result mean forwarding delay. Runtime task logs with no regional rows point to shipper or regional ingest. Iris job describe remains the liveness source.

Native delta counter

Native rigging.telemetry.counter(...).add(...) rows are already increments:

SELECT sum(value)
FROM "telemetry_v1.<semantic_scope>"
WHERE name = 'requests_completed'
  AND timestamp_ms >= <start_ms>
  AND timestamp_ms < <end_ms>

Imported cumulative counter

Imported vLLM counters carry source_temporality = 'cumulative_snapshot'. Scan one 60-second scrape before the visible window, preserve the complete series identity, and discard reset intervals.

WITH base AS (
  SELECT COALESCE(NULLIF(cluster, ''), 'local') AS origin_cluster,
         service, name, resource_attributes_json, attributes_json,
         timestamp_ms, seq, value
  FROM "telemetry_v1.vllm"
  WHERE service = 'vllm'
    AND name = 'generation_tokens_total'
    AND json_get(attributes_json, 'source_temporality') = 'cumulative_snapshot'
    AND timestamp_ms >= <start_ms - 60000>
    AND timestamp_ms < <end_ms>
), samples AS (
  SELECT *, lag(value) OVER (
    PARTITION BY origin_cluster, service, name,
                 resource_attributes_json, attributes_json
    ORDER BY timestamp_ms, seq) AS previous_value
  FROM base
), deltas AS (
  SELECT *, CASE WHEN previous_value IS NULL OR value < previous_value
                 THEN NULL ELSE value - previous_value END AS delta
  FROM samples
)
SELECT date_bin(INTERVAL '5 minutes', to_timestamp_millis(timestamp_ms)) AS bucket,
       sum(delta) AS generated_tokens
FROM deltas
WHERE timestamp_ms >= <start_ms>
GROUP BY bucket
ORDER BY bucket

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ab-test-zephyr

FreeSummary

Compare Zephyr changes using the same prepared dataset and matching execution settings. Analyze Finelog metrics for each processing stage to distinguish CPU efficiency, elapsed time, and peak memory changes, then report improvements, regressions, or tradeoffs.

  • Compare Zephyr performance before and after a PR
  • Assess speed gains against additional CPU usage
  • Check peak memory and out-of-memory regressions
marin-community/marin4KUpdated Oct 23, 2026

add-dataset

FreeSummary

Register Hugging Face datasets for Marin by inspecting their structure without downloading the full dataset. Identify text fields, configurations, and data splits, then add a dataset module and validate the mapping with a sample.

  • Registering a Hugging Face dataset for Marin
  • Inspecting text fields without a full dataset download
  • Checking configurations and data splits
marin-community/marin4KUpdated Oct 23, 2026

add-grant

FreeSummary

Turn a specified GCP access request into a reviewable Pulumi change and pull request. Select the narrowest suitable role and encrypt personal email identities, covering resource permissions and Cloud Run viewer access through IAP, an access gateway.

  • Prepare a request for GCS bucket read access
  • Add a viewer to a Cloud Run service protected by IAP
  • Prepare service account impersonation permissions
marin-community/marin4KUpdated Oct 23, 2026

Add or update Pallas/Mosaic kernels, specialized computation routines for JAX. The skill covers reference implementations, output and gradient checks, public wrappers, fallback behavior, performance benchmarks, and hardware-specific tuning when requested.

  • Adding a Pallas kernel for a JAX computation
  • Checking outputs and gradients against a reference
  • Maintaining backend selection and fallback behavior
marin-community/marin4KUpdated Oct 23, 2026

change-grug

FreeSummary

Try model or training changes in a copied Grug or Grugformer experiment, document the differences, and bring successful changes back into the base template while removing superseded experiment code and checking behavior.

  • Try changes to attention or masking
  • Experiment with optimizers or training loops
  • Bring successful changes into the base template
marin-community/marin4KUpdated Oct 23, 2026

Organize Marin experiment reports into a maintained index, or archive explicitly named older experiments using lasting tags and issue references. Existing conclusions and canonical links are preserved so experiment records remain traceable.

  • Organizing an index of experiment reports
  • Consolidating canonical report entries
  • Archiving named legacy experiments
marin-community/marin4KUpdated Oct 23, 2026

See all skills by marin-community

Report a problem with this skill