DM Log Visualizer
Turn Dameng instance .log files into an offline Chinese ECharts report plus CSV/JSON evidence. The report opens directly from local files; do not use npm, Node.js, a dev server, CDN, or network assets.
Run
When this skill directory is in the current repository root:
python .dm-log-visualizerscriptsanalyze_dm_logs.py --input .
If the shell is not at the repository root, use the absolute script path. --input is the log directory. By default the analyzer creates a unique report directory such as dm-log-report-YYYYMMDD-HHMMSS under the current directory. Use --output only when a fixed report directory is required. Useful options: --bucket day|hour|minute; --context N keeps N raw lines before and after WARNING/ERROR/FATAL/abort events; --include-other includes unclassified timestamped lines and can make CSV large.
The analyzer writes index.html, assets/, report-data.js, events.csv, summary.json, charts.json, and evidence.json under the output directory.
Analyze
- Inspect
summary.jsonfirst: time range, version fields, file counts, incident windows, top important messages, checkpoint triggers, context settings, and output file manifest. - Use
charts.jsonfor machine-readable chart payload, compressed minute-level range statistics, and checkpoint trigger source trend series.index.htmlloads browser assets fromassets/and report runtime data fromreport-data.js; do not use fetch, HTTP servers, CDN, or network assets. - Use
evidence.jsonfor raw-line context around WARNING/ERROR/FATAL/abort events. - Use
index.htmlas the user-facing artifact for time range filtering, incident windows, level filters, and write-pressure charts. - Treat important evidence as log levels
WARNING,ERROR, andFATAL; category fields support summaries and trend charts. - For write pressure, inspect
INI_RLOG_SIZE, checkpoint frequency, checkpoint flush statistics/distribution, redo switches, archive generation/cleanup,used_space,free_space, andpages_flushed. - For FATAL shutdown sequences, group
WARNING/ERROR/FATALmessages by timestamp proximity and cross-checkevidence.jsonbefore explaining the visible message sequence.
Event Classes
Recognized classes: checkpoint, redo_switch, archive, backup, warning, error, fatal, abort, and optional other when --include-other is passed.
Stop Conditions
- No
.logfiles: stop and report that the input directory has no Dameng instance logs. - Missing local assets: stop and restore files under
assets/vendor/before generating a report. - Zero parsed events or empty time range: say the log format did not match or no recognized events were found; do not infer health from an empty report.
- Only normal checkpoint/redo/archive activity: say no parsed
WARNING/ERROR/FATALevidence was found. - Never claim root cause from correlation alone; label findings as direct failure evidence, correlated evidence, or symptoms.
Final Response
Include the report path, parsed log time range, highest-priority incident window, key evidence, write-pressure observations, risk interpretation, and the limits of what the logs prove.
Assets
Required generator assets: assets/vendor/echarts.min.js, assets/vendor/flatpickr.min.js, assets/vendor/flatpickr.min.css, and assets/vendor/flatpickr.zh.js. These assets are copied into the generated report assets/ directory. Keep index.html, report-data.js, and assets/ together when moving or sharing the report.



