Clean startup log

From HYGON-AI/sglang-das · View interactive version

Clean startup log is an AI agent skill from the GitHub repository HYGON-AI/sglang-das. Audit SGLang startup logs, save evidence, and propose cleanup for user review. With no arguments, run Qwen3-8B at TP1 and TP2 plus gpt-oss-20b at TP1.

How to use this skill

Skill file

Audit SGLang Startup Logs

The default outcome is saved logs and a findings report. Apply runtime changes

only after the user selects them. A request to edit this skill does not itself

launch servers.

Default runs

A bare $clean-startup-log invocation runs these cases sequentially without

asking for commands. Explicit commands, models, or TP sizes replace this matrix.

| Case / log filename | Command |

|---|---|

| qwen3-8b-tp1.log | uv run sglang serve --model-path Qwen/Qwen3-8B |

| qwen3-8b-tp2.log | uv run sglang serve --model-path Qwen/Qwen3-8B --tp 2 |

| gpt-oss-20b-tp1.log | uv run sglang serve --model-path openai/gpt-oss-20b |

These cover dense, tensor-parallel, and MoE/hybrid sliding-window attention

startup. Reuse complete captures from the current audit when code and environment

have not changed.

Capture logs

  1. Check the checkout, free GPUs, and ports once. Use the requested command when

resources are free; otherwise select free GPUs with CUDA_VISIBLE_DEVICES and

an unused --port, recording the adjustments. Leave existing servers alone.

  1. Create a unique directory with mktemp -d /tmp/sglang-startup-audit-XXXXXX.

Save raw stdout and stderr together in a separate log for each case, for

example with set -o pipefail and COMMAND 2>&1 | tee LOG_PATH. Record commands,

GPU IDs, ports, commit, relevant overrides, and readiness status.

  1. Wait for The server is fired up and ready to roll!, then stop that server and

its workers before the next case. First runs can spend many minutes downloading

weights or compiling FlashInfer kernels; check download/compiler activity

before treating a quiet log as a hang. Preserve partial logs for failed or

stalled starts and report the last stage. Continue independent cases when possible.

  1. Preserve the user's logging configuration, including NCCL_DEBUG. If NCCL

verbosity needs explaining, inspect relevant shell settings, NCCL_CONF_FILE,

and /etc/nccl.conf. Do not override intentional diagnostics or recommend

NCCL_DEBUG=WARN solely because the output is long. Avoid full environment dumps.

Investigate efficiently

unformatted prints, and unexpected warnings. Read representative excerpts and

counts instead of repeatedly dumping server_args, progress redraws, or NCCL

diagnostics. Normalize carriage returns for analysis only; preserve raw logs.

its log level: SGLang's formatter may omit severity. Group shared signatures

across cases and distinguish handler duplication from separate GPU/process calls.

establish a cleanup need. Consider whether the message explains configuration,

progress, resource use, or an operational limitation.

signature or an unresolved emitter. Verify current code rather than trusting

historical line numbers, fix status, or assumptions about unrelated models.

Accepted output

Preserve these reviewed messages unless the user requests a different policy:

SWA allocation details, and per-rank memory/timing records.

isolated NCCL/Gloo startup lines, and one timestamped HF authentication warning.

These can appear in a clean startup log. Do not repeatedly propose the declined

NUMA deduplication, backend/page-size level changes, or NCCL verbosity override.

Keep real operational warnings visible: for example, a Harmony vocabulary failure

can disable /v1/responses even when server readiness and /generate succeed.

Report before changing code

Return a compact run table with readiness status and clickable raw-log links.

For each actual cleanup candidate, give an exact representative message, affected

cases/counts, source file/function, and specific proposed behavior. Distinguish

confirmed findings from suspicions and operational failures from logging noise.

If there are no actionable cleanup findings, say the logs are clean and no

further cleanup is needed. Otherwise, ask which numbered changes to adopt and

wait for the user's selections before editing runtime code or preparing patches.

Honor existing approvals and declined items without asking again.

Apply selected changes

startup only for a new change, failure, or unresolved concern; do not relaunch

after every one-line edit. Save verification logs separately from baselines.

CLI model detection before configure_logger(), and spawned processes have

independent logger state. Keep configure_hf_hub_logger() in both

suppress_noisy_warnings() and configure_logger(); make repeated setup safe.

library-level suppression or fd redirection for a narrow logging problem.

verify meaningful behavior, not a log-level spelling. Report changes and

verification; create branches, commits, and PRs when requested.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.